You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2008/01/10 22:39:44 UTC

Big number of conditions of the search

Hello, I don't know how to formulate this right, I'll give an example:
I have 20 millions documents with unique ID indexed.
I have list of IDs stored somewhere. I need to run query which will take documents with ID from my list and gives me some statistic. 
For example: my documents are addresses with unique ID. I have list which contains 10 thousand IDs of some addresses. I need to find how many addresses are in NJ from my list? Or another scenario: give me all states my addresses from and how many addresses in each state (only addresses from my list)?
 
So I was thinking I could run facet search by field "State", but my query would be like this: ID:123 OR ID:23987 OR ID:294343 .... 10K such OR conditions in a row, which is ridicules and not even possible I think.
 
Could somebody suggest some solution for this?
 
Thank you
Gene