Stemming
In JCR Query, any full-text search uses the equivalent match for the given word. This may not deliver all the desired results a user wants to see, even though the content is present in the repository. Stemming helps to avoid that by providing a linguistic-like search based on the words given. For example: When stemming is provided on the index, the word “sleeve” will fetch results that have words like “sleeved.”
Before applying PorterStem, the search for the word “sleeve” fetches five results. It only fetches nodes matching the exact word “sleeve.” See the result below image.
(Click images to enlarge them)
After applying PorterStem, the search for the same word “sleeve” fetches nine results. It fetches nodes that match both words “sleeve” and “sleeved.” See the result below image.
In JCR Query, any full-text search uses the equivalent match for the given word. This may not deliver all the desired results a user wants to see, even though the content is present in the repository. Stemming helps to avoid that by providing a linguistic-like search based on the words given. For example: When stemming is provided on the index, the word “sleeve” will fetch results that have words like “sleeved.”
Before applying PorterStem, the search for the word “sleeve” fetches five results. It only fetches nodes matching the exact word “sleeve.” See the result below image.
(Click images to enlarge them)
After applying PorterStem, the search for the same word “sleeve” fetches nine results. It fetches nodes that match both words “sleeve” and “sleeved.” See the result below image.
Synonyms
Computer search results will display only the text with an exact match in the full-text search. This may not be the desired result for companies to make the end-user stay on the website. This technical difficulty is eliminated by the Synonyms configuration on the index. In the configuration, we can map two words to be synonymous with each other; when a search is done with one word, it will return combined results for both words.
See the below image for a search of the word “Jacket” before configuration.
See the below image for a search of the word “Jacket” after synonym configuration, which results both “jacket” and “coat.”
Computer search results will display only the text with an exact match in the full-text search. This may not be the desired result for companies to make the end-user stay on the website. This technical difficulty is eliminated by the Synonyms configuration on the index. In the configuration, we can map two words to be synonymous with each other; when a search is done with one word, it will return combined results for both words.
See the below image for a search of the word “Jacket” before configuration.
See the below image for a search of the word “Jacket” after synonym configuration, which results both “jacket” and “coat.”
Stop Word
In the real world, there are situations where don’t have to index for blacklisted words, thus avoiding them from the search results. Mostly like profanity words. Stop Word configuration on index helps us to do this.
See the below image, assuming the word “retail” as a blacklisted word before stop word configuration.
See the below image, assuming the word “retail” as a blacklisted word, after Stop Word configuration.
In the real world, there are situations where don’t have to index for blacklisted words, thus avoiding them from the search results. Mostly like profanity words. Stop Word configuration on index helps us to do this.
See the below image, assuming the word “retail” as a blacklisted word before stop word configuration.
See the below image, assuming the word “retail” as a blacklisted word, after Stop Word configuration.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.