On Sunday, November 30, 2003, at 11:13 AM, Kent Gibson wrote:
as per Erik's idea I tried with the BitSet as follows:

QueryFilter qf = new QueryFilter(query);
IndexReader ir = IndexReader.open(indexPath);
Searcher searcher2 = new IndexSearcher(ir);

// get the bit set for the query
BitSet bits = qf.bits(ir);

I did not mean to imply for you to call the bits method in this manner. In fact, you should not call it - the IndexSearcher calls it under the covers. I was implying that you could write your own Filter subclass that lit up a single-bit corresponding to the document you're interested in.


However I always get a result of 1, which I suppose is
has to do with this overlap thingy.

No, not related with respect to a filter - two different concepts.


Is there not a simple way to just get some word
statistics out of a file?

Look at the Lucene index format (from Lucene's main web page). Term frequencies are part of the statistics gathered, of course. You can get at the values there using IndexReader. This may be a lot lower-level than you desire, but what Lucene stores is there for you.


Erik


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



Reply via email to