List of Listings

Chapter 1. A database for the modern web

Listing 1.1. A document representing an entry on a social news site

Chapter 2. MongoDB through the JavaScript shell

Listing 2.1. Typical explain("executionStats") output for an unindexed query

Listing 2.2. explain() output for an indexed query

Chapter 3. Writing programs using MongoDB

Listing 3.1. archiver.rb—A class for fetching Tweets and archiving them in MongoDB

Listing 3.2. viewer.rb—Sinatra application for displaying the Tweet archive

Listing 3.3. tweets.erb—HTML with embedded Ruby for rendering the Tweets

Chapter 4. Document-oriented data

Listing 4.1. A sample product document

Listing 4.2. A category document

Listing 4.3. An e-commerce order, with line items, pricing, and a shipping address

Listing 4.4. A user document, with addresses and payment methods

Listing 4.5. A document representing a product review

Listing 4.6. Simulating the logging of user actions to a capped collection

Chapter 6. Aggregation

Listing 6.1. $unwind, which joins each product with its category id array

Listing 6.2. explain() output for an indexed query

Listing 6.3. Example explain() output for aggregation framework

Listing 6.4. Querying the map-reduce output collection

Chapter 8. Indexing and query optimization

Listing 8.1. Checking the index build process with the shell currentOP() method

Listing 8.2. Viewing query plans with explain(true)

Chapter 9. Text search

Listing 9.1. Loading sample data in the books collections

Listing 9.2. books collection statistics showing space use and index name

Listing 9.3. Displaying text search score

Listing 9.4. Add text multiplier if longDescription isn’t present

Listing 9.5. Example of how language affects stemming

Listing 9.6. Results of stemming simultaneous

Listing 9.7. Example of how language affects stop words

Chapter 12. Scaling your system with sharding

Listing 12.1. Index and query to return latest documents updated by a user

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset