Question

I want to implement solr spell checker for compound words. e.g.

consider "apple banana mango" , "apple mango banana", "mango apple banana", "mango banana apple", "banana apple mango", "banana mango apple"

are all valid compound words. Now i want that when someone mispells "appule mungo banana" solr spell checker shall be able to suggest the spellings as "apple mango banana".

I have implemented(functionally correct) this thing, but what i did is created a spellcheck index for every such combination. So spell check index has become huge. If i make such an index, i extimated that spell check index would become around 1GB in size.

Now i want to index just one combination of compound word "apple mango banana"

and expect solr to return correct spellings for all the combinations.

Is it possible without indexing every possible combination?

Was it helpful?

Solution

This can be done with spellcheck.collate. If you use Dismax, you might want to set mm to 100% so you only get suggestion combinations that actually exist in documents.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top