[ 
https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708614#comment-14708614
 ] 

Arcadius Ahouansou edited comment on SOLR-7888 at 8/24/15 1:27 AM:
-------------------------------------------------------------------

Hello [~janhoy]

- I have changed the param name to {{suggest.cfq}}

- the constant {{CONTEXTS_FIELD_NAME}} is still in {{Lookup.java}} awaiting 
confirmation from [~mikemccand]

- Regarding the local params {code}{!terms f=contexts}abc,def,ghi{code}
I had a look and the local parameter parsing happens in 
{{QParser.getParser(String qstr, String defaultParser, SolrQueryRequest req)}}.
The current query parser framework relies on the solr schema for the query 
field and the analyzer.
In our case, the analyzer is in the schema but the query/filter field is not.
I have started implementing this and some reworking is required to reuse the 
existing  QParser/QParserPlugin
Note that in the specified case, TermsQParserPlugin generates a 
ConstantScoreQuery. We will have to wrap this into a BooleanQuery to send it to 
Lucene as the context filtering supports only BooleanQuery at the moment.
I would suggest we add the local param feature as an enhancement later if that 
is OK.

Please let me know if there is any other change to be done.

Thank you.

Arcadius


was (Author: arcadius):
Hello [~janhoy]

- I have changed the param name to {{suggest.cfq}}

- the constant {{CONTEXTS_FIELD_NAME}} is still in {{Lookup.java}} awaiting 
confirmation from [~mikemccand]

- Regarding the local params {code}{!terms f=contexts}abc,def,ghi{code}
I had a look and the local parameter parsing happens in 
{{QParser.getParser(String qstr, String defaultParser, SolrQueryRequest req)}}.
The current query parser framework relies on the solr schema for the query 
field and the analyzer.
In our case, the analyzer is in the schema but the query/filter field is not.
I have started implementing this and some reworking is required to reuse the 
existing  QParser/QParserPlugin
I would suggest we add the local param feature as an enhancement later if that 
is OK.

Please let me know if there is any other change to be done.

Thank you.

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
>            Assignee: Jan Høydahl
>             Fix For: 5.4
>
>         Attachments: SOLR-7888.patch, SOLR-7888.patch, 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]

Reply via email to