
Time for action – querying an Index
We will learn to query the TotalOrdersPerCustomer
index we have created in the previous section and visualize the query result.
- In the Management Studio, select the Indexes tab and click on it to display the Indexes screen.
- Click on the TotalOrdersPerCustomer index from the indexes list in order to execute the index and display its result in the Query Index screen.
- In the Query Index screen, click on the Query Options button and check the Index Entries to show the index entries instead of the matching documents.
What just happened?
We just queried the TotalOrdersPerCustomer
index and modified queries display options to customize the result display. We did this in order to show the index entries instead of the matching documents.
At the bottom of the Results section, there are displayed some statistics and metadata about the query that just has been executed.
Editing an Index
Editing an index in the Management Studio means to bring up the C# code of the Map/Reduce
LINQ functions and edit them. The Edit Index screen allows you to add or remove the Maps
and/or Reduce
functions, Transformation functions, and fields.
To open an index in the Edit mode, you can click on the pencil icon next to the index name in the available indexes list.