[ https://issues.apache.org/jira/browse/SOLR-7888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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&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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org