updating Lucene Index

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

updating Lucene Index

Kodumuri, Madhavi
Hi,

My Lucene Indexer indexes from scratch with no problem. But I would like
to update the index database next time I run Indexer rather than
deleting the database and creating index from scratch every time I run
the Indexer. Is there any Update methods?
Any help appreciated,

Thanks,

Madhavi Kodumuri

Reply | Threaded
Open this post in threaded view
|

Re: updating Lucene Index

Fredrik Andersson-2-2
Hi,

Use the IndexModifier class?

On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:

>
> Hi,
>
> My Lucene Indexer indexes from scratch with no problem. But I would like
> to update the index database next time I run Indexer rather than
> deleting the database and creating index from scratch every time I run
> the Indexer. Is there any Update methods?
> Any help appreciated,
>
> Thanks,
>
> Madhavi Kodumuri
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Koji Sekiguchi-4
even if you use IndexModifier class,
you should delete then addDoc the document to be updated.

Thanks,

Koji

> -----Original Message-----
> From: Fredrik Andersson [mailto:[hidden email]]
> Sent: Wednesday, January 25, 2006 6:58 AM
> To: [hidden email]
> Subject: Re: updating Lucene Index
>
>
> Hi,
>
> Use the IndexModifier class?
>
> On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> >
> > Hi,
> >
> > My Lucene Indexer indexes from scratch with no problem. But I would like
> > to update the index database next time I run Indexer rather than
> > deleting the database and creating index from scratch every time I run
> > the Indexer. Is there any Update methods?
> > Any help appreciated,
> >
> > Thanks,
> >
> > Madhavi Kodumuri
> >
> >
> >
>


Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Kodumuri, Madhavi
In reply to this post by Kodumuri, Madhavi
You mean, whenever I have updated the document which is already indexed
have to be deleted first from the index database and then add that
document to my indexer.

Thanks,

Madhavi


-----Original Message-----
From: Koji Sekiguchi [mailto:[hidden email]]
Sent: Tuesday, January 24, 2006 4:04 PM
To: [hidden email]
Subject: RE: updating Lucene Index

even if you use IndexModifier class,
you should delete then addDoc the document to be updated.

Thanks,

Koji

> -----Original Message-----
> From: Fredrik Andersson [mailto:[hidden email]]
> Sent: Wednesday, January 25, 2006 6:58 AM
> To: [hidden email]
> Subject: Re: updating Lucene Index
>
>
> Hi,
>
> Use the IndexModifier class?
>
> On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> >
> > Hi,
> >
> > My Lucene Indexer indexes from scratch with no problem. But I would
like
> > to update the index database next time I run Indexer rather than
> > deleting the database and creating index from scratch every time I
run

> > the Indexer. Is there any Update methods?
> > Any help appreciated,
> >
> > Thanks,
> >
> > Madhavi Kodumuri
> >
> >
> >
>


Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Koji Sekiguchi-4
I mean what you said.
Sorry for my lack of explanation.

Many thanks,

Koji



Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Kodumuri, Madhavi
In reply to this post by Kodumuri, Madhavi
How do I delete a document from the already existing indexer, as I am
unable to get the indexed ID for that document.

Thanks for your help,

Madhavi


-----Original Message-----
From: Koji Sekiguchi [mailto:[hidden email]]
Sent: Tuesday, January 24, 2006 4:04 PM
To: [hidden email]
Subject: RE: updating Lucene Index

even if you use IndexModifier class,
you should delete then addDoc the document to be updated.

Thanks,

Koji

> -----Original Message-----
> From: Fredrik Andersson [mailto:[hidden email]]
> Sent: Wednesday, January 25, 2006 6:58 AM
> To: [hidden email]
> Subject: Re: updating Lucene Index
>
>
> Hi,
>
> Use the IndexModifier class?
>
> On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> >
> > Hi,
> >
> > My Lucene Indexer indexes from scratch with no problem. But I would
like
> > to update the index database next time I run Indexer rather than
> > deleting the database and creating index from scratch every time I
run

