You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Krishna Prasad Mekala <kr...@virtusa.com> on 2007/05/14 14:59:02 UTC

How to Update the Index once it is created

Hi All,

 

Thanks for your response. I have one more doubt. How can I update a
index once created from Oracle, instead of recreating the whole.
Whenever there is a change in the oracle table
(insertion/updation/deletion of a row) my application should update the
index.

 

Thanks in advance.

 

 

Krishna Prasad M

 


Re: How to Update the Index once it is created

Posted by Jyoti Narula Ranjan <jy...@netcore.co.in>.
Hi Krishna

I am also new to Lucene and it seems that the response to your query was
made directly to you.
May I request you to forward the replies to me as well, so I may refer
to these when needed.

Thanks
Regards
Jyoti
Krishna Prasad Mekala wrote:
> Hi All,
>
>  
>
> Thanks for your response. I have one more doubt. How can I update a
> index once created from Oracle, instead of recreating the whole.
> Whenever there is a change in the oracle table
> (insertion/updation/deletion of a row) my application should update the
> index.
>
>  
>
> Thanks in advance.
>
>  
>
>  
>
> Krishna Prasad M
>
>  
>
>
>   


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


Re: How to Update the Index once it is created

Posted by Emmanuel Bernard <em...@hibernate.org>.
The indexation part of Hibernate Search relies on Java Persistence  
API to triggers the index update transparently. Otherwise you can  
trigger it manually to follow the crawling approach (not transparent).
Event driven vs crawling driven index update have both use cases, I  
would not say that one is really more generic than the other.

Anyway, Krishna, if you use Lucene 2.1, I like the new  
IndexWriter.updateDocument APIs, it's really neat when you have one  
of the term representing your unique id (in your case that would be  
table name + id). I don't fit into those requirements but it would  
have saved me a lot of time if I did :D

Emmanuel

On 21 mai 07, at 17:09, Chris Lu wrote:

> Does it mandate you to pass data through Hibernate? This seems very
> similar to Compass' approach.
>
> I believe a more generic approach is to compare what's already indexed
> with what's changed or deleted, so you can use any framework to work
> with Lucene. And simply selecting the data and creating the index can
> avoid some specific framework limitation and easier to scale.  Also,
> re-indexing will also be easier.
>
> DBSight tracks changes through simple SQLs, hard-deleted or
> soft-deleted content, and do it very efficiently even for large number
> of documents.
>
> -- 
> Chris Lu
> -------------------------
> Instant Scalable Full-Text Search On Any Database/Application
> site: http://www.dbsight.net
> demo: http://search.dbsight.com
> Lucene Database Search in 3 minutes:
> http://wiki.dbsight.com/index.php? 
> title=Create_Lucene_Database_Search_in_3_minutes
>
> On 5/21/07, bhecht <bh...@ams-sys.com> wrote:
>>
>> If you are using Orcale and Lucene, check out
>> http://www.hibernate.org/410.html "Hibernate Search"  , this will
>> automaticly update your lucene index, on any change to your  
>> database table
>>
>> Erick Erickson wrote:
>> >
>> > You have to delete the old document and add it a new one.
>> >
>> > See IndexModifier class.
>> >
>> > There is no ability to modify a document in place.
>> >
>> > Best
>> > Erick
>> >
>> > On 5/14/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
>> >>
>> >> Hi All,
>> >>
>> >>
>> >>
>> >> Thanks for your response. I have one more doubt. How can I  
>> update a
>> >> index once created from Oracle, instead of recreating the whole.
>> >> Whenever there is a change in the oracle table
>> >> (insertion/updation/deletion of a row) my application should  
>> update the
>> >> index.
>> >>
>> >>
>> >>
>> >> Thanks in advance.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Krishna Prasad M
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context: http://www.nabble.com/How-to-Update- 
>> the-Index-once-it-is-created-tf3752208.html#a10724708
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: How to Update the Index once it is created

Posted by Chris Lu <ch...@gmail.com>.
Does it mandate you to pass data through Hibernate? This seems very
similar to Compass' approach.

I believe a more generic approach is to compare what's already indexed
with what's changed or deleted, so you can use any framework to work
with Lucene. And simply selecting the data and creating the index can
avoid some specific framework limitation and easier to scale.  Also,
re-indexing will also be easier.

DBSight tracks changes through simple SQLs, hard-deleted or
soft-deleted content, and do it very efficiently even for large number
of documents.

-- 
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes

On 5/21/07, bhecht <bh...@ams-sys.com> wrote:
>
> If you are using Orcale and Lucene, check out
> http://www.hibernate.org/410.html "Hibernate Search"  , this will
> automaticly update your lucene index, on any change to your database table
>
> Erick Erickson wrote:
> >
> > You have to delete the old document and add it a new one.
> >
> > See IndexModifier class.
> >
> > There is no ability to modify a document in place.
> >
> > Best
> > Erick
> >
> > On 5/14/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
> >>
> >> Hi All,
> >>
> >>
> >>
> >> Thanks for your response. I have one more doubt. How can I update a
> >> index once created from Oracle, instead of recreating the whole.
> >> Whenever there is a change in the oracle table
> >> (insertion/updation/deletion of a row) my application should update the
> >> index.
> >>
> >>
> >>
> >> Thanks in advance.
> >>
> >>
> >>
> >>
> >>
> >> Krishna Prasad M
> >>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-Update-the-Index-once-it-is-created-tf3752208.html#a10724708
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Re: How to Update the Index once it is created

Posted by bhecht <bh...@ams-sys.com>.
If you are using Orcale and Lucene, check out 
http://www.hibernate.org/410.html "Hibernate Search"  , this will
automaticly update your lucene index, on any change to your database table

Erick Erickson wrote:
> 
> You have to delete the old document and add it a new one.
> 
> See IndexModifier class.
> 
> There is no ability to modify a document in place.
> 
> Best
> Erick
> 
> On 5/14/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
>>
>> Hi All,
>>
>>
>>
>> Thanks for your response. I have one more doubt. How can I update a
>> index once created from Oracle, instead of recreating the whole.
>> Whenever there is a change in the oracle table
>> (insertion/updation/deletion of a row) my application should update the
>> index.
>>
>>
>>
>> Thanks in advance.
>>
>>
>>
>>
>>
>> Krishna Prasad M
>>
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Update-the-Index-once-it-is-created-tf3752208.html#a10724708
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: How to Update the Index once it is created

Posted by Erick Erickson <er...@gmail.com>.
You have to delete the old document and add it a new one.

See IndexModifier class.

There is no ability to modify a document in place.

Best
Erick

On 5/14/07, Krishna Prasad Mekala <kr...@virtusa.com> wrote:
>
> Hi All,
>
>
>
> Thanks for your response. I have one more doubt. How can I update a
> index once created from Oracle, instead of recreating the whole.
> Whenever there is a change in the oracle table
> (insertion/updation/deletion of a row) my application should update the
> index.
>
>
>
> Thanks in advance.
>
>
>
>
>
> Krishna Prasad M
>
>
>
>