lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter M Cipollone" <...@bihvhar.com>
Subject Re: Searching against Database
Date Fri, 16 Jul 2004 00:05:18 GMT

----- Original Message ----- 
From: "Hetan Shah" <Hetan.Shah@Sun.COM>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Thursday, July 15, 2004 7:51 PM
Subject: Re: Searching against Database


> Is it possible to search against the column in the table ? If so are
> there any limitations on the # of columns one should target to search
> against?

What you can search against all depends on how you index your columns.  I
believe you mentioned that you had data in multiple tables for each record
(or Document in Lucene).  If you map your your columns to Lucene Fields, and
make sure that the primary key for each record is stored in the same Lucene
Document object as the columns (Fields), then you should be golden.

Someone earlier pointed out that Oracle allows Java in its stored
procedures, so if you use a single stored procedure to insert a new record,
that same procedure can create a matching Lucene Document and add it to the
index.

For updates, you will need to delete the Lucene document and then add a new
copy of the updated record.  If you have a primary key field that is indexed
and stored in Lucene, you can use

http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexReader.html#delete(org.apache.lucene.index.Term)

to delete the old version.

Pete




>
> any other suggestions?
> Thanks.
> -H
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message