Re: Why not normalization?

2010-07-07 Thread Rebecca Watson
hi, > 1) Although Lucene uses tf to calculate scoring it seems to me that term > frequency has not been normalized. Even if I index several documents, it > does not normalize tf value. Therefore, since the total number of words > in index documents are varied, can't there be a fault in Lucene's sc

Why not normalization?

2010-07-07 Thread manjula wijewickrema
Hi, In my application, I input only one index file and enter only single term query to check the lucene score. I used explain method to see the way of obtaining results and system gave me the result as product of tf, idf, fieldNorm. 1) Although Lucene uses tf to calculate scoring it seems to me t

Re: Issue Lucene-2421 and NativeFSLockFactory.clearLock behaviour?

2010-07-07 Thread Shai Erera
Double-checking the code, this isn't that simple :). Someone can call clearLock while the lock is held (for some unknown reason), in which case we do want to signal failure. The clearLock jdoc specifies that it forcefully unlocks and removes the lock ... Currently, the method does not unlock anyth

Re: Issue Lucene-2421 and NativeFSLockFactory.clearLock behaviour?

2010-07-07 Thread Shai Erera
Yes, looks like clearLock should be changed to not throw the exception, but rather do a best effort - call delete() but don't respond to its return value. I'll change that on 3x, I'm not sure if a backport to 3.0.x is needed (doesn't seem to justify a 3.0.3 ...) Shai On Wed, Jul 7, 2010 at 8:59 A

Re: Adding a new field to existing Index

2010-07-07 Thread Naveen Kumar
Thanks for the quick reply! I will go ahead with reindexing of all the data. On Wed, Jul 7, 2010 at 6:27 PM, Andrzej Bialecki wrote: > On 2010-07-07 14:49, Naveen Kumar wrote: > >> Hi Andrzej Bialecki >> >> When you suggested - >> "There are some other low-level ways to do this, but the easi

Re: Adding a new field to existing Index

2010-07-07 Thread Andrzej Bialecki
On 2010-07-07 14:49, Naveen Kumar wrote: Hi Andrzej Bialecki When you suggested - "There are some other low-level ways to do this, but the easiest is to use a FilterIndexReader, especially since you just want to add a stored field - implement a subclass of FilterIndexReader th

Re: Adding a new field to existing Index

2010-07-07 Thread Naveen Kumar
Hi Andrzej Bialecki When you suggested - "There are some other low-level ways to do this, but the easiest is to use a FilterIndexReader, especially since you just want to add a stored field - implement a subclass of FilterIndexReader that adds a new field in getFieldNames() a

Re: Lucene Scoring

2010-07-07 Thread manjula wijewickrema
Dear Ian, Thanks a lot for your reply. The way you proposed, working correctly and solved half of my matter. Once I run the program, system gave me the following output. output- ** Searching for 'milk' Number of hits: 1 0.13287117 0.13287117 = (MATCH) fieldWeight