You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Demetrio Zenti <d....@dthink.biz> on 2004/08/13 14:23:20 UTC

Rename but not reindex

I apologise if it's a stupid question...

I index Document objects having 2 fields:
 - 1° representing file name. It's code is
   Field fieldPath = new Field("FIELD_FILENAME", filename, true, false,
false);

 - 2° representing body of this file
   Field fieldSize = new Field("FIELD_CONTENT", filebody, false, true,
true);


I've indexed all documents of a folder, let's say C:\tmp, and of its
subfolders.
Now I rename C:\tmp into C:\temp, and I want to update index, but
I don't want to reindex all documents, because sometimes it's much
expensive.

Is there any way to update a field of a Document (in this case
"FIELD_FILENAME") without reindexing?

Thanks

   Demetrio



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


Re: Rename but not reindex

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
You have to re-index.  Updating is not currently possible, at least not 
without really low-level hacks.

	Erik


On Aug 13, 2004, at 8:23 AM, Demetrio Zenti wrote:

> I apologise if it's a stupid question...
>
> I index Document objects having 2 fields:
>  - 1° representing file name. It's code is
>    Field fieldPath = new Field("FIELD_FILENAME", filename, true, false,
> false);
>
>  - 2° representing body of this file
>    Field fieldSize = new Field("FIELD_CONTENT", filebody, false, true,
> true);
>
>
> I've indexed all documents of a folder, let's say C:\tmp, and of its
> subfolders.
> Now I rename C:\tmp into C:\temp, and I want to update index, but
> I don't want to reindex all documents, because sometimes it's much
> expensive.
>
> Is there any way to update a field of a Document (in this case
> "FIELD_FILENAME") without reindexing?
>
> Thanks
>
>    Demetrio
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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


Re: Rename but not reindex

Posted by Otis Gospodnetic <ot...@yahoo.com>.
No, just delete the Doc and re-add it.

Otis

--- Demetrio Zenti <d....@dthink.biz> wrote:

> I apologise if it's a stupid question...
> 
> I index Document objects having 2 fields:
>  - 1� representing file name. It's code is
>    Field fieldPath = new Field("FIELD_FILENAME", filename, true,
> false,
> false);
> 
>  - 2� representing body of this file
>    Field fieldSize = new Field("FIELD_CONTENT", filebody, false,
> true,
> true);
> 
> 
> I've indexed all documents of a folder, let's say C:\tmp, and of its
> subfolders.
> Now I rename C:\tmp into C:\temp, and I want to update index, but
> I don't want to reindex all documents, because sometimes it's much
> expensive.
> 
> Is there any way to update a field of a Document (in this case
> "FIELD_FILENAME") without reindexing?
> 
> Thanks
> 
>    Demetrio
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


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