ποΈ π Intro to Search Operators
In the previous exercise, you used a $search stage that looked like this one.
ποΈ π The text Operator
The text operator is used to perform a full-text search using the analyzer that you specify in the index configuration. It is used to search for words or phrases in the full-text fields of your documents.
ποΈ π The phrase Operator
The phrase operator is used to search for a group of words in a specific order. It is similar to the match operator, except that it will match anywhere in the text, not just at the beginning.
ποΈ π The equals Operator
The equals operator is used to search for a specific value in a field. It is similar to the match operator, but the operation will be performed by Lucene and can be combined with other operators to refine results.
ποΈ π The range Operator
The range operator is similar to equals but works on ranges of values.
ποΈ π Scoring
You might have noticed that most of the operators have a score property, which we haven't really talked about so far.
ποΈ π Score Modifiers
In the operators you've seen so far, you can adjust the score property to modify the score of a result. This is useful for boosting or demoting results based on certain criteria.
ποΈ π Mixing and Matching
The whole value of using these operators comes from combining them to create search results that are more relevant to your users.
ποΈ π Exercises
Time to get some practice with the concepts you've learned! Try to answer the following questions to the best of your ability. Feel free to reference the slides and notes you've taken during the lesson.
ποΈ π¦Έ Advanced Exercises
Extra activity! Do it if you have extra time or are following along at home. These won't be covered during the hands-on lab.