Even if the wildcard queries are very flexible, sometimes they simply cannot give us a good result. There could be some weird typo in the term, but we still want to obtain good results wherever it is possible under certain confidence conditions:
painting
and I actually search for plainthing
, use the following command:>> curl – X GET 'http://localhost:8983/solr/paintings/select?q=abstract:plainthing~0.5&wt=json'
leonardo
by misspelling the name we use the following command:>> curl -X GET 'http://localhost:8983/solr/paintings/select?q=abstract:lionardo~0.5&wt=json'
In both cases, the examples use misspelled words to be recognizable, but the same syntax can be used for intercept existing similar words.
Both the preceding examples work as expected. The first gives us documents containing the term painting
and the second gives us documents containing leonardo
. Notice that the syntax plainthing^0.5
represents a query that matches with a certain confidence. So, we will also obtain occurrences of documents with the term paintings
, which is good. But, we could receive weird results in a more general case. In order to set up the confidence value properly, there are not many options apart from doing tests.
3.129.216.7