<lst name=”suggester”>
<str name=”name”>FreeTextSuggester</str>
<str name=”lookupImpl”>FreeTextLookupFactory</str>
<str name=”dictionaryImpl”>DocumentDictionaryFactory</str>
<str name=”field”>title</str>
<str name=”ngrams”>3</str>
<str name=”separator”> </str>
<str name=”suggestFreeTextAnalyzerFieldType”>text_general</str>
</lst>
Unknown
December 16, 2015hi there!
Thanks for your post – very helpful info that I couldnt find elsewhere! I wonder if you can help me with a problem. I am trying to use FreeTextLookupFactory lookup to provide suggestions that are part of the actual indexed content field. But I keep getting solr errors like:
IllegalArgumentException: tokens must not contain separator byte
Would it be possible for you to provide an example field and type definition that can be used with this? Perhaps my field set up is incorrect. Thanks very much!
Alessandro Benedetti
February 11, 2016Hi Unkwown, unfortunately i missed this comment!
Have your solved your problem ?
What was the solution ?
This kind of suggester is actually not using the field type, but the specific analysis you specify in the suggester conf .
Be careful to the note about the separator, it was a tricky one !
Cheers
Harsha JSN
June 10, 2016Hi, a very good analysis on different suggesters. Can you please explain about 'context filtering' in AnalyzingInfixSuggester. Just curious about how the filtering happens in this case over auxiliary lucene index.
Alessandro Benedetti
July 25, 2016Hey Arsha,
thanks for the comment 🙂
For the context filtering, what happens is we actually add to the auxiliary index data structure, the field we want to filter later on.
Then it is possible to configure a query and filter the results ( suggestions) by the content of that field.
I will take a note and add a deep analysis of the feature in the blog post 🙂
Thanks for the feedback !
Shyamsunder
August 22, 2016http://jirasearch.mikemccandless.com/search.py?index=jira uses context param to uses both AnalyzingInfixSuggester “context” feature, to only show suggestions for the project you've drilled into, and its “payload” feature, to hold the metadata behind each suggestion
Shyamsunder
August 22, 2016Hi Alex, thanks for the detailed information on suggesters with examples. Solr Suggestor Wiki is confusing and misleading – https://cwiki.apache.org/confluence/display/solr/Suggester. They should link to this page on that page.
Shyamsunder
August 22, 2016About getting matches for “Video gamign” using FuzzyLookupFactory, what if we apply analysis on spelling correction of “gamign”, i.e., “gaming” to get stemmed tokens. This way we get results.
Alessandro Benedetti
August 23, 2016Hi Shyamsunder,
you are correct, the context filtering is used in Michael portal 🙂
But what about the “payload” ?
Which metadata are you referring to ? I can see only the title in the suggestions ( but I just quickly played with it)
Cheers
Alessandro Benedetti
August 23, 2016Thank you very much Shyamsunder!
Much appreciated!
Alessandro Benedetti
August 23, 2016Hi Shyamsunder, you mean using an analyzer that performs spell correction ( dictionary based ? ) and then stemming ?
It could be possible.
First we define a TokenFilter that does the spell correction based on a dictionary ( it is actually a good idea, but I think it doesn't exist out of the box).
Then we can specify a stemming token filter, and the game is done.
This is actually a good idea, and can be potentially useful is a number of use cases :
https://issues.apache.org/jira/browse/SOLR-9429
Shyamsunder
August 23, 2016You got it. Thanks for considering my idea.
Shyamsunder
August 23, 2016This comment has been removed by the author.
Harsha JSN
September 14, 2016Hi, in case of AnalyzingInfixSuggester if the auxiliary index build is in progress when “suggest.build = true” will the suggestions work? during this interval?
Gaurav
December 16, 2019Great Post
We have below example data.
******************
solrId1
New York
City
1
solrId2
New York
City
1
solrId3
New York
City
1
solrId33
New York
City
1
solrId22
New Manhatan
City
1
solrId32
New Manhatan
City
1
solrId333
New Manhatan
City
1
solrId4
New jersey
City
1
solrId5
New jersey
City
1
solrId6
newark
City
1
****************************
I am able to implement Suggester on top of filed name “meta” not able to sort the suggestion based on no. of times documents contain suggest filed
Exepcted result for query “New” : New York, New Manhatan, New jersey, Newark
Getting result for query “New” : New Manhatan, New jersey, Newark, New York ( not getting in order as expected)