[ https://issues.apache.org/jira/browse/LUCENE-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655942#action_12655942 ]
Michael McCandless commented on LUCENE-1487: -------------------------------------------- I think this is a useful filter impl, and a nice companion to FCRF. I'd like to see it committed; formatting & test case are good next steps. TermsFilter (in contrib/queries) does the same thing, but creates a bitset by docID up front by walking the TermDocs for each term. An OR query, wrapped in QueryWrapperFilter, is another way. This impl uses FieldCache to create a bitset by term number and then does a scan by docID, so it has different performance tradeoffs: for "enum" fields (far more docs than unique terms -- like country, state, etc.) it's fast to create this filter, and then applying the filter is O(maxDocs) with a small constant factor. I think for many apps it means you do not have to cache the filter because creating & using it "on the fly" is plenty fast. > FieldCacheTermsFilter > --------------------- > > Key: LUCENE-1487 > URL: https://issues.apache.org/jira/browse/LUCENE-1487 > Project: Lucene - Java > Issue Type: New Feature > Components: Search > Affects Versions: 2.4 > Reporter: Tim Sturge > Fix For: 2.9 > > Attachments: FieldCacheTermsFilter.java > > > This is a companion to FieldCacheRangeFilter except it operates on a set of > terms rather than a range. It works best when the set is comparatively large > or the terms are comparatively common. -- 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