lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw00d <>
Subject Re: Vedr. Re: Design question [too many fields?]
Date Wed, 29 Jun 2005 19:15:46 GMT
I suspect the most performant is as follows (but could require bags of 
RAM) :
Heres the pseudo code .....

[on IndexReader open, initialize map]
int []luceneDocIdsByDbKey=new int [largestDbKey]; //could be large array!
for (int i=0;i;<reader.maxDocs;i++)
    int dbKey=Integer.parseInt(reader.doc(i).get("dbKey"));

[on search, use map]
results=dbConn.executeQuery(select dbKey from db where ........)
BitSet bits=new BitSet(reader.maxDocs);
for( all dbKey in resultset)
MyBitSetFilter filter=new MyBitSetFilter(bits);

Should be super-quick but requires (int size* num db records) memory for 
the map.


Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message