> > the Indexer. Is there any Update methods?
> > Any help appreciated,
> >
> > Thanks,
> >
> > Madhavi Kodumuri
> >
> >
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: updating Lucene Index

Fredrik Andersson-2-2
You can delete by any unique term, using an IndexReader. I think this method
is wrapped in IndexModifier as well, not sure. If it isn't, just use an
IndexReader.

yourIndexReader.delete(new Term("yourUniqueField", "yourUniqueValue"));

Fredrik

On 1/26/06, Kodumuri, Madhavi <[hidden email]> wrote:

>
> How do I delete a document from the already existing indexer, as I am
> unable to get the indexed ID for that document.
>
> Thanks for your help,
>
> Madhavi
>
>
> -----Original Message-----
> From: Koji Sekiguchi [mailto:[hidden email]]
> Sent: Tuesday, January 24, 2006 4:04 PM
> To: [hidden email]
> Subject: RE: updating Lucene Index
>
> even if you use IndexModifier class,
> you should delete then addDoc the document to be updated.
>
> Thanks,
>
> Koji
>
> > -----Original Message-----
> > From: Fredrik Andersson [mailto:[hidden email]]
> > Sent: Wednesday, January 25, 2006 6:58 AM
> > To: [hidden email]
> > Subject: Re: updating Lucene Index
> >
> >
> > Hi,
> >
> > Use the IndexModifier class?
> >
> > On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > My Lucene Indexer indexes from scratch with no problem. But I would
> like
> > > to update the index database next time I run Indexer rather than
> > > deleting the database and creating index from scratch every time I
> run
> > > the Indexer. Is there any Update methods?
> > > Any help appreciated,
> > >
> > > Thanks,
> > >
> > > Madhavi Kodumuri
> > >
> > >
> > >
> >
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Kodumuri, Madhavi
In reply to this post by Kodumuri, Madhavi
I tried doing this, but I guess I am doing something wrong. This is my
snippet, can you please let me know what I was doing wrong.

Index_path is the path for the index database
url is the one of the Field in my Documents  I added,

Directory dir = FSDirectory.getDirectory(index_path, false);
      reader = reader.open(dir);
     if (reader != null) {
        reader.open(index_path);
        String tempUrl = ServerName + url;
        Term term = new Term("url",tempUrl);
        reader.delete(term);
      }

Thanks in advance,
Madhavi

-----Original Message-----
From: Fredrik Andersson [mailto:[hidden email]]
Sent: Thursday, January 26, 2006 2:28 PM
To: [hidden email]
Subject: Re: updating Lucene Index

You can delete by any unique term, using an IndexReader. I think this
method
is wrapped in IndexModifier as well, not sure. If it isn't, just use an
IndexReader.

yourIndexReader.delete(new Term("yourUniqueField", "yourUniqueValue"));

Fredrik

On 1/26/06, Kodumuri, Madhavi <[hidden email]> wrote:

>
> How do I delete a document from the already existing indexer, as I am
> unable to get the indexed ID for that document.
>
> Thanks for your help,
>
> Madhavi
>
>
> -----Original Message-----
> From: Koji Sekiguchi [mailto:[hidden email]]
> Sent: Tuesday, January 24, 2006 4:04 PM
> To: [hidden email]
> Subject: RE: updating Lucene Index
>
> even if you use IndexModifier class,
> you should delete then addDoc the document to be updated.
>
> Thanks,
>
> Koji
>
> > -----Original Message-----
> > From: Fredrik Andersson [mailto:[hidden email]]
> > Sent: Wednesday, January 25, 2006 6:58 AM
> > To: [hidden email]
> > Subject: Re: updating Lucene Index
> >
> >
> > Hi,
> >
> > Use the IndexModifier class?
> >
> > On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > My Lucene Indexer indexes from scratch with no problem. But I
would

> like
> > > to update the index database next time I run Indexer rather than
> > > deleting the database and creating index from scratch every time I
> run
> > > the Indexer. Is there any Update methods?
> > > Any help appreciated,
> > >
> > > Thanks,
> > >
> > > Madhavi Kodumuri
> > >
> > >
> > >
> >
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: updating Lucene Index

