Custom words in Spell check in lucene index in oak

cqsapientu69896

05-02-2019

Is it possible to add custom words to oak's lucene full text index search ?

for example - custom word is USI so when user searches for UPI, spell check should return - Did you mean 'USI'

I tried to find online documentation but could not find any. Could you guys please let me know if any such feature is available? Any help in this regard will be highly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Gaurav-Behl

MVP

06-02-2019

check this- Jackrabbit Oak – Lucene Index

/oak:index/lucene-suggest

  - jcr:primaryType = "oak:QueryIndexDefinition"

  - compatVersion = 2

  - type = "lucene"

  - async = "async"

  + suggestion

  - suggestUpdateFrequencyMinutes = 20

  + indexRules

  - jcr:primaryType = "nt:unstructured"

  + nt:base

  + properties

  - jcr:primaryType = "nt:unstructured"

  + jcr:description

  - propertyIndex = true

  - analyzed = true

  - useInSuggest = true

cqsapientu69896

06-02-2019

Thanks for your reply, but not sure if it answers my question -

1 - lucene-suggest is for search auto-suggest suggestions, I was looking for spellchecking - something like - did you mean contribute

    I think lucene-spellcheck would be the index for spellchecking

2- even the useInSpellcheck = true property in lucene-spellcheck index allows to add the properties which will be considered in spellchecking, like jcr:content , jcr:title etc

it says nothing about adding a custom dictionary of words - such as upi, pht, etc

request you to please let me know if this makes sense or if I am wrong.

Also requesting other jackrabbit oak experts, if they can throw light on this issue.

Thanks,