lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lu" <>
Subject Re: Can a Lucene field be renamed in a Lucene index?
Date Thu, 30 Aug 2007 03:30:20 GMT
The easiest solution would be to change the SQL to
 select Bar as Foo, ..., from your_table

Use an alias and maintain everything as before.

If it's not a solution, you may need to re-index everything.

Chris Lu
Instant Scalable Full-Text Search On Any Database/Application
Lucene Database Search in 3 minutes:

On 8/29/07, George Aroush <> wrote:
> Hi everyone,
> I have the following need and I wander what are my options or if anyone
> run
> into it and has a solution / suggestion.
> I'm indexing a SQL database.  Each table is a Lucene index.  Now, in table
> "A", I have a field called "Foo".  When I index it into Lucene, I also end
> up with a field called "Foo".  Later on, the SQL database administrator,
> will change the field name from "Foo" to "Bar".  Once this happens, any
> new
> records added to table "A" will be indexed into Lucene as "Bar".
> The issue is this, Lucene index for table "A" now has documents with some
> having a field called "Foo" and others with "Bar".  This is problematic
> because now a user can't just search for "Foo:dog", but must search for
> "Foo:dog Bar:dog".
> So, what are my options here?  No, I can't re-index.  Ideally, I would
> like
> to be able to say to Lucene, "rename the field 'Foo' to 'Bar' in the index
> 'A'" (even if it means using private APIs).  Is this possible?  Have you
> run
> into this problem?  What was your solution?
> Regards,
> -- George
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message