Charles.Sanders
In reply to this post by Kodumuri, Madhavi
Looks OK to me.  Only thing I question is
reader = reader.open(dir);

This should an IndexReader.
reader = IndexReader.open(dir)


Charles Sanders



-----Original Message-----
From: Kodumuri, Madhavi [mailto:[hidden email]]
Sent: Friday, January 27, 2006 4:27 PM
To: [hidden email]
Subject: RE: updating Lucene Index

I tried doing this, but I guess I am doing something wrong. This is my
snippet, can you please let me know what I was doing wrong.

Index_path is the path for the index database url is the one of the
Field in my Documents  I added,

Directory dir = FSDirectory.getDirectory(index_path, false);
      reader = reader.open(dir);
     if (reader != null) {
        reader.open(index_path);
        String tempUrl = ServerName + url;
        Term term = new Term("url",tempUrl);
        reader.delete(term);
      }

Thanks in advance,
Madhavi

-----Original Message-----
From: Fredrik Andersson [mailto:[hidden email]]
Sent: Thursday, January 26, 2006 2:28 PM
To: [hidden email]
Subject: Re: updating Lucene Index

You can delete by any unique term, using an IndexReader. I think this
method is wrapped in IndexModifier as well, not sure. If it isn't, just
use an IndexReader.

yourIndexReader.delete(new Term("yourUniqueField", "yourUniqueValue"));

Fredrik

On 1/26/06, Kodumuri, Madhavi <[hidden email]> wrote:

>
> How do I delete a document from the already existing indexer, as I am
> unable to get the indexed ID for that document.
>
> Thanks for your help,
>
> Madhavi
>
>
> -----Original Message-----
> From: Koji Sekiguchi [mailto:[hidden email]]
> Sent: Tuesday, January 24, 2006 4:04 PM
> To: [hidden email]
> Subject: RE: updating Lucene Index
>
> even if you use IndexModifier class,
> you should delete then addDoc the document to be updated.
>
> Thanks,
>
> Koji
>
> > -----Original Message-----
> > From: Fredrik Andersson [mailto:[hidden email]]
> > Sent: Wednesday, January 25, 2006 6:58 AM
> > To: [hidden email]
> > Subject: Re: updating Lucene Index
> >
> >
> > Hi,
> >
> > Use the IndexModifier class?
> >
> > On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > My Lucene Indexer indexes from scratch with no problem. But I
would

> like
> > > to update the index database next time I run Indexer rather than
> > > deleting the database and creating index from scratch every time I
> run
> > > the Indexer. Is there any Update methods?
> > > Any help appreciated,
> > >
> > > Thanks,
> > >
> > > Madhavi Kodumuri
> > >
> > >
> > >
> >
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: updating Lucene Index

