lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: How to rename fields in an index
Date Wed, 22 Aug 2007 12:03:45 GMT
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  Contact: info at sigram dot com

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message