[
https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Høydahl updated SOLR-7888:
------------------------------
Attachment: SOLR-7888.patch
Some details on this patch:
* Changed back to {{suggest.cfq}}
* Avoid test-schema changes, use {{my_contexts_t}} and {{my_contexts_s}} instead
* Skip (for now) the configurable contexts field name in Lucene classes
* Add the {{CONTEXTS_FIELD_NAME}} constant to AnalyzingInfixLookupFactory to
avoid making the Lucene constant public
* Now we don't get Solr error code when searching with invalid field names, so
I changed the test to instead verify that we get 0 hits.
Query analyser is now always created as
{code}contextFilterQueryAnalyzer = new TokenizerChain(new
StandardTokenizerFactory(Collections.EMPTY_MAP), null);{code}
It seems to work well, however not sure if there are use cases where it don't
align with the index-analyzer of the Suggester index.
> 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-7963.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]