Dear Andrzej Bialecki

Can we change the field name in *.fnm directly by hand?

-----Original Message-----
From: Andrzej Bialecki [mailto:[EMAIL PROTECTED]
Sent: 2007年8月22日 8:04 下午好,Daniel
To: java-user@lucene.apache.org
Subject: Re: How to rename fields in an index

Antoine Baudoux wrote:
> No, i just want to change the field labels.
>
> For example, i have a "Keyword" field that i want to rename into "kw".

(note: this is a low-level hack, you can damage your index beyond repair).

Take a look at FieldInfos class, and how it creates the *.fnm file for
each segment. You can re-write these fnm files using new field names. In
case of compound indexes you will need to "explode" them first to a
non-compound format.

Make sure you write out these files using exactly the same order of
fields, otherwise you will end up in big trouble ;)


--
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to