writer.updateDocument(new Term("id", ""+i), doc);
Read the javadocs! Haven't we been here before?
--
Ian.
On Fri, Dec 4, 2009 at 10:30 AM, m.harig wrote:
>
> hello all
>
> how do i update my existing index to avoid my duplicates , this is
> how am doing my indexing
>
> doc.add(new F
BTW Erick this works brilliantly with UN_TOKENIZED. SUPER fast :)
On 2/25/07, Erick Erickson <[EMAIL PROTECTED]> wrote:
Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able
to fetch it with TermDocs/TermEnum! The loop I posted works like this
for each term in the ind
Daniel Noll <[EMAIL PROTECTED]> wrote on 01/03/2007 22:10:15:
> > API IndexWriter.updateDocument() may be useful.
>
> Whoa, nice convenience method.
>
> I don't suppose the new document happens to be given the same ID as the
> old one. That would make many people's lives much easier. :-)
Oh no,
Doron Cohen wrote:
Once indexing the database_id field this way, also the newly added
API IndexWriter.updateDocument() may be useful.
Whoa, nice convenience method.
I don't suppose the new document happens to be given the same ID as the
old one. That would make many people's lives much easie
Yes correct, I'll be using the new updateDocument() api call!
Erick thanks for correcting my poor use of termdocs :)
On 2/27/07, Doron Cohen <[EMAIL PROTECTED]> wrote:
"Erick Erickson" <[EMAIL PROTECTED]> wrote on 25/02/2007 07:05:21:
> Yes, I'm pretty sure you have to index the field (UN_TOK
"Erick Erickson" <[EMAIL PROTECTED]> wrote on 25/02/2007 07:05:21:
> Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be
able
> to fetch it with TermDocs/TermEnum! The loop I posted works like this
Once indexing the database_id field this way, also the newly added
API IndexW
Yes, I'm pretty sure you have to index the field (UN_TOKENIZED) to be able
to fetch it with TermDocs/TermEnum! The loop I posted works like this
for each term in the index for the field
if this is one I want to update
use a TermDocs to get to that document and operate on it.
But
I didn't fully understand your last post and why I wanted to do
IndexReader.terms() then IndexReader.termDocs(). Won't something like this
work?
for (Business biz : updates)
{
Term t = new Term("id", biz.getId()+"");
TermDocs tDocs = reader.termDocs(t);
I think you can get MUCH better efficiency by using TermEnum/TermDocs. But I
think you need to index (UN_TOKENIZED) your primary key (although now I'm
not sure. But I'd be surprised if TermEnum worked with un-indexed data.
Still, it'd be worth trying but I've always assumed that TermEnums only
wor
My approach, which I think is common, is to use Quartz sheduler.
Chris
-
Instant Lucene Search on Any Databases/Applications
http://www.dbsight.net
On 6/12/06, Van Nguyen <[EMAIL PROTECTED]> wrote:
I've been playing around with Lucene for a while now. I'm pretty
com
On 5/3/06, Kiran Joisher <[EMAIL PROTECTED]> wrote:
I m working on a project where I will use lucene to make a search engine on
a database. I am new to lucene. I wrote a test program which indexes a table
and searches the same.. but now I m stuck on how to update the index in case
a database chan
Thanks Stephen,
This was really helpful.
Cheers,
--Kiran
-Original Message-
From: Stephen Gray [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 04, 2006 4:11 AM
To: java-user@lucene.apache.org
Subject: Re: Updating index if there is a database changes
Hi Kirin,
Once you've up
Hi Kirin,
Once you've updated an index using IndexWriter or IndexReader you just need
to close and re-open your IndexSearcher so that searching includes the
changes. There is a great library callled LuceIndexAccessor at the link
below that manages this for you. It creates an IndexReader/Writer
My approach is to select documents ordered by updated_date desc
And only process documents newer than the ones already in the index.
Chris Lu
Full-Text Lucene Search for Any Databases/Applications
http://www.dbsight.net
On 5/3/06, Kiran Joisher <[EMAIL PROTE
Revati,
This sounds like a Hibernate problem, I suggest you refer to their
documentation and forum.
-Grant
revati joshi wrote:
Hi,
i hve tried updating lucene index using Hibernate lifecycle class but
not able to get the implementation of this class.
www.hibernate.org - Using Lifec
pashupathinath writes:
>how can i traverse through the values stored in the
> index and make sure that the new records are not
> duplicated ? once i encounter the duplicate primary
> key, i should be able to delete all the various fields
> values associated with that primary key.
>
There's
On Friday 08 April 2005 07:42, pashupathinath wrote:
> hi,
> i've created an index for database records. the
> problem is whenever i'm trying to update the database,
> i mean adding or deleting records from the database i
> want the index to be updated too.
>right now, i am adding new documen
17 matches
Mail list logo