Isn't fieldLength in BM25 supposed to be an integer?

2016-11-09 Thread Mossaab Bagdouri
Hi, On Lucene 6.2.1, I have the following explain output for a document that contain two words. I'm wondering why the value of fieldLength is not 2. A related question was posted on S.O. two years ago: http://stackoverflow.com/questions/22194920 23.637165 = sum of: 10.065297 = weight(title:goo

Altering Term Frequency in Similarity

2016-12-14 Thread Mossaab Bagdouri
Hi, I'm using Lucene 6.3.0, and trying to handle synonyms at query time. I think I've handled DF correctly with BlendedTermQuery (by returning the max DF of the synonyms). TTF is also handled by the same class. Now, I want to handle the term frequency. As far as I can tell, raw TF is given to t

Lucene 4.0-BETA : MultiReader isCurrent openIfChanged

2012-08-26 Thread Mossaab Bagdouri
Hi, I've just migrated my webapp from Lucene 3.6 to 4.0-BETA. My 2 indexes are updated every couple of minutes by a batch. The webapp searcher needs to get refreshed whenever this happens. In 3.6, I was doing it this way: private IndexSearcher getIndexSearcher() { try { if (is

Re: Lucene 4.0-BETA : MultiReader isCurrent openIfChanged

2012-08-26 Thread Mossaab Bagdouri
dler > 1. getRefCount() > 2. No > > > > Mossaab Bagdouri schrieb: > > >Hi, > > > >I've just migrated my webapp from Lucene 3.6 to 4.0-BETA. My 2 indexes > >are > >updated every couple of minutes by a batch. The webapp searcher need

How to properly refresh MultiReader IndexSearcher in Lucene 4.0-BETA

2012-08-27 Thread Mossaab Bagdouri
Hi, The context is that I've migrated from Lucene 3.6 to Lucene 4.0-BETA. Lucene 3.6 had the convenient method IndexSearcher.isCurrent() for any underlying IndexReader, including MultiReader. This is no more the case for Lucene 4.0-BETA. I've been suffering in the last 48h until I came up with thi

Re: Lucene 4.0 delete by ID

2012-10-26 Thread Mossaab Bagdouri
Lucene document IDs are not stable. You could add a field with an ID that you maintain. Your query would then be just a TermQuery on the ID. Regards, Mossaab 2012/10/26 Scott Smith > I'm currently converting some lucene code to 4.0. It appears that you are > no longer allowed to delete a docu