[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Updating documents in PyLucene

gefafwisp

1/30/2008 6:19:00 PM

Hi all,
The way that Lucene (and by extension, PyLucene) seems to work is that
updates to documents are implemented by the user as a document
addition (of the new version) and subsequent deletion (of the old
version).

My problem is that I'd like to update a number of documents which have
their Store flag set to NO - they're indexed, but not stored. I don't
have the original text content of these documents available anywhere
else - is there any way for me to get this un-stored indexed data from
the old document into the new?

Also posting to comp.lang.java.programmer.

Thanks,
James
1 Answer

Jarek Zgoda

1/31/2008 9:40:00 AM

0

gefafwisp@gmail.com napisa3(a):

> The way that Lucene (and by extension, PyLucene) seems to work is that
> updates to documents are implemented by the user as a document
> addition (of the new version) and subsequent deletion (of the old
> version).

I'd switch the operations, first delete then add. Solr does this that
way and I decided to follow.

> My problem is that I'd like to update a number of documents which have
> their Store flag set to NO - they're indexed, but not stored. I don't
> have the original text content of these documents available anywhere
> else - is there any way for me to get this un-stored indexed data from
> the old document into the new?

I think the answer is "no", there has to be some way of identifying
records that have to be deleted. If you do not store any document UID,
you are out of luck.

Anyway, you may get some hints on lucene mailing list.

--
Jarek Zgoda
Skype: jzgoda | GTalk: zgoda@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)