As it turned out the problem could not be solved with built-in spellchecker.
Fortunately, the Solr is opensource and everyone can modify its code to accomplish this goal.
質問
For simplicity reasons we suppose that our Solr index contains single word: "test"
.
And our search query is "test someNonExistentWord"
.
Using Solr's spell checker we will get following result:
"response": {
"numFound": 1,
"start": 0,
"docs": [
{
...
}
]
},
"spellcheck": {
"suggestions": [
"correctlySpelled",
true
]
}
So, my question is: How to know that one of word within query is actually doesn't exists?
Sure, straightforward way exists - manual query tokenizing followed by serach for each word separately, but is there a better solution?
解決
As it turned out the problem could not be solved with built-in spellchecker.
Fortunately, the Solr is opensource and everyone can modify its code to accomplish this goal.