Custom Oak Indexes : AEM Part-5 ( Porter Stemming & Lower Case )

  


As of now we have implemented Autosuggestion, Stop Words, Synonyms Words, Custom Index Creation. let's implement Porter Stemming & Lower Case  for search.

Please follow 

Custom Oak Indexes Part-4  for Autosuggestion

Custom Oak Indexes Part-3  for Stop Words

Custom Oak Indexes Part-2  for Synonyms Words

Custom Oak Indexes Part-1  for Custom Index Creation

Porter Stemming : In this implementation search will reduce any of the forms of a word such as "talks, talking, talked" or "read, reading" to their elemental roots "talk" and "read".And it will only consider root words for search.

We can follow below steps to implement this.

  • Create analyzers node : type - nt:unstructured  
  • Create default node : type - nt:unstructured 
  • Create filters node : type - nt:unstructured 
  • Create PorterStem node : type - nt:unstructured 



Lower Case : It converts any uppercase letters in a token to the equivalent lowercase token. All other characters are left unchanged.

Example : 

In: "Down With CamelCase"

Tokenizer to Filter: "Down", "With", "CamelCase"

Out: "down", "with", "camelcase"

We can follow below steps to implement this.

  • Create analyzers node : type - nt:unstructured  
  • Create default node : type - nt:unstructured 
  • Create filters node : type - nt:unstructured 
  • Create LowerCase node : type - nt:unstructured 



   

After reindex changes will start reflecting.

Hope this helps!!

Happy Coding 🙏


If you like my post and find it helpful, you can buy me a coffee.

Comments