-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1956 from Danielle9897/RDoc-2307-addIncludeExplan…
…ationsForIndexesQuerying RDoc-2307 + RDoc-3138 Add include explanations when querying index
- Loading branch information
Showing
18 changed files
with
788 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
...Raven.Documentation.Pages/indexes/querying/include-explanations.dotnet.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Include Explanations in Index Query | ||
|
||
--- | ||
|
||
{NOTE: } | ||
|
||
* This article provides examples of including explanations when querying a static-index. | ||
|
||
* **Prior to this article**, please refer to [Include Query Explanations](../../client-api/session/querying/debugging/include-explanations) for dynamic-query examples | ||
and general knowledge about including explanations to retrieve the score of resulting documents. | ||
|
||
{INFO: } | ||
* Including explanations is available only when using **Lucene** as the underlying search engine for static-indexes. | ||
* You can configure which search engine will be used. Learn how in [Selecting the search engine](../../indexes/search-engine/corax#selecting-the-search-engine). | ||
{INFO/} | ||
|
||
--- | ||
|
||
* In this page: | ||
* [Include explanations when querying Map index](../../indexes/querying/include-explanations#include-explanations-when-querying-map-index) | ||
* [Include explanations when querying Map-Reduce index](../../indexes/querying/include-explanations#include-explanations-when-querying-map-reduce-index) | ||
* [Syntax](../../indexes/querying/include-explanations#syntax) | ||
|
||
{NOTE/} | ||
|
||
--- | ||
|
||
{PANEL: Include explanations when querying Map index} | ||
|
||
{CODE-TABS} | ||
{CODE-TAB:csharp:Map_index index_1@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:Query inc_1@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:Query_async inc_1_async@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:DocumentQuery inc_2@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:DocumentQuery_async inc_2_async@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB-BLOCK:sql:RQL} | ||
from index "Products/BySearchName" | ||
where search(Name, "Syrup Lager") | ||
include explanations() | ||
// Or: | ||
from index "Products/BySearchName" | ||
where search(Name, "Syrup") or search(Name, "Lager") | ||
include explanations() | ||
{CODE-TAB-BLOCK/} | ||
{CODE-TABS/} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Include explanations when querying Map-Reduce index} | ||
|
||
{CODE-TABS} | ||
{CODE-TAB:csharp:Map_Reduce_index index_2@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:Query inc_3@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:Query_async inc_3_async@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:DocumentQuery inc_4@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB:csharp:DocumentQuery_async inc_4_async@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE-TAB-BLOCK:sql:RQL} | ||
from index "NumberOfUnitsOrdered/PerCategory" | ||
where NumberOfUnitsOrdered > 400 | ||
include explanations($p0) | ||
{"p0" : { "GroupKey" : "Category" }} | ||
{CODE-TAB-BLOCK/} | ||
{CODE-TABS/} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Syntax} | ||
|
||
{CODE syntax_1@Indexes\Querying\IncludingExplanations.cs /} | ||
|
||
| Parameter | Type | Description | | ||
|-------------------|----------------------|-------------------------------------------------------------------------| | ||
| **explanations** | `Explanations` | An _out_ param that will be filled with the explanations results. | | ||
| **options** | `ExplanationOptions` | An object that specifies the GroupKey when querying a Map-Reduce index. | | ||
|
||
{CODE syntax_2@Indexes\Querying\IncludingExplanations.cs /} | ||
{CODE syntax_3@Indexes\Querying\IncludingExplanations.cs /} | ||
|
||
{PANEL/} | ||
|
||
## Related Articles | ||
|
||
#### Client API | ||
|
||
- [Query Overview](../../client-api/session/querying/how-to-query) | ||
|
||
### Indexes | ||
|
||
- [Indexing Basics](../../indexes/indexing-basics) | ||
|
||
### Querying | ||
|
||
- [Query an Index](../../indexes/querying/query-index) | ||
- [Filtering](../../indexes/querying/filtering) |
88 changes: 88 additions & 0 deletions
88
...5.4/Raven.Documentation.Pages/indexes/querying/include-explanations.js.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Include Explanations in Index Query | ||
|
||
--- | ||
|
||
{NOTE: } | ||
|
||
* This article provides examples of including explanations when querying a static-index. | ||
|
||
* **Prior to this article**, please refer to [Include Query Explanations](../../client-api/session/querying/debugging/include-explanations) for dynamic-query examples | ||
and general knowledge about including explanations to retrieve the score of resulting documents. | ||
|
||
{INFO: } | ||
* Including explanations is available only when using **Lucene** as the underlying search engine for static-indexes. | ||
* You can configure which search engine will be used. Learn how in [Selecting the search engine](../../indexes/search-engine/corax#selecting-the-search-engine). | ||
{INFO/} | ||
|
||
--- | ||
|
||
* In this page: | ||
* [Include explanations when querying Map index](../../indexes/querying/include-explanations#include-explanations-when-querying-map-index) | ||
* [Include explanations when querying Map-Reduce index](../../indexes/querying/include-explanations#include-explanations-when-querying-map-reduce-index) | ||
* [Syntax](../../indexes/querying/include-explanations#syntax) | ||
|
||
{NOTE/} | ||
|
||
--- | ||
|
||
{PANEL: Include explanations when querying Map index} | ||
|
||
{CODE-TABS} | ||
{CODE-TAB:nodejs:Map_index index_1@indexes\querying\includingExplanations.js /} | ||
{CODE-TAB:nodejs:Query inc_1@indexes\querying\includingExplanations.js /} | ||
{CODE-TAB-BLOCK:sql:RQL} | ||
from index "Products/BySearchName" | ||
where search(name, "Syrup Lager") | ||
include explanations() | ||
// Or: | ||
from index "Products/BySearchName" | ||
where search(name, "Syrup") or search(name, "Lager") | ||
include explanations() | ||
{CODE-TAB-BLOCK/} | ||
{CODE-TABS/} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Include explanations when querying Map-Reduce index} | ||
|
||
{CODE-TABS} | ||
{CODE-TAB:nodejs:Map_Reduce_index index_2@indexes\querying\includingExplanations.js /} | ||
{CODE-TAB:nodejs:Query inc_2@indexes\querying\includingExplanations.js /} | ||
{CODE-TAB-BLOCK:sql:RQL} | ||
from index "NumberOfUnitsOrdered/PerCategory" | ||
where numberOfUnitsOrdered > 400 | ||
include explanations($p0) | ||
{"p0" : { "GroupKey": "category" }} | ||
{CODE-TAB-BLOCK/} | ||
{CODE-TABS/} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Syntax} | ||
|
||
{CODE:nodejs syntax_1@indexes\querying\includingExplanations.js /} | ||
|
||
| Parameter | Type | Description | | ||
|--------------------------|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| **explanationsCallback** | `(explanationsResults) => void` | <ul><li>A callback function with an output parameter.</li><li>The parameter passed to the callback will be filled with the `Explanations` object when query returns.</li></ul> | | ||
| **options** | `object` | An object that specifies the group key when querying a Map-Reduce index. | | ||
|
||
{CODE:nodejs syntax_2@indexes\querying\includingExplanations.js /} | ||
{CODE:nodejs syntax_3@indexes\querying\includingExplanations.js /} | ||
|
||
{PANEL/} | ||
|
||
## Related Articles | ||
|
||
#### Client API | ||
|
||
- [Query Overview](../../client-api/session/querying/how-to-query) | ||
|
||
### Indexes | ||
|
||
- [Indexing Basics](../../indexes/indexing-basics) | ||
|
||
### Querying | ||
|
||
- [Query an Index](../../indexes/querying/query-index) | ||
- [Filtering](../../indexes/querying/filtering) |
Oops, something went wrong.