How to search over all fields in a clean way?

2007-08-15 Thread Ridwan Habbal
Hello all, when we search over an index docs we use code such: Analyzer analyzer = new StandardAnalyzer(); String defaultSearchField = "all"; QueryParser parser = new QueryParser(defaultSearchField, analyzer); IndexSearcher indexSearcher = new IndexSearcher(this.indexDirectory); Hits hits = in

RE: IndexReader deletes more that expected

2007-08-02 Thread Ridwan Habbal
e: Wed, 1 Aug 2007 13:14:04 -0400> From: [EMAIL PROTECTED]> To: > java-user@lucene.apache.org> Subject: Re: IndexReader deletes more that > expected> On 8/1/07, Ridwan Habbal <[EMAIL PROTECTED]> wrote:>> but what > about runing it on mutiThread app like web appli

RE: IndexReader deletes more that expected

2007-08-02 Thread Ridwan Habbal
hich you don't show) with > the> create flag always set to true? That will wipe your index each time,> > ignoring the locks and cause all sorts of weird results.> > -Original > Message-> From: Ridwan Habbal [mailto:[EMAIL PROTECTED] > Sent: > Wednesday,

RE: IndexReader deletes more that expected

2007-08-02 Thread Ridwan Habbal
ectory) throws IOException{this.indexDirectory = indexDirectory;standardAnalyzer = new StandardAnalyzer();indexWriter = new IndexWriter(new java.io.File(indexDirectory), standardAnalyzer, true);indexWriter.close();} > > -Original Message-> From: Ridwan Habbal [mailto:[EMAIL PROTECTED]

RE: IndexReader deletes more than expected

2007-08-02 Thread Ridwan Habbal
has no docs) index only when program > starts up. public LuceneServiceSHImp(String indexDirectory) throws > IOException{this.indexDirectory = indexDirectory;standardAnalyzer = new > StandardAnalyzer();indexWriter = new IndexWriter(new > java.io.File(indexDirectory), standardAnalyzer, true)

IndexReader deletes more that expected

2007-08-01 Thread Ridwan Habbal
Hi, I got unexpected behavior while testing lucene. To shortly address the problem: Using IndexWriter I add docs with fields named ID with a consecutive order (1,2,3,4, etc) then close that index. I get new IndexReader, and call IndexReader.deleteDocuments(Term). The term is simply new Term("ID