lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Best approach to Intersect results with big Set<String>?
Date Thu, 01 Sep 2011 14:34:00 GMT
I have an application where I need to return all results that are not
in a Set<String>  (the Set is managed from hazelcast... but that is
not relevant)

As a fist approach, i have a SerachComponent that injects a BooleanQuery:

      BooleanQuery bq = new BooleanQuery(true);
      for( String id : ids) {
        bq.add(new BooleanClause(new TermQuery(new
Term("id",id)),Occur.MUST_NOT));
      }

This works, but i'm concerned about how many terms we could end up
with as the size grows.

Another possibility could be a Filter that iterates though FieldCache
and checks if each value is in the Set<String>

Any thoughts/directions on things to look at?

thanks
ryan

Mime
View raw message