lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Consumer <>
Subject Help on creating and maintaining an index that changes
Date Wed, 20 Nov 2002 22:59:28 GMT

I'm a lucene newbie.  I wanted to ask someone's expert
opinion on how to attack this issue.  I have a set of
documents (a catalog) that many clients want to
register with the search server.  While those clients
are reachable their catalog should be available, but
if they log off or disappear then I want to remove
their catalog from the index.

Currently, I have this implemented with two hashmaps. 
Their catalog is assigned a unique key in one hashmap,
and their catalog contents is parsed out into
keywords, and put into the master hashmap which
indexes into the other one.  When a client leaves I
remove their catalog from the first hashmap, and I
don't clean up the references in the master hashmap. 
If a search indexes a key that is null in the first
hashmap I remove the reference at that point from the
master Hashmap.

I want to do something similiar with Lucene, but I
don't know how to approach it.  I thought maybe
keeping the first hashmap as is, and building a
Directory in lucene that replaces the master Hashmap. 
 When I get hits back from lucene I look them up in
the first hashmap, and return those.

How do I put the needed information into Directory so
I can look them up in the first hashmap.  I would need
the unique id identifying the client, and a key that
identifies the document that the client has.

Then how do I clean up the Directory when a client is
not available?  How do I remove a document from
Lucene's Directory?

thanks in advance,

Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site

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

View raw message