lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sol myr <>
Subject Maintaining index for "flattened" database tables
Date Thu, 13 Jan 2011 12:10:29 GMT

Our main data storage is MySql tables.
We index it on Lucene in order to improve the search (boosting, proximate spelling, etc).
We naturally maintain it - for example, to insert a new "Contract" entity, we have:
addContract(Contract cont){
     // INSERT into MySQL:; 
     // Index in Lucene:
     Document d=new Document();
     d.addField(new Field ("title", cont.getTitle()...)    
     d.addField(new Field ("body", cont.getBody()...)    

This works, but becomes a maintenance nightmare when the index fields are collected from JOINS.
For example, we also want Lucene to search contracts by "author name", which is taken from
another table AUTHOR (through Foreign Key). And then if the author name changes (e.g. through
marriage), you must remember to re-index all her contracts...!

Does anyone have experience with such database/lucene combination, and knows of a solution
that would be reasonable to maintain?

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