Thank you for the suggestion. I ended up biting the bullet and re-working my indexing logic. Luckily the system itself knows what the "current" version of a document is (otherwise it won't know which one to display to the user) for any given folder.
I was able to get a static method I could call passing in a folder name. The method returns the file name of the current version for that folder. Each time I am doing an incremental update if I find that a document from a folder hasn't changed I make sure it is the current version before moving on. If it isn't I remove it from the index. Than when I am creating a new index or adding files to an existing, for each file, I have to check the file I am adding to ensure it is the current version for the folder before adding it. As you can imagine this slows down indexing (creating a new or updating an existing) but it ensures content from an old version will never show up in a query. Luke ----- Original Message ----- From: "Yonik Seeley" <[EMAIL PROTECTED]> To: "Lucene Users List" <[EMAIL PROTECTED]>; "Justin Swanhart" <[EMAIL PROTECTED]> Sent: Thursday, November 18, 2004 1:32 PM Subject: Re: version documents > This won't fully work. You still need to delete the > original out of the lucene index to avoid it showing > up in searches. > > Example: > myfile v1: "I want a cat" > myfile v2: "I want a dog" > > If you change "cat" to "dog" in myfile, and then do a > search for "cat", you will *only* get v1 and hence the > sort on version doesn't help. > > -Yonik > > > --- Justin Swanhart <[EMAIL PROTECTED]> wrote: > > Split the filename into "basefilename" and "version" > > and make each a keyword. > > > > Sort your query by version descending, and only use > > the first > > "basefile" you encounter. > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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]