[
https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702856#comment-14702856
]
Jan Høydahl commented on SOLR-7888:
-----------------------------------
Somehow, it feels odd to have suggester-agnostic code in relying on
{{SolrSuggester}} relying on {{AnalyzingInfixSuggester.CONTEXTS_FIELD_NAME}},
even if this property is used also by {{BlendedInfixSuggester}}. Perhaps this
property should be moved to some other Lucene class as a common global name for
context field for all analyzers that supports context filtering, even if they
don't subclass any of the existing ones? Perhaps the "Lucene guys" see a
broader picture here? Hard to know what comes in the future...
Regarding a request including suggesters that do not support filtering, I think
it depends on its data whether the correct thing is to return an unfiltered
response (open data) or to return nothing (sensitive data). Of course, the
application has the power to pass {{suggest.dictionary}} accordingly if it
knows that filtering is done. Alternatively, some
{{suggest.returnUnFilteredSuggestionsIfFilteringIsNotSupported}} param to
control it, I don't know...
In {{SolrSuggester#initContextFilterQueryAnalyzer}}, I think that if
{{CONTEXT_ANALYZER_FIELD_TYPE}} is explicitly given and wrong, we should
fail-fast and throw exception instead of falling back to
{{DocumentDictionaryFactory.CONTEXT_FIELD}}
> Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a
> BooleanQuery filter parameter available in Solr
> ------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-7888
> URL: https://issues.apache.org/jira/browse/SOLR-7888
> Project: Solr
> Issue Type: New Feature
> Components: Suggester
> Affects Versions: 5.2.1
> Reporter: Arcadius Ahouansou
> Assignee: Jan Høydahl
> Fix For: 5.4
>
> Attachments: SOLR-7888.patch, SOLR-7888.patch
>
>
> LUCENE-6464 has introduced a very flexible lookup method that takes as
> parameter a BooleanQuery that is used for filtering results.
> This ticket is to expose that method to Solr.
> This would allow user to do:
> {code}
> /suggest?suggest=true&suggest.build=true&suggest.q=term&suggest.contextFilterQuery=contexts:tennis
> /suggest?suggest=true&suggest.build=true&suggest.q=term&suggest.contextFilterQuery=contexts:golf
> AND contexts:football
> {code}
> etc
> Given that the context filtering in currently only implemented by the
> {code}AnalyzingInfixSuggester{code} and by the
> {code}BlendedInfixSuggester{code}, this initial implementation will support
> only these 2 lookup implementations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]