Re: problem restoring index

2004-12-08 Thread Satoshi Hasegawa
   You cannot use a wild character as the first character of the search.
   http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
- Original Message - 
From: Santosh [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:21 PM
Subject: problem restoring index

hi,
when I restart the tomcat . the Index is getting corrupted. If I take the 
backup of Index and then restarting tomcat. the Index is not working 
properly.

Do I have to Index again all the documents whenever I restart the Tomcat?

---SOFTPRO DISCLAIMER--
Information contained in this E-MAIL and any attachments are
confidential being  proprietary to SOFTPRO SYSTEMS  is 'privileged'
and 'confidential'.
If you are not an intended or authorised recipient of this E-MAIL or
have received it in error, You are notified that any use, copying or
dissemination  of the information contained in this E-MAIL in any
manner whatsoever is strictly prohibited. Please delete it immediately
and notify the sender by E-MAIL.
In such a case reading, reproducing, printing or further dissemination
of this E-MAIL is strictly prohibited and may be unlawful.
SOFTPRO SYSYTEMS does not REPRESENT or WARRANT that an attachment
hereto is free from computer viruses or other defects.
The opinions expressed in this E-MAIL and any ATTACHEMENTS may be
those of the author and are not necessarily those of SOFTPRO SYSTEMS.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: searchig with special characters

2004-12-08 Thread Satoshi Hasegawa
   You cannot use a wild character as the first character of the search.
   http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
- Original Message - 
From: Santosh [EMAIL PROTECTED]
To: Lucene Users List [EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 6:24 PM
Subject: searchig with special characters

whenever I search with some special chracters like  *world   I am getting 
exception . how can I avoid this? and for what other characters lucene give 
this type of exceptions?

---SOFTPRO DISCLAIMER--
Information contained in this E-MAIL and any attachments are
confidential being  proprietary to SOFTPRO SYSTEMS  is 'privileged'
and 'confidential'.
If you are not an intended or authorised recipient of this E-MAIL or
have received it in error, You are notified that any use, copying or
dissemination  of the information contained in this E-MAIL in any
manner whatsoever is strictly prohibited. Please delete it immediately
and notify the sender by E-MAIL.
In such a case reading, reproducing, printing or further dissemination
of this E-MAIL is strictly prohibited and may be unlawful.
SOFTPRO SYSYTEMS does not REPRESENT or WARRANT that an attachment
hereto is free from computer viruses or other defects.
The opinions expressed in this E-MAIL and any ATTACHEMENTS may be
those of the author and are not necessarily those of SOFTPRO SYSTEMS.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Is opening IndexReader multiple times safe?

2004-11-16 Thread Satoshi Hasegawa
Thank you, Luke. I decided to branch (use multiple try/catch clauses) so 
that I know if the IndexReader is open or not. Your remark on locking was 
helpful for my understanding of Lucene anyway.

- Original Message - 
From: "Luke Shannon" [EMAIL PROTECTED]
To: "Lucene Users List" [EMAIL PROTECTED]
Sent: Tuesday, November 16, 2004 11:45 AM
Subject: Re: Is opening IndexReader multiple times safe?


 Hi Satoshi;

 I troubled shooted a problem similar to this by moving around a
 IndexReader.isLocked(indexFileLocation) to determine exactly when the 
 reader
 was closed.

 Note: the method throws an error if the index file doesn't exist that you
 are checking on.

 Luke

 - Original Message - 
 From: "Satoshi Hasegawa" [EMAIL PROTECTED]
 To: "Lucene Users List" [EMAIL PROTECTED]
 Sent: Monday, November 15, 2004 8:25 PM
 Subject: Is opening IndexReader multiple times safe?


 Hello,

 I need to handle IOExceptions that arise from index access
 (IndexReader#open, #delete, IndexWriter#optimize etc.), and I'm not sure
 if
 the IndexReader is open when the exception is thrown/caught. 
 Specifically,
 my code is as follows.

 try {
 indexReader.delete(term);
 indexReader.close();
 IndexWriter indexWriter = new IndexWriter(fsDirectory,
 new JapaneseAnalyzer(), false);
 indexWriter.optimize();
 indexWriter.close();
 } catch (Exception e) {
 // IndexReader may or may not be open
 indexReader = IndexReader.open(path);
 indexReader.undelete();
 }

 Is the above code safe? IndexReader may already be open at the beginning
 of
 the catch clause if the exception was thrown before closing the
 IndexReader.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Is opening IndexReader multiple times safe?

2004-11-15 Thread Satoshi Hasegawa
Hello,

I need to handle IOExceptions that arise from index access 
(IndexReader#open, #delete, IndexWriter#optimize etc.), and I'm not sure if 
the IndexReader is open when the exception is thrown/caught. Specifically, 
my code is as follows.

try {
indexReader.delete(term);
indexReader.close();
IndexWriter indexWriter = new IndexWriter(fsDirectory,
new JapaneseAnalyzer(), false);
indexWriter.optimize();
indexWriter.close();
} catch (Exception e) {
// IndexReader may or may not be open
indexReader = IndexReader.open(path);
indexReader.undelete();
}

Is the above code safe? IndexReader may already be open at the beginning of 
the catch clause if the exception was thrown before closing the IndexReader.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Query#rewrite Question

2004-11-11 Thread Satoshi Hasegawa
Thank you, Erik and Paul. I'm not sure what SpanQuery is, but anyway we've 
decided to freeze the version of Lucene we use. 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Query#rewrite Question

2004-11-10 Thread Satoshi Hasegawa
Hello,

Our program accepts input in the form of Lucene query syntax from the user, 
but we wish to perform additional tasks such as thesaurus expansion. So I 
want to manipulate the Query object that results from parsing.

My question is, is the result of the Query#rewrite method guaranteed to be 
either a TermQuery, a PhraseQuery, or a BooleanQuery, and if it is a 
BooleanQuery, do all the constituent clauses also reduce to one of the above 
three classes? If not, what if the original Query object was the one that 
was obtained from QueryParser#parse method? Can I assume the above in this 
restricted case?

I experimented with the current version, and the above seems to be positive 
in this version; I'm asking if this could change in the future. Thank you.