[ https://issues.apache.org/jira/browse/LUCENE-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662907#action_12662907 ]
Paul Elschot commented on LUCENE-1345: -------------------------------------- To add a Filter is as a clause to a BooleanQuery, I would prefer to not give it a Weight. Instead I'd like the addition of a required Filter to behave exactly like the current Searcher(Query, Filter) API. That also touches another point: backward compatibility with BooleanQuery and Searcher. It's certainly possible to add scoring behaviour to a Filter when it is added to a BooleanQuery. A default score value could be used, and also a default coordination behaviour. In principle it is also possible to add a disjunction of Filters to a BooleanQuery, even with a minimum number of required filters. For this case a score value does make sense. Required Filters and for prohibited Filters could be added to a BooleanQuery without scoring behaviour. In fact, for prohibited Queries, the score value is never used, so one might even constrain prohibited clauses to be Filters only. Most, if not all, of the scoring behaviour for Filters that was discussed so far can be obtained by using a ConstantScoreQuery based on a Filter and adding it to a BooleanQuery. So I think it would be cleaner to keep the scoring yes/no distinction between Queries and Filters. In case a simplified interface is desired this could then use any of the options available, for example always wrapping a Filter in a ConstantScoreQuery, and then composing a BooleanQuery only from Query clauses. > Allow Filter as clause to BooleanQuery > -------------------------------------- > > Key: LUCENE-1345 > URL: https://issues.apache.org/jira/browse/LUCENE-1345 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Reporter: Paul Elschot > Priority: Minor > Fix For: 2.9 > > Attachments: booleansetperf.txt, DisjunctionDISI.java, > DisjunctionDISI.patch, DisjunctionDISI.patch, > LUCENE-1345-Filter+Query-merge.patch, LUCENE-1345.patch, LUCENE-1345.patch, > OpenBitSetIteratorExperiment.java, TestIteratorPerf.java, > TestIteratorPerf.java > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org