[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15366267#comment-15366267 ] Rajesh Kapur commented on SOLR-7888: Hi, Can we pass multiple fields to be filtered out in ContextField parameter? If yes, please give me example. > 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, 6.0 > > Attachments: SOLR-7888-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14958586#comment-14958586 ] Arcadius Ahouansou commented on SOLR-7888: -- Thank you very much [~janhoy] for your very valuable help, support and contribution on this issue. > 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, Trunk > > Attachments: SOLR-7888-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14954992#comment-14954992 ] Jan Høydahl commented on SOLR-7888: --- Thanks for the review. It's good to know that you'll get an exception instead of silence, but I don't think it is relevant for the refGuide.. > 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, Trunk > > Attachments: SOLR-7888-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14954960#comment-14954960 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~janhoy]. The Wiki looks OK to me. I was just wondering whether it is worth adding that the build command will throw an exception if context configuration is added to a suggester that does not support context. Thank you very much. > 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, Trunk > > Attachments: SOLR-7888-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14953074#comment-14953074 ] ASF subversion and git services commented on SOLR-7888: --- Commit 1708103 from jan...@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1708103 ] SOLR-7888: Analyzing suggesters can now filter suggestions by a context field (backport) > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14953126#comment-14953126 ] Jan Høydahl commented on SOLR-7888: --- Added documentation to refguide: https://cwiki.apache.org/confluence/display/solr/Suggester > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14953694#comment-14953694 ] Jan Høydahl commented on SOLR-7888: --- [~arcadius] and [~ctargett], I'd appreciate a review of my changes to the refguide page above. > 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, Trunk > > Attachments: SOLR-7888-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14951993#comment-14951993 ] Jan Høydahl commented on SOLR-7888: --- Committed current state to trunk. Let it bake for some time before backport... > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14951992#comment-14951992 ] ASF subversion and git services commented on SOLR-7888: --- Commit 1707907 from jan...@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1707907 ] SOLR-7888: Analyzing suggesters can now filter suggestions by a 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-7963.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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14952070#comment-14952070 ] Arcadius Ahouansou commented on SOLR-7888: -- Thank you very much [~janhoy] > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14744939#comment-14744939 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~janhoy] Thank you for uploading the updated version. I am pretty happy with your changes and I would suggest we go ahead with that. There are few minor changes that are needed: - {code}-SuggesterResult suggesterResult = suggester.getSuggestions(options); +SuggesterResult suggesterResult = suggester.getSuggestions(options, rb.req);{code} The additional param {{rb.req}} was needed only for SOLR-7963, so it can be removed here and in all subsequent methods. - As we no longer rely on the schema, maybe we should review/rename the test {{testContextFilterUsesAnalyzerFromSchema()}}? I am not quite sure whether the {{* Clone of CONTEXTS_FIELD_NAME in AnalyzingInfixSuggester}} is an excellent idea, but that it very minor. So, please let's go ahead with this. Thank you very much. I will address your comments regarding SOLR-7963 later on. > 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14743511#comment-14743511 ] Jan Høydahl commented on SOLR-7888: --- Please don't delete attachments when uploading new ones. I think it makes sense to commit a version without localParams support first, as there are still some unresolved issues with that integration: * Solr's Qparsers assume that you query the index specified in schema.xml, but we don't * It is kind of a hack to force Lucene's AnalyzingSuggester to use same contexts field name as the source schema field name we pull data from - it satisfies QParser's need for a DF which exists in schema, but there are more problems: * If the source fieldType in schema.xml is e.g. {{text}}, then that Analyser is used for query, with lowercasing etc. Problem is that the {{contexts}} field for the Suggester is *always* indexed as {{String}}, meaning that a source string "ABC" will not match a query "ABC" since it will be lowercased and match only "abc" One solution is to extend Lucene's suggesters to be able to index contexts field with a custom analyzer, given in constructor. Then we could match things up and get it working. However, I don't like the hack of accidentally naming the two fields the same to get QParser working, so ideally we should then create a SuggesterQParser or something which accepts DF not in schema and is explicit about Analysers. But then letting people switch parser with localParam will bring them trouble again since that parser will require the field to exist in schema etc... So for now let's analyze the context query as String, using Lucene's query parser, and leave to a future jira to add more flexibility. I'll upload a patch shortly. > 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 > > > 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14737770#comment-14737770 ] Arcadius Ahouansou commented on SOLR-7888: -- I have just started work on SOLR-7963 as part of SOLR-7888. I will upload a new patch here when done. Thanks. > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14737279#comment-14737279 ] David Smiley commented on SOLR-7888: Looks cool. IMO Can't we just incorporate SOLR-7963 (support local-params) now? Solr makes supporting this easy; like a one-liner I think. Personally I like the "suggest.fq" name best, even considering your rationale as to why not. No big deal though. > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14737621#comment-14737621 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~dsmiley] Thank you very much for your comment. - I could change the parameter to {{suggest.fq}} if [~janhoy] and others are OK with that. For now, filtering is happening only on the {{context}} field, that is why {{cfq}} was chosen. But maybe in the future, we may have filtering on any arbitrary field in which case {{suggest.fq}} may make more sense? - About SOLR-7963 , yes it could be included here. From first glance, it looks like a 1-liner, but it's not. Please look at my comment above. Or maybe am I missing something? I found it easier and more manageable to have it as an additional feature in a separate ticket. Any contribution would be well appreciated. Note that there is an ignored failing test {{testLocalTermsQuery()}} for SOLR-7963 in the current patch > 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14724969#comment-14724969 ] Arcadius Ahouansou commented on SOLR-7888: -- Is there anything (maybe add more tests or do some specified manual testing ) I could do to help get this through ? Thank you very much. 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, 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=true=term=contexts:tennis > /suggest?suggest=true=true=term=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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14713078#comment-14713078 ] Jan Høydahl commented on SOLR-7888: --- I think this is close to committable. If there are no objections to moving {{CONTEXTS_FIELD_NAME}} to {{Lookup.java}} by tomorrow, I'll do a round of final reviews manual testing before committing. 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, 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14708883#comment-14708883 ] Jan Høydahl commented on SOLR-7888: --- Sure, localparams can be a followup 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14708614#comment-14708614 ] Arcadius Ahouansou commented on SOLR-7888: -- 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14706443#comment-14706443 ] Jan Høydahl commented on SOLR-7888: --- Lucene guys ([~mikemccand] et.al) are you happy with moving the constant from {{AnalyzingInfixSuggester}} to {{Lookup}} and make it public, i.e:? {code} Index: lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java - protected final static String CONTEXTS_FIELD_NAME = contexts; Index: lucene/suggest/src/java/org/apache/lucene/search/suggest/Lookup.java + public static final String CONTEXTS_FIELD_NAME = contexts; {code} If you don't want to make the constant part of the public Lucene API, an alternative is to duplicate the constant into {{org.apache.solr.spelling.suggest.LookupFactory}} for Solr's use case. bq. The param name is this latest patch is still suggest.contextFilterQuery as we have not agreed yet on the right name to adopt Perhaps {{suggest.cfq}}? bq. CONTEXT_ANALYZER_FIELD_TYPE I'm ok to delay such a param until there is a use case for it. Another question is choice of query parser for the context filter query: {{StandardQueryParser}}. Does it make sense to parse the context query using Solr's lucene parser, to fully support e.g. [localParams|https://cwiki.apache.org/confluence/display/solr/Local+Parameters+in+Queries], or is this just confusing here? I'm thinking that one use of context filtering could be ACLs, and the filter query could be hundreds of ACL terms, where you would be better off doing something like this: {code} suggest.cfq={!terms f=contexts}abc def ghi {code} 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 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14701722#comment-14701722 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~janhoy]. Sorry I have been away for quite a while. I have just uploaded an updated version of the patch. Changes dones are as follow: - No need to pass the query field anymore. the internal {{AnalyzingInfixSuggester.CONTEXTS_FIELD_NAME}} is used as query field i.e. the recommended way to filter is just {{ctx2 AND ctx3}} instead of the old way {{contexts:ctx2 AND contexts:ctx3}} - Most of the logic for parsing queries has been moved into {{SuggestComponent.java}} to {{SolrSuggester.java}} - Multiple suggester can be configured, each one having a different analyzer for the context field. - The {{contextAnalyzerFieldType}} config is optional and by default, the analyzer of the context field will be used - There is a test {{testContextFilterParamIsIgnoredWhenContextIsNotImplemented()}} to test that if you send context filtering query to a suggester that does not support context, the filtering is just ignored and suggest return result. Along the same line, there is also a test {{testContextFilteringIsIgnoredWhenContextIsImplementedButNotConfigured()}} So, the implementation is more friendly now. - Suggester build will throw exception only if you configure context in solrconfig.xml on a suggester that does not support context. But queries still return normally, just the build operation for the concerned suggester fails. There is a test {{testBuildThrowsIllegalArgumentExceptionWhenContextIsConfiguredButNotImplemented()}} to cover that - buildAll will fail for all (not just the concerned suggester) if you configure context in solrconfig.xml on a suggester that does not support context - Regarding the parameter name. The initial implementation if did used the name {{suggest.cfq}} for ContextFilterQuery. Then I looked at {{suggest.dictionary}}, {{suggest.reloadAll}} etc which are plain English. For now, I have not yet changed the name. I will change it as soon as we agreed on that. Please let me know in case I have missed anything you mentioned. Thank you very much. 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 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14679779#comment-14679779 ] Jan Høydahl commented on SOLR-7888: --- Will let others chime in on the param names too. Which one do you like the best? * {{suggest.contextFilterQuery}} * {{suggest.contextQ}} * {{suggest.fq}} * {{suggest.context.fq}} The {{suggest.fq}} variant would be in line with filters for main query, but does not indicate that it is for context field only, so people could misunderstand and try filter for other fields. Another issue is this line in the patch {code} throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,Context Filtering Query not yet supported by +lookup.getClass()); {code} Solr supports running multiple suggesters in parallel on one call. Should we require that if you want to use the context filtering, all suggesters must support it (like in current patch) or should we fallback to not filtering for the other suggesters. I guess there are use cases that would want both behaviors... 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 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14679187#comment-14679187 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~janhoy] - The {{defaultField}} thing is an excellent idea! Will add that - I will change the param to {{suggest.contextQ}} - About the {{contextAnalyzerFieldType}} config, it seems we may not need that because as we know the {{contextField}}, I was able to do something like {code}Analyzer queryAnalyzer = core.getLatestSchema().getFieldType(contextsField).getQueryAnalyzer(){code} - About multivalue: the source field in the current test is defined as {code}field name=contexts type=text indexed=true stored=true multiValued=true/{code} and we have tests where we index data with multiple contexts {code} assertU(adoc(id, 8, cat, example inputdata, price, 45, weight, 30, contexts, ctx2, contexts, ctx3)); {code} and we check both contexts with an {{AND}} {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} 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14679308#comment-14679308 ] Jan Høydahl commented on SOLR-7888: --- This all starts to look good. Auto Analyzer choice for ctx field was a smart move, but should still be overridable I guess. 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 Fix For: 5.4 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14679503#comment-14679503 ] Arcadius Ahouansou commented on SOLR-7888: -- Hi [~janhoy]. I am away for a couple of days but will upload the updated patch ASAP. .. Thanks. 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 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14662835#comment-14662835 ] Arcadius Ahouansou commented on SOLR-7888: -- 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14663165#comment-14663165 ] Jan Høydahl commented on SOLR-7888: --- By multivalue I mean that the Solr source field could be MV and all values should match against the query. You only need one {{suggest.contextFilterQuery=}}. Is it possible to shorten the param name, to e.g. {{suggest.contextQ=}} or something? And if you only ever can query on context (? ), then perhaps that can be defaultField, and the query itself can be simply {{golf OR football}}? 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14661849#comment-14661849 ] Jan Høydahl commented on SOLR-7888: --- Thanks for the contribution, looks promising. Just browsed the code, have not tested or looked thoroughly. What analysis is applied to the new contextfield? Do we need it to be configurable? I can probably help next week if I find some time... 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14661834#comment-14661834 ] Michael McCandless commented on SOLR-7888: -- Hi [~arcadius], I agree we should add this to Solr, but I'm not familiar enough with this part of Solr to help here ... 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14662578#comment-14662578 ] Jan Høydahl commented on SOLR-7888: --- Let's see if it's a an easy one by copying existing code, if not we can do it step wise. Should probably handle multi valued input too.. 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14662504#comment-14662504 ] Arcadius Ahouansou commented on SOLR-7888: -- Thank you [~mikemccand] 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14662524#comment-14662524 ] Arcadius Ahouansou commented on SOLR-7888: -- Hello [~janhoy] The contextField used in the tests is defined as a simple string in the schema. We could make things more flexible by defining the type of the field ... similar to the suggestAnalyzerFieldType config. I have added this to my todo list. Is it OK to have the basic usable functionality out and then, create more tickets to implement further enhancements? Thank you very much. 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-7888) Make Lucene's AnalyzingInfixSuggester.lookup() method that takes a BooleanQuery filter parameter available in Solr
[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14661000#comment-14661000 ] Arcadius Ahouansou commented on SOLR-7888: -- Please [~mikemccand], when you have the chance, could you have a look and let me know whether all this makes any sense? Thanks. 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=truesuggest.build=truesuggest.q=termsuggest.contextFilterQuery=contexts:tennis /suggest?suggest=truesuggest.build=truesuggest.q=termsuggest.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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org