Re: How to rename fields in an index

2008-01-31 Thread jjlarrea
ery segment that the index consists of. Also, fnm files are binary > files, so you need to know the format (unless you preserve the length of > the name, e.g. "secret" -> "public", then you can do it with a binary > editor). > -- View this message in context:

RE: How to rename fields in an index

2007-08-23 Thread Jun.Chen
Got it. Thank you very much :) -Original Message- From: Andrzej Bialecki [mailto:[EMAIL PROTECTED] Sent: 2007年8月23日 3:09 下午好,Daniel To: java-user@lucene.apache.org Subject: Re: How to rename fields in an index [EMAIL PROTECTED] wrote: > Dear Andrzej Bialecki > > Can we change

Re: How to rename fields in an index

2007-08-23 Thread Andrzej Bialecki
[EMAIL PROTECTED] wrote: Dear Andrzej Bialecki Can we change the field name in *.fnm directly by hand? Yes, but you need to be consistent about it, i.e. change it the same way for every segment that the index consists of. Also, fnm files are binary files, so you need to know the format (unle

RE: How to rename fields in an index

2007-08-22 Thread Jun.Chen
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: >

Re: How to rename fields in an index

2007-08-22 Thread mark harwood
ct: Re: How to rename fields in an index I really don't like the dirty solution ;-) I could come up with a patch if many are interested in this. What do you like be the best : patching QueryParser ,or a new QueryParser subclass ? -- Antoine Baudoux Development Manager [EMAIL PROTECTED]

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
I really don't like the dirty solution ;-) I could come up with a patch if many are interested in this. What do you like be the best : patching QueryParser ,or a new QueryParser subclass ? -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax

Re: How to rename fields in an index

2007-08-22 Thread Erik Hatcher
On Aug 22, 2007, at 11:02 AM, Antoine Baudoux wrote: In fact I need this change just for the Query parser class, to be able to make queries such as kw:blah. Now my field is called "org.mycompany.mediafield.keyword". Not very easy to make queries with this field name! It would be cool if

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Re-indexing would take a lot of time. In fact I need this change just for the Query parser class, to be able to make queries such as kw:blah. Now my field is called "org.mycompany.mediafield.keyword". Not very easy to make queries with this field name! It would be cool if QueryParser h

Re: How to rename fields in an index

2007-08-22 Thread Andrzej Bialecki
Erick Erickson wrote: Unless it's really, really, really prohibitive or impossible, I'd recommend regenerating your index. Messing around in the low-level file formats is just asking for trouble. Not to mention that you'll probably have to remanufcture your index sometime, somewhere and hack all

Re: How to rename fields in an index

2007-08-22 Thread Erick Erickson
Unless it's really, really, really prohibitive or impossible, I'd recommend regenerating your index. Messing around in the low-level file formats is just asking for trouble. Not to mention that you'll probably have to remanufcture your index sometime, somewhere and hack all over again or *hope* tha

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Thanks! -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax.: +32 2 648 16 53 On 22 Aug 2007, at 14:03, Andrzej Bialecki wrote: Antoine Baudoux wrote: No, i just want to change the field labels. For example, i have a "Keyword" field that i w

Re: How to rename fields in an index

2007-08-22 Thread Andrzej Bialecki
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 seg

Re: How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
L PROTECTED]> <[EMAIL PROTECTED]> wrote: Document.removefield() Then, add() ? Is this your mean? -Original Message- From: Antoine Baudoux [mailto:[EMAIL PROTECTED] Sent: 2007年8月22日 3:55 下午好,Daniel To: java-user@lucene.apache.org Subject: How to rename fields in an index Is it

RE: How to rename fields in an index

2007-08-22 Thread Jun.Chen
Document.removefield() Then, add() ? Is this your mean? -Original Message- From: Antoine Baudoux [mailto:[EMAIL PROTECTED] Sent: 2007年8月22日 3:55 下午好,Daniel To: java-user@lucene.apache.org Subject: How to rename fields in an index Is it possible to rename fields in an existing index

How to rename fields in an index

2007-08-22 Thread Antoine Baudoux
Is it possible to rename fields in an existing index without having to re-index all documents? thx -- Antoine Baudoux Development Manager [EMAIL PROTECTED] Tél.: +32 2 333 58 44 GSM: +32 499 534 538 Fax.: +32 2 648 16 53