Otis Gospodnetic-2
In reply to this post by Kodumuri, Madhavi
I haven't followed the whole thread, but this looks weird:

      reader = reader.open(dir);
     if (reader != null) {
        reader.open(index_path);

reader.open called twice?  Why?

Also, you'll get more help on java-user@lucene... list.

Otis

----- Original Message ----
From: "Kodumuri, Madhavi" <[hidden email]>
To: [hidden email]
Sent: Fri 27 Jan 2006 04:26:44 PM EST
Subject: RE: updating Lucene Index

I tried doing this, but I guess I am doing something wrong. This is my
snippet, can you please let me know what I was doing wrong.

Index_path is the path for the index database
url is the one of the Field in my Documents  I added,

Directory dir = FSDirectory.getDirectory(index_path, false);
      reader = reader.open(dir);
     if (reader != null) {
        reader.open(index_path);
        String tempUrl = ServerName + url;
        Term term = new Term("url",tempUrl);
        reader.delete(term);
      }

Thanks in advance,
Madhavi

-----Original Message-----
From: Fredrik Andersson [mailto:[hidden email]]
Sent: Thursday, January 26, 2006 2:28 PM
To: [hidden email]
Subject: Re: updating Lucene Index

You can delete by any unique term, using an IndexReader. I think this
method
is wrapped in IndexModifier as well, not sure. If it isn't, just use an
IndexReader.

yourIndexReader.delete(new Term("yourUniqueField", "yourUniqueValue"));

Fredrik

On 1/26/06, Kodumuri, Madhavi <[hidden email]> wrote:

>
> How do I delete a document from the already existing indexer, as I am
> unable to get the indexed ID for that document.
>
> Thanks for your help,
>
> Madhavi
>
>
> -----Original Message-----
> From: Koji Sekiguchi [mailto:[hidden email]]
> Sent: Tuesday, January 24, 2006 4:04 PM
> To: [hidden email]
> Subject: RE: updating Lucene Index
>
> even if you use IndexModifier class,
> you should delete then addDoc the document to be updated.
>
> Thanks,
>
> Koji
>
> > -----Original Message-----
> > From: Fredrik Andersson [mailto:[hidden email]]
> > Sent: Wednesday, January 25, 2006 6:58 AM
> > To: [hidden email]
> > Subject: Re: updating Lucene Index
> >
> >
> > Hi,
> >
> > Use the IndexModifier class?
> >
> > On 1/24/06, Kodumuri, Madhavi <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > My Lucene Indexer indexes from scratch with no problem. But I
would

> like
> > > to update the index database next time I run Indexer rather than
> > > deleting the database and creating index from scratch every time I
> run
> > > the Indexer. Is there any Update methods?
> > > Any help appreciated,
> > >
> > > Thanks,
> > >
> > > Madhavi Kodumuri
> > >
> > >
> > >
> >
>
>
>



Reply | Threaded
Open this post in threaded view
|

is that lucene support html file indexing with pic's.

sivan v
In reply to this post by Kodumuri, Madhavi
hello...
   
  is that lucene wil support the html files which containing the pictures?
   
  if i index  html file which contain only picture, lucene will index that or not..
  what way lucene will search those html documents..
  please Suggest me to proceed...
   
  by,
  Sivanarul.V ( VIT, Vellore, TN - India).

               
---------------------------------
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.
Reply | Threaded
Open this post in threaded view
|

RE: is that lucene support html file indexing with pic's.

Rajesh Munavalli
Hi Sivan,
         Lucene is text search engine.  If I understand it right, your aim is to search for image file names. Having said that, the html file containing references to pictures ("img" tag) should be analyzed accordingly. Modify the the Tokenizer/Analyzer code to extract the image file names from the "img" tag.

Hope that helps,

Rajesh Munavalli


-----Original Message-----
From: sivan v [mailto:[hidden email]]
Sent: Wed 2/1/2006 11:27 PM
To: [hidden email]
Subject: is that lucene support html file indexing with pic's.
 
hello...
   
  is that lucene wil support the html files which containing the pictures?
   
  if i index  html file which contain only picture, lucene will index that or not..
  what way lucene will search those html documents..
  please Suggest me to proceed...
   
  by,
  Sivanarul.V ( VIT, Vellore, TN - India).

               
---------------------------------
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.

Reply | Threaded
Open this post in threaded view
|

RE: is that lucene support html file indexing with pic's.

sivan v
thanks for ur repy mr.Rajesh Munavalli
 

 <[hidden email]> wrote:
  Hi Sivan,
Lucene is text search engine. If I understand it right, your aim is to search for image file names. Having said that, the html file containing references to pictures ("img" tag) should be analyzed accordingly. Modify the the Tokenizer/Analyzer code to extract the image file names from the "img" tag.

Hope that helps,

Rajesh Munavalli


-----Original Message-----
From: sivan v [mailto:[hidden email]]
Sent: Wed 2/1/2006 11:27 PM
To: [hidden email]
Subject: is that lucene support html file indexing with pic's.

hello...

is that lucene wil support the html files which containing the pictures?

if i index html file which contain only picture, lucene will index that or not..
what way lucene will search those html documents..
please Suggest me to proceed...

by,
Sivanarul.V ( VIT, Vellore, TN - India).


---------------------------------
Bring words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.




      Enduringly your's,
  V.Sivanarul.,M.Tech.




               
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!