Re: how to safely periodically reopen the IndexReader?

2008-02-21 Thread Stephane Nicoll
On Mon, Feb 18, 2008 at 6:08 PM, [EMAIL PROTECTED] wrote: We have the same situation and use an atomic counter. Basically, we have a SearcherHolder class and a SearcherManager class. The SearcherHolder holds the searcher and the number of threads referencing the searcher. When the

Re: Boost Single Values in Field

2008-02-21 Thread JensBurkhardt
Grant Ingersoll-6 wrote: You have two options: 1. Boost the term on the query side. The query parser pretty much takes exactly the syntax you use. 2. Use Payloads along with the BoostingTermQuery. Search the archives for info on one or both. -Grant On Feb 20, 2008, at 11:30

How to construct a MultiReader?

2008-02-21 Thread spring
Hi, how can I construct a MultiReader? There is only a constructor with an IndexReader-array. But IndexReader is abstract and all other IndexReader-implementations also need an IndexReader as constructor param. Now I'm a bit confused... I want to construct a MultiReader which reads multiple

Re: How to construct a MultiReader?

2008-02-21 Thread Shai Erera
Hi You can use IndexReader.open() static method to open a reader over directories, file-systems etc. Does that help? Shai On Thu, Feb 21, 2008 at 3:04 PM, [EMAIL PROTECTED] wrote: Hi, how can I construct a MultiReader? There is only a constructor with an IndexReader-array. But IndexReader

Re: Boost Single Values in Field

2008-02-21 Thread Grant Ingersoll
On Feb 21, 2008, at 6:53 AM, JensBurkhardt wrote: Hello again, Thanks for your immediate response. As i understand, the only way to boost the values is on query side, right? The Problem is, that i need to boost field values. Okay, some more details: I need it for a library. The string

Compass example

2008-02-21 Thread Mitesh Soni
Is anyone having the ides about the compass framework? How xml files are indexed in compass? Steps or example is needed. Thanks Regards, Mitesh Soni

Re: Compass example

2008-02-21 Thread Grant Ingersoll
HI Mitesh, I would suggest asking the folks who created Compass on the Compass mailing lists. Thanks, Grant On Feb 21, 2008, at 9:07 AM, Mitesh Soni wrote: Is anyone having the ides about the compass framework? How xml files are indexed in compass? Steps or example is needed. Thanks

RE: Compass example

2008-02-21 Thread Mitesh Soni
I have done that but no reply still... From documentation I m not able to understand. So I thought I should post here. Thanks Regards, Mitesh Soni -Original Message- From: Grant Ingersoll [mailto:[EMAIL PROTECTED] Sent: Thursday, February 21, 2008 7:43 PM To:

RE: How to construct a MultiReader?

2008-02-21 Thread spring
Thank you. -Original Message- From: Shai Erera [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 21. Februar 2008 14:11 To: java-user@lucene.apache.org Subject: Re: How to construct a MultiReader? Hi You can use IndexReader.open() static method to open a reader over directories,

IndexDeletionPolicy and IndexCommitPoint

2008-02-21 Thread Tim Brennan
When implementing a custom IndexDeletionPolicy, is it sufficient to just use the segments filename (returned by IndexCommitPoint.getSegmentsFilename()) to compare CommitPoints to see if they are equal? I've looked at the code in SnapshotDeletionPolicy and it works by keeping a pointer to the

Re: IndexDeletionPolicy and IndexCommitPoint

2008-02-21 Thread Michael McCandless
Good questions! Yes, it's best to use the segments filename to compare commit points across close/reopen of IndexWriter as long as you ensure you're always working with the same index / Directory. You could change snapshot to be a String (the segments file name) and do all comparisons on that

Re: Retain the index

2008-02-21 Thread Michael McCandless
Now it looks like you are creating the IndexWriter with create=false when in fact there is no existing index in that directory. Mike [EMAIL PROTECTED] wrote: I got this error after dleteing that file Exception in thread main java.io.FileNotFoundException: C:\pIndexed\segments (The system

Re: Searching multiple indexes

2008-02-21 Thread Daniel Noll
On Tuesday 19 February 2008 21:08:59 [EMAIL PROTECTED] wrote: 1. IndexSearcher with a MultiReader will search the indexes sequentially? Not exactly. It will fuse the indexes together such that things like TermEnum will merge the ones from the real indexes, and will search using those

Re: regex expressions within phrase queries

2008-02-21 Thread Chris Hostetter
: By custom phrase query class I was trying to ask if it would be possible, or : even a good idea, to create a modified PhraseQuery class that is more : efficient that span queries (as I only want to use it for phrases). This : class might have multiple possible terms generated from a regex at a

How to get the doc ID from HITS

2008-02-21 Thread sumittyagi
hi, is there any way to retrieve the doc ids from HITS, Please advise me regarding this , i am new to lucene and programming. -- View this message in context: http://www.nabble.com/How-to-get-the-doc-ID-from-HITS-tp15627959p15627959.html Sent from the Lucene - Java Users mailing list archive at

Re: How to get the doc ID from HITS

2008-02-21 Thread Gauri Shankar
You should call Hits.id(n) for getting the docId of the nth document. On Fri, Feb 22, 2008 at 10:47 AM, sumittyagi [EMAIL PROTECTED] wrote: hi, is there any way to retrieve the doc ids from HITS, Please advise me regarding this , i am new to lucene and programming. -- View this message in

Re: How to get the doc ID from HITS

2008-02-21 Thread Kent Fitch
Two ways to work through the Hits object getting docids are: Hits hits = ... int hitCount = hits.length(); for (int i=0;ihitCount;i++) { int docId = hits.id[i] ; ... } or Iterator hitIterator = hits.iterator() ; while (hitIterator.hasNext()) { Hit hit = (Hit) hitIterator.next() ;