Using MultiField query with Boost factor

2013-06-05 Thread Abhishek Mallik
I have indexed documents in Lucene based on three fields: *title*, *address* , *city*. Now I want to build my query say, *C A B *so that I can retrieve the documents as follows: *C* must be present in the *title* field of the documents and either *A* or *B* must be present in either of *address* a

Re: Taking backup of a Lucene index

2013-06-05 Thread Lance Norskog
The simple answer (that somehow nobody gave) is that you can make a copy of an index directory at any time. Indexes are changed in "generations". The segment* files describe the current generation of files. All active indexing goes on in new files. In a commit, all new files are flushed to disk

Re: SearcherManager vs. MultiReader

2013-06-05 Thread Michael McCandless
SearcherManager enforces this because when it releases the searcher it calls IndexSearcher.getIndexReader().decRef(), which in your case would have decRef'd the wrong reader. You could make your own manager by extending ReferenceManager yourself? Mike McCandless http://blog.mikemccandless.com

SearcherManager vs. MultiReader

2013-06-05 Thread Joel Barry
Hi folks, I'm looking for some advice on the following scenario: We have a large static index. Our application currently copies the index wholesale and writes new docs to it, but the existing docs are never deleted or changed. Our application is multithreaded, it uses near-real-time search, and

Re: Question on payload matching query

2013-06-05 Thread Igor Shalyminov
Hi all! Just before diving in the core Lucene code, I would like to ask once again if there are detailed tutorials on SpanQuery execution algorithm, with postings retrieval and positional data matching. Best Regards, Igor 03.06.13, 21:15, "Igor Shalyminov" ": > > Hello! > > I've implemented

Re: Why I can not interrupt the search?

2013-06-05 Thread Erick Erickson
Have you seen TimeLimitingCollector? Best Erick On Wed, Jun 5, 2013 at 6:39 AM, 朱彦安 wrote: > Hello! > > In the search hit a lot,I want to hit the 2000 docs return data immediately. > > I can not find such a method of lucene. > > I have tried: > > public int score(Collector collector,int max){ >

Re: Lucene 4.2 Getting all TopDocs

2013-06-05 Thread Michael McCandless
Create your own Collector? The collect method is called oncer per document matching the search. Mike McCandless http://blog.mikemccandless.com On Wed, Jun 5, 2013 at 5:47 AM, Rider Carrion Cleger wrote: > Hi Guys, > > I'm using lucene 4.2.1 and I would like to know if there is a way to > iter

Why I can not interrupt the search?

2013-06-05 Thread 朱彦安
Hello! In the search hit a lot,I want to hit the 2000 docs return data immediately. I can not find such a method of lucene. I have tried: public int score(Collector collector,int max){ collector.setScorer(this); int doc; int count; while((doc = nextDoc())!= NO_MORE_DOCS){ ++count; collect

Lucene 4.2 Getting all TopDocs

2013-06-05 Thread Rider Carrion Cleger
Hi Guys, I'm using lucene 4.2.1 and I would like to know if there is a way to iterate on lucene search result (IndexReader) without specify the TopDocs number. I want all documents matching the query. notes: thanks Rider