Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
7.7
-
None
Description
I'm experiencing problem when I try to use Context Filtering with auto suggester. What I want is to filter the suggestions based on url field
Here is my searchComponent:
<lst name="suggester"> <str name="name">AnalyzingInfixSuggester</str> <str name="lookupImpl">AnalyzingInfixLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">main_title</str> <str name="weightField">main_title</str> <str name="contextField">url</str> <str name="suggestAnalyzerFieldType">text_general</str> </lst>
Here are the fields in my schema:
<field name="main_title" type="string" indexed="true" stored="true"/> <field name="url" type="string" indexed="true" stored="true"/>
Example: I'm searching for "aacsb" and I have two results, which is correct. One is in English and one in German. I want to filter them out and show only the German result.
My urls looks like this:
https://www.myWebsite.com/aacsb-dog-lion?german https://www.myWebsite.com/aacsb-dog-lion?english
Here are my queries:
http://localhost:8983/solr/myCore/suggest?&q=aacsb&suggest.dictionary=AnalyzingInfixSuggester&suggest.cfq=-url:english http://localhost:8983/solr/myCore/suggest?&q=aacsb&suggest.dictionary=AnalyzingInfixSuggester&suggest.cfq=-english
With these I'm receiving both results. It doesn't matter if we have the field name or not.
When I tried these
http://localhost:8983/solr/myCore/suggest?&q=aacsb&suggest.dictionary=AnalyzingInfixSuggester&suggest.cfq=url:\*english\* http://localhost:8983/solr/myCore/suggest?&q=aacsb&suggest.dictionary=AnalyzingInfixSuggester&suggest.cfq=\*english\*
I don't receive any results.
I read the documentation several times: LINK, but I still can't make it work.
Any help is welcomed.
Thanks!