[COMPASS-4403] Include Index Parameter Created: 07/Sep/20  Updated: 29/Oct/23  Resolved: 08/Sep/20

Status: Closed
Project: Compass
Component/s: Aggregation pipeline
Affects Version/s: 1.22.0
Fix Version/s: 1.23.0

Type: Bug Priority: Major - P3
Reporter: Marcus Eagan (Inactive) Assignee: Massimiliano Marcon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File Compass Search Stage.mov    
Issue Links:
Cloners
Depends
Documentation Changes: Not Needed
Sprint: Iteration Lime

 Description   

The template for the $search stage can be difficult to get started with because the index is missing from the template, yet it is still required. The name of the search index is defined at creation.

 

If we re-add that template, it will be easier for developers to comprehend. Here is an example:

 /** 
* index: the name of the Search index. 
* text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. 
* term: Un-analyzed search. 
* compound: Combines ops. 
* span: Find in text field regions. 
* exists: Test for presence of a field. 
* near: Find near number or date. 
* range: Find in numeric or date range. 
*/
{
  index: 'movies',
  text: {
    query: 'base',
    path: 'plot'
  }
}

 

 

 I've attached a video to make the explanation easier.

 



 Comments   
Comment by Massimiliano Marcon [ 08/Sep/20 ]

marcus.eagan fix is in master. Probably not going to be in the upcoming 1.23 beta but it will be in the next release.

Generated at Wed Feb 07 22:36:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.