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 DHIVYA M <dh...@yahoo.com> on 2009/10/28 06:55:00 UTC

What is multiple indexing and how does it work in Lucene [Java]

Can anyone tell me what is multiple indexing and how does it work in lucene [Java].
 
Kindly provide the informations either the explanation or any source for such details.
 
Thanx in advance


      

Re: Can anyone help me to implement highlighter in lucene 2.3.2

Posted by Chris Hostetter <ho...@fucit.org>.
: Subject: Can anyone help me to implement highlighter in lucene 2.3.2 
: In-Reply-To:  <86...@mail.gmail.com> 

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is "hidden" in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.
See Also:  http://en.wikipedia.org/wiki/Thread_hijacking





-Hoss


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


Can anyone help me to implement highlighter in lucene 2.3.2

Posted by DHIVYA M <dh...@yahoo.com>.
Hi all,
 
Am using lucene 2.3.2
I would like to have the search result similar to that of the google response.
On my study i found that highlighter could do this. I found the highlighter class available in the contrib folder of lucene 2.3.2 .zip.
 
But am blind about using it to get the desired response as that of google.
 
Kindly help me in this regard
 
Thanks in advance,
M.Dhivya


--- On Fri, 30/10/09, Anshum <an...@gmail.com> wrote:


From: Anshum <an...@gmail.com>
Subject: Re: soln found for index overwritting problem
To: java-user@lucene.apache.org
Date: Friday, 30 October, 2009, 7:21 AM


The only way to do it is to index a field (self maintained primary key) with
each document and do a deleteDocument (or updateDocument) for each document
before adding it.
Something like
*writer.deleteDocument(new Term("term-key","unique-id"));*
*writer.addDocument(d);*
This should help.
--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Oct 30, 2009 at 12:20 PM, DHIVYA M <dh...@yahoo.com>wrote:

> Thanks a lot sir. Its working out well.
>
> But i have one more doubt.
> Is it possible to check whether the same documents are indexed again and
> again?
> bcos due to appending of indexes,
> when i search a query,
> the result is displayed as much number of times as the index is created for
> that document.
>
> how to solve this sir
>
> Is it possible to remove duplicates with a flag in indexwriter?
>
> Kindly let me know about this.
>
> Thanks in advance
> M.Dhivya
>
>
>      Keep up with people you care about with Yahoo! India Mail. Learn how.
> http://in.overview.mail.yahoo.com/connectmore



      From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew

Re: soln found for index overwritting problem

Posted by Anshum <an...@gmail.com>.
The only way to do it is to index a field (self maintained primary key) with
each document and do a deleteDocument (or updateDocument) for each document
before adding it.
Something like
*writer.deleteDocument(new Term("term-key","unique-id"));*
*writer.addDocument(d);*
This should help.
--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Oct 30, 2009 at 12:20 PM, DHIVYA M <dh...@yahoo.com>wrote:

> Thanks a lot sir. Its working out well.
>
> But i have one more doubt.
> Is it possible to check whether the same documents are indexed again and
> again?
> bcos due to appending of indexes,
> when i search a query,
> the result is displayed as much number of times as the index is created for
> that document.
>
> how to solve this sir
>
> Is it possible to remove duplicates with a flag in indexwriter?
>
> Kindly let me know about this.
>
> Thanks in advance
> M.Dhivya
>
>
>      Keep up with people you care about with Yahoo! India Mail. Learn how.
> http://in.overview.mail.yahoo.com/connectmore

Re: soln found for index overwritting problem

Posted by DHIVYA M <dh...@yahoo.com>.
Thanks a lot sir. Its working out well.
 
But i have one more doubt.
Is it possible to check whether the same documents are indexed again and again?
bcos due to appending of indexes,
when i search a query,
the result is displayed as much number of times as the index is created for that document.

how to solve this sir
 
Is it possible to remove duplicates with a flag in indexwriter?
 
Kindly let me know about this.
 
Thanks in advance
M.Dhivya


      Keep up with people you care about with Yahoo! India Mail. Learn how. http://in.overview.mail.yahoo.com/connectmore

soln found for overwritten problem

Posted by DHIVYA M <dh...@yahoo.com>.
Let me try out and get back to you sir
 
Thanks
M.Dhivya

--- On Fri, 30/10/09, Anshum <an...@gmail.com> wrote:


From: Anshum <an...@gmail.com>
Subject: Re: What is multiple indexing and how does it work in Lucene [Java]
To: java-user@lucene.apache.org
Date: Friday, 30 October, 2009, 6:23 AM


In case you are trying to say that in subsequent runs, the previous state of
the index just goes off, its because the indexwriter gets opened with
'create new' flag as true. In other words, the index would be newly created
overwriting any existing index at the directory location.
The solution to this would be to open the indexwriter with the createnew
flag as false.
*public IndexWriter(String path,*
*                   Analyzer a,*
*                   boolean create)*
*            throws IOException*
This should solve your problem.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Oct 30, 2009 at 11:43 AM, DHIVYA M <dh...@yahoo.com>wrote:

> The question is indeed wrong. Sry for the inconvenience. Actually i should
> have asked this way!
>
> Am trying out executing the demo of lucene 1.4.3.
> When i run a file for the first time, the index is properly getting
> created.
> When i run the indexing for the second time with a different file, the file
> "_1" , a CFS file in the index folder is getting overwritten, i.e. i couldnt
> find the index created for the previous file i used.
>
> So kindly let me know about the cause of this problem and a solution too.
>
> I would also be happy if anyone let me know from which version the index
> will be appended.
>
> Thanks in advance.
> M.Dhivya
>
>
>      From cricket scores to your friends. Try the Yahoo! India Homepage!
> http://in.yahoo.com/trynew



      From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew

Re: What is multiple indexing and how does it work in Lucene [Java]

Posted by Anshum <an...@gmail.com>.
In case you are trying to say that in subsequent runs, the previous state of
the index just goes off, its because the indexwriter gets opened with
'create new' flag as true. In other words, the index would be newly created
overwriting any existing index at the directory location.
The solution to this would be to open the indexwriter with the createnew
flag as false.
*public IndexWriter(String path,*
*                   Analyzer a,*
*                   boolean create)*
*            throws IOException*
This should solve your problem.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Oct 30, 2009 at 11:43 AM, DHIVYA M <dh...@yahoo.com>wrote:

> The question is indeed wrong. Sry for the inconvenience. Actually i should
> have asked this way!
>
> Am trying out executing the demo of lucene 1.4.3.
> When i run a file for the first time, the index is properly getting
> created.
> When i run the indexing for the second time with a different file, the file
> "_1" , a CFS file in the index folder is getting overwritten, i.e. i couldnt
> find the index created for the previous file i used.
>
> So kindly let me know about the cause of this problem and a solution too.
>
> I would also be happy if anyone let me know from which version the index
> will be appended.
>
> Thanks in advance.
> M.Dhivya
>
>
>      From cricket scores to your friends. Try the Yahoo! India Homepage!
> http://in.yahoo.com/trynew

Re: What is multiple indexing and how does it work in Lucene [Java]

Posted by DHIVYA M <dh...@yahoo.com>.
The question is indeed wrong. Sry for the inconvenience. Actually i should have asked this way!
 
Am trying out executing the demo of lucene 1.4.3.
When i run a file for the first time, the index is properly getting created.
When i run the indexing for the second time with a different file, the file "_1" , a CFS file in the index folder is getting overwritten, i.e. i couldnt find the index created for the previous file i used.
 
So kindly let me know about the cause of this problem and a solution too.
 
I would also be happy if anyone let me know from which version the index will be appended.
 
Thanks in advance.
M.Dhivya


      From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew

Re: What is multiple indexing and how does it work in Lucene [Java]

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, what do you mean by "multiple indexing"? Using more than one thread?
more than one processor? Searching across more than one index? Each of these
has a different answer...

Best
Erick

On Wed, Oct 28, 2009 at 1:55 AM, DHIVYA M <dh...@yahoo.com>wrote:

> Can anyone tell me what is multiple indexing and how does it work in lucene
> [Java].
>
> Kindly provide the informations either the explanation or any source for
> such details.
>
> Thanx in advance
>
>
>