Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JtsGeoStratey's filter should implement Bits instead of testing all documents #3

Open
dsmiley opened this issue Mar 27, 2013 · 0 comments

Comments

@dsmiley
Copy link
Collaborator

dsmiley commented Mar 27, 2013

I can tell JtsGeoStrategy's filter is so slow just by looking at it. It's testing all indexed documents and returning a bitset. Talk about brute-force! Instead, it should return a DocIdSet that returns a Bits that in turn will test the given document to see if it matches. If that isn't work, then a superior approach is one that returns a DocIdSetIterator that implements advance(). In this way, the expensive logic will only occur for documents that match other aspects of the query (e.g. keyword, other filter queries). In Solr, this would be used as a post-filter with a cost >= 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant