[
https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14662835#comment-14662835
]
Arcadius Ahouansou edited comment on SOLR-7888 at 8/8/15 6:52 AM:
------------------------------------------------------------------
Hi [~janhoy].
I will update the patch this weekend and add a
{code}contextAnalyzerFieldType{code} configuration with tests. Should be quite
easy.
By multi-input, you meant
{code}
suggest.contextFilterQuery=contexts:golf&suggest.contextFilterQuery=contexts:football
{code}
I will add that as well this weekend.
In the meanwhile, let me know if there is anything else that I need to add.
Thank you very much for picking up this.
Arcadius.
was (Author: arcadius):
Hi [~janhoy].
I will update the patch this weekend and add a
{code}contextAnalyzerFieldType{code} configuration with tests. Should be quite
easy.
The current implementation is already handling multiValue IMHO.
I have in the setUp of the tests
{code}
assertU(adoc("id", "8", "cat", "example inputdata", "price", "45", "weight",
"30", "contexts", "ctx2", "contexts", "ctx3"));
{code}
with 2 contests ctx2 and ctx3
And the test using both values
{code}
//AND BooleanQuery
assertQ(req("qt", rh,
SuggesterParams.SUGGEST_BUILD, "true",
SuggesterParams.SUGGEST_DICT, "suggest_blended_infix_suggester",
SuggesterParams.SUGGEST_CONTEXT_FILER_QUERY, "contexts:ctx2 AND
contexts:ctx3",
SuggesterParams.SUGGEST_Q, "examp",
SuggesterParams.SUGGEST_COUNT, "5"),
"//lst[@name='suggest']/lst[@name='suggest_blended_infix_suggester']/lst[@name='examp']/int[@name='numFound'][.='1']"
);
{code}
In the meanwhile, let me know if there is anything else that I need to add.
Thank you very much for picking up this.
Arcadius.
> 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
> Attachments: 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]