Re: IndexWriter.isLock()

2012-05-06 Thread S Eslamian
Yes, I'm sure. I debug the code, and look at the files in the index folder, it has a write.lock file before this line of code: if (!(IndexWriter.isLock(NIOFSDirectory.open("fileAddr"{ //do something } and after passing this line, index folder does not contain write.lock file and code goes to

Re: Lucene Question about Query

2012-05-06 Thread Li Li
what's your analyzer? if you use standard analyzer, I think this won't happen. if you want to get exact match of name field, you should index this field but not analyze it. On Mon, May 7, 2012 at 11:59 AM, Yogesh patel wrote: > Hi > > I am using lucene for search implementation . > I have create

Lucene Question about Query

2012-05-06 Thread Yogesh patel
Hi I am using lucene for search implementation . I have created index with two columns (1) Name (2) Year I stored values like AC 2001 AC 2002 ACC 2004 ACC 2001 ACJ 2006 ACJ 2007 I want to query in index to get year of AC ..When i query with Name:AC or Name: "AC" , it gives me all record with

Re: surround parser match-all query

2012-05-06 Thread Mike Sokolov
Hmm - I looked at Spans more carefully, and it appears as if your idea about a "fake" Query (some kind of SpanAllQuery would be called for) would work well, and would probably be much simpler to implement. It wouldn't preclude the kind of optimization I was talking about either, but I don't kn

Re: surround parser match-all query

2012-05-06 Thread Mike Sokolov
I think what I have in mind would be purely an artifact of the parser; a term that would always be optimized away, either vanishing or gobbling up the whole query. So if you had n(A,*), you would just get "A". If you had and(A, not(*)) (is that the surround syntax for not?) you would get not

Re: please I need small clarification about precision and recall in lucene code‏

2012-05-06 Thread Robert Muir
On Sun, May 6, 2012 at 8:43 AM, Abeer I wrote: > can >  any one describe what is the meaning of these two file I tried to > search for recourse that help me with this matter but unfortunately > nothing helpful. > > how to write these two file (topic file,qrles ) is it don manually, if so > what i

Re: using your own document corpora and Query list how to measure the precision and recall of the system

2012-05-06 Thread Robert Muir
You need to have relevance judgements (qrels), so that benchmark knows which documents are relevant to which query. On Sun, May 6, 2012 at 1:04 PM, Abeer wrote: > I need to know if there is any way to calculate precision and recall of the > system with your own documents corpora and list of queri

Re: Calculating IDF value more efficiently

2012-05-06 Thread Robert Muir
Look at IndexReader.docFreq On Fri, Apr 27, 2012 at 10:38 PM, Kasun Perera wrote: > This is my program to calculate TF-IDF value for a document in a collection > of documents. This is working fine, but takes lot of time when calculating > the "IDF" values (finding the no of documents which contai

Re: surround parser match-all query

2012-05-06 Thread Robert Muir
Hi Mike: wheres for the normal queryparser this Query doesn't consult the positions file and is trivial, how would such a query be implemented for the surround parser? As a single span that matches all positions for the whole document? Maybe it could be a "fake span" for each document of 0 ... Inte

Re: surround parser match-all query

2012-05-06 Thread Mike Sokolov
No, that doesn't work either - it works for the lucene query parser, but not for the *surround* query parser, which I'm using because it has a syntax for span queries. On 5/6/2012 6:10 PM, Vladimir Gubarkov wrote: Do you mean *:* ? On Mon, May 7, 2012 at 1:26 AM, Mike Sokolov wrote: does

Re: surround parser match-all query

2012-05-06 Thread Vladimir Gubarkov
Do you mean *:* ? On Mon, May 7, 2012 at 1:26 AM, Mike Sokolov wrote: > does anybody know how to express a MatchAllDocsQuery in surround query > parser language?  I've tried > > * > > and() > > but those don't parse.  I looked at the grammar and I don't think there is a > way.  Please let us al

surround parser match-all query

2012-05-06 Thread Mike Sokolov
does anybody know how to express a MatchAllDocsQuery in surround query parser language? I've tried * and() but those don't parse. I looked at the grammar and I don't think there is a way. Please let us all know if you know otherwise! Thanks -Mike Sokolov ---

using your own document corpora and Query list how to measure the precision and recall of the system

2012-05-06 Thread Abeer
I need to know if there is any way to calculate precision and recall of the system with your own documents corpora and list of queries using lucene benchmark package or any other way. -- View this message in context: http://lucene.472066.n3.nabble.com/using-your-own-document-corpora-and-Query-l

Re: IndexWriter.isLock()

2012-05-06 Thread Michael McCandless
Hmm, not good. Are you sure the index was previously locked? Can you describe your environment? Which OS / Directory class are you using? Maybe boil down to a small code fragment showing the issue? Mike McCandless http://blog.mikemccandless.com On Sun, May 6, 2012 at 8:29 AM, S Eslamian wro

please I need small clarification about precision and recall in lucene code‏

2012-05-06 Thread Abeer I
I want to ask about the lucene.benchmark which I used it to mauser the precision and recall in my lucene code . basically I used this code File topicsFile = new File("C:\\test\\topicfile.txt"); File qrelsFile = new File("C:\\test\\qrles.txt"); try (Directory dir = FSDirectory.o

IndexWriter.isLock()

2012-05-06 Thread S Eslamian
Hi all While I am using IndexWriter.isLock(), this method unlocks the index and returns false. Can anyone tell me why?

please I need small clerafation about precition and recall in lucene code

2012-05-06 Thread Abeer I
I want to ask about the lucene.benchmark which I used it to mauser the precision and recall in my lucene code . basically I used this code File topicsFile = new File("C:\\test\\topicfile.txt"); File qrelsFile = new File("C:\\test\\qrles.txt"); try (Directory dir = FSDirectory.o