You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by bbarani <bb...@gmail.com> on 2016/07/27 22:09:29 UTC
Is there a way to filter the results based on weight - SOLR
suggester?
Hi,
I am using suggester component in SOLR 5.5.1 and sort the matching
suggestion based on a custom field (lookupCount) field. The below
configuration seems to work fine but its returning the matching term even if
the weight is set to 0. Is there a way to restrict returning the matching
term based on weight field?
Something like. Return the matching suggestions that doesn't have the value
of the weight field set to 0?
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">userQuery</str>
<str name="weightField">lookupCount</str>
<str name="suggestAnalyzerFieldType">string</str>
</lst>
*Current sample output (returns the matching term even it has weight set to
0)
*
/solr/test/suggest?suggest=true&suggest.dictionary=mySuggester&wt=xml&suggest.q=bill&suggest.count=5
<int name="numFound">5</int>
<arr name="suggestions">
<lst>
<str name="term">bill</str>
<long name="weight">0</long>
<str name="payload"/>
</lst>
<lst>
<str name="term">billing history</str>
<long name="weight">69753</long>
<str name="payload"/>
</arr>
</lst>
</lst>
--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-filter-the-results-based-on-weight-SOLR-suggester-tp4289286.html
Sent from the Solr - User mailing list archive at Nabble.com.