Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
//Old reader is closed. } reader = new; Regards Ganesh ----- Original Message - From: "Amin Mohammed-Coleman" < ami...@gmail.com> To: Cc: Sent: Wednesday, January 21, 2009 1:07 AM Subject: Re: Indexing and Searching Web Application Hi Yes I am using the reopen method on

Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
(); if (new != reader) { ... // reader was reopened reader.close(); //Old reader is closed. } reader = new; Regards Ganesh ----- Original Message - From: "Amin Mohammed-Coleman" < ami...@gmail.com> To: Cc: Sent: Wednesday, January 21, 2009 1:07 AM Subject: Re: Indexin

Re: Indexing and Searching Web Application

2009-01-21 Thread Erick Erickson
; >>>>> } >>>>> >>>>> >>>>> First search works ok, susequent search result in: >>>>> >>>>> >>>>> org.apache.lucene.store.AlreadyClosedException: this IndexReader is >>>>> closed >

Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
//Old reader is closed. } reader = new; Regards Ganesh - Original Message - From: "Amin Mohammed-Coleman" < ami...@gmail.com> To: Cc: Sent: Wednesday, January 21, 2009 1:07 AM Subject: Re: Indexing and Searching Web Application Hi Yes I am using the reopen method on inde

Re: Indexing and Searching Web Application

2009-01-21 Thread Ian Lea
;>>> Hi >>>> Will give that a go. >>>> >>>> Thanks >>>> >>>> Sent from my iPhone >>>> >>>> On 21 Jan 2009, at 12:26, "Ganesh" wrote: >>>> >>>> I am closing the old r

Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
med-Coleman" < ami...@gmail.com> To: Cc: Sent: Wednesday, January 21, 2009 1:07 AM Subject: Re: Indexing and Searching Web Application Hi Yes I am using the reopen method on indexreader. I am not closing the old indexer as per Ganesh's instruction. It seems to be working

Re: Indexing and Searching Web Application

2009-01-21 Thread Ian Lea
er = ... >>> ... >>> IndexReader new = r.reopen(); >>> if (new != reader) { >>> ... // reader was reopened >>> reader.close(); //Old reader is closed. >>> } >>> reader = new; >>> >>> Regards >>> Ganesh >&g

Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
Ganesh >> >> - Original Message - From: "Amin Mohammed-Coleman" < >> ami...@gmail.com> >> To: >> Cc: >> Sent: Wednesday, January 21, 2009 1:07 AM >> >> Subject: Re: Indexing and Searching Web Application >> >&

Re: Indexing and Searching Web Application

2009-01-21 Thread Amin Mohammed-Coleman
ic" wrote: There's a reopen() method in the IndexReader class. You can use that. -Original Message- From: Amin Mohammed-Coleman [mailto:ami...@gmail.com] Sent: Tuesday, January 20, 2009 5:02 AM To: java-user@lucene.apache.org Subject: Re: Indexing and Searching Web Applicatio

Re: Indexing and Searching Web Application

2009-01-21 Thread Ganesh
reader is closed. } reader = new; Regards Ganesh - Original Message - From: "Amin Mohammed-Coleman" To: Cc: Sent: Wednesday, January 21, 2009 1:07 AM Subject: Re: Indexing and Searching Web Application Hi Yes I am using the reopen method on indexreader. I am not closin

Re: Indexing and Searching Web Application

2009-01-20 Thread Amin Mohammed-Coleman
a reopen() method in the IndexReader class. You can use that. -Original Message- From: Amin Mohammed-Coleman [mailto:ami...@gmail.com] Sent: Tuesday, January 20, 2009 5:02 AM To: java-user@lucene.apache.org Subject: Re: Indexing and Searching Web Application Am I supposed to close the oldIndexReade

RE: Indexing and Searching Web Application

2009-01-20 Thread Angel, Eric
There's a reopen() method in the IndexReader class. You can use that. -Original Message- From: Amin Mohammed-Coleman [mailto:ami...@gmail.com] Sent: Tuesday, January 20, 2009 5:02 AM To: java-user@lucene.apache.org Subject: Re: Indexing and Searching Web Application Am I suppos

Re: Indexing and Searching Web Application

2009-01-20 Thread Amin Mohammed-Coleman
Message - From: "Amin Mohammed-Coleman" < > ami...@gmail.com> > To: > Sent: Tuesday, January 20, 2009 1:38 PM > Subject: Re: Indexing and Searching Web Application > > > > Hi >> >> After your email I had a look around and came up with

Re: Indexing and Searching Web Application

2009-01-20 Thread Ganesh
IndexSearcher(newIndexReader); } Regards Ganesh - Original Message - From: "Amin Mohammed-Coleman" To: Sent: Tuesday, January 20, 2009 1:38 PM Subject: Re: Indexing and Searching Web Application Hi After your email I had a look around and came up with the below solution (I'm n

Re: Indexing and Searching Web Application

2009-01-20 Thread Amin Mohammed-Coleman
Hi After your email I had a look around and came up with the below solution (I'm not sure if this is the right approach or there is a performance implication to doing this) public Summary[] search(SearchRequest searchRequest) { List summaryList = new ArrayList();

Re: Indexing and Searching Web Application

2009-01-19 Thread Amin Mohammed-Coleman
Hi Thanks for your reply. I originally explicitly closed the multisearcher but this caused problem in that first search would work and then subsequent searches would cause an IndexReaderClosedException. I sent an email to the mailing group on what the best practice is on whether to close

Re: Indexing and Searching Web Application

2009-01-19 Thread Amin Mohammed-Coleman
Sent from my iPhone On 19 Jan 2009, at 23:23, Greg Shackles wrote: I just quickly skimmed the code since I don't have much time right now but it looks like you are keeping an array of IndexSearchers open that you re-use in this search function, right? If that's the case, you need to tel

Re: Indexing and Searching Web Application

2009-01-19 Thread Greg Shackles
I just quickly skimmed the code since I don't have much time right now but it looks like you are keeping an array of IndexSearchers open that you re-use in this search function, right? If that's the case, you need to tell those IndexSearchers to re-open the indexes because they have changed since

Re: Indexing and Searching Web Application

2009-01-19 Thread Amin Mohammed-Coleman
I make a call to my search class which looks like this: public Summary[] search(SearchRequest searchRequest) { List summaryList = new ArrayList(); StopWatch stopWatch = new StopWatch("searchStopWatch"); stopWatch.start(); MultiSearc

Re: Indexing and Searching Web Application

2009-01-19 Thread Greg Shackles
After you make the commit to the index, are you reloading the index in the searchers? - Greg On Mon, Jan 19, 2009 at 3:29 PM, Amin Mohammed-Coleman wrote: > Hi > > I have recently worked on developing an application which allows you to > upload a file (which is indexed so you can search later).

Indexing and Searching Web Application

2009-01-19 Thread Amin Mohammed-Coleman
Hi I have recently worked on developing an application which allows you to upload a file (which is indexed so you can search later). I have numerous tests to show that you can index and search documents (in some instances within the same test), however when I perform the operation in the