Thanks for the info, but unfortunately it still is getting an OutOfMemoryError,
Here's my code:

--------------------------------------------------
final BitSet bits = new BitSet();
HitCollector hc = new HitCollector() {
     public void collect(int doc, float score){
         System.out.println("collect");
         if (score > THRESHOLD) {
             bits.set(doc);
         }
     }
};
mSearcher.search(query, hc);
System.out.println("          results ("+bits.cardinality()+"):\n");
-----------------------------------------------------

When I search with a low-hit query, "collect" is printed many times.
When I search with a query I know will hit most of the 1.8 million records, the "collect" print
does not even print, it eats up the 700+MB I allocated and then throws an OutOfMemoryError. Did
I do something wrong?


Thanks for you help,

Cory









At 09:43 PM 5/27/2003 +0200, you wrote:
> Hits hits = searcher.search(myQuery);

BitSet results = new BitSet();

searcher.search(myQuery, new HitCollector()
{
  public void collect(int doc, float score)
  {
    if (score > THRESHOLD)
      results.set(doc);
  }
});

--
Eric Jain


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to