lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject Re: Is it possible to update only selected fields in a document ?
Date Tue, 22 Mar 2011 08:06:32 GMT
On 3/22/11 8:40 AM, shrinath.m wrote:
> On Tue, Mar 22, 2011 at 12:39 PM, Anshum-2 [via Lucene]<
> ml-node+2713899-1210341880-376162@n3.nabble.com>  wrote:
>
>> No as of now, there's no way to do so.
>
> Thank you Anshum-2,
> how do you propose I do this ?
> I have thought of a way like this :
> - first get the doc based on a unique id into a HashMap,
> - replace the field which I want to update
> - call update on the index with the map.
>
> Is there any efficient way of doing this ?

are you looking for something like

http://hrycan.com/2009/11/26/updating-document-fields-in-lucene/

?

If so, please be aware that IIUC this only works for stored fields, but 
for fields which used StringReader (readerValue) this does not seem to 
work, but I am not certain and are still trying to figure this out to
make sure.

HTH

Michael
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message