Re: Re : Stop search process when a given number of hits is reached

2008-08-09 Thread Doron Cohen
> > Ok, I'm not near any documentation now, but I think > throwing an exception is overkill. As I remember > all you have to do is return false from your collector > and that'll stop the search. But verify that. > That would have been much cleaner, however collect() is a void, so throwing a (runti

Re: Re : Stop search process when a given number of hits is reached

2008-08-09 Thread Erick Erickson
Ok, I'm not near any documentation now, but I think throwing an exception is overkill. As I remember all you have to do is return false from your collector and that'll stop the search. But verify that. Best Erick On Thu, Aug 7, 2008 at 12:00 PM, renou oki <[EMAIL PROTECTED]> wrote: > Thanks a lo

Re: Term Based Meta Data

2008-08-09 Thread Grant Ingersoll
Yeah, unfortunately, they are two distinct things, completely unrelated in terms of storage, access, etc. I've often felt the access to position/offset information is hard in Lucene, which makes it harder to do things like highlighting, co-occurrence analysis, etc. LUCENE-1001 (which Mark

Re: Need help searching

2008-08-09 Thread Doron Cohen
> > > writer = new IndexWriter("C:\\", new StandardAnalyzer(), true); > > Term term = new Term("line", "KOREA"); > > PhraseQuery query = new PhraseQuery(); > > query.add(term); > StandardAnalyzer - used here while indexing - applies lowercasing. The query is created programatically - i.e. without

Re: Deleting and adding docs

2008-08-09 Thread Doron Cohen
> > doc.add(new Field(ID_FIELD, id, Field.Store.YES, Field.Index.NO)); > writer.deleteDocuments(new Term(ID_FIELD, id)); > int i = reader.deleteDocuments(new Term(ID_FIELD, id)); //i returns 0 > Both failed. I try to delete one id value that I know for sure it was added > in the first step. > For

Re: Deleting and adding docs

2008-08-09 Thread Karl Wettin
9 aug 2008 kl. 03.27 skrev Andre Rubin: THIRD STEP: QUERYING I query the index from another field, but the docs added on the second step don't show and the ones deleted on the second step still return in the results. Any ideas what I'm doing wrong? I think you forget to reopen/open a new