> The problem is, that due to the "filtering" AFTER having searched the index, > we don't know how many TopDocs to read in order have "enough" for page x.
Think of a number and double it? Unless the number get really high lucene is generally plenty fast enough. Or read n and if, after filtering, don't have enough, loop and read n + something. > Does lucene's search allow injecting kind of a "voter"/"vetoer", which is > called for any hit (ScoreDoc) lucene has encountered. This voter should be > able to reject the given hit from TopDocs (by returning false). Can this be > done with a custom Filter? > This of course comes with a performance penalty, but it would allow to search > for n ScoreDocs, even in our case... You can use a custom Collector. From the javadocs: "Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.". Custom result filtering sounds familiar ... -- Ian. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
