[
https://issues.apache.org/jira/browse/LUCENE-6286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14334948#comment-14334948
]
Adrien Grand commented on LUCENE-6286:
--------------------------------------
This was changed in LUCENE-6220, but it was this way on 4.x too, the names just
do not make it clear. Here is an excerpt from 4.10's IndexSearcher:
{noformat}
/** Finds the top <code>n</code>
* hits for <code>query</code>, applying <code>filter</code> if non-null.
*
* @throws BooleanQuery.TooManyClauses If a query would exceed
* {@link BooleanQuery#getMaxClauseCount()} clauses.
*/
public TopDocs search(Query query, Filter filter, int n)
throws IOException {
return search(createNormalizedWeight(wrapFilter(query, filter)), null, n);
}
{noformat}
The object which is passed as null on the last line is the "ScoreDoc after"
parameter.
> Remove Filter from IndexSearcher APIs
> -------------------------------------
>
> Key: LUCENE-6286
> URL: https://issues.apache.org/jira/browse/LUCENE-6286
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Attachments: LUCENE-6286.patch
>
>
> IndexSearcher has lots of methods that take a filter, and merge it with the
> query using a FilteredQuery when it is non null. I would like to remove these
> methods in favour of methods that only take a query and leave the
> responsibility to build a FilteredQuery or a BooleanQuery with FILTER clause
> to the user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]