Lucene scoring

2013-03-12 Thread lucas van overberghe
Hi, We are currently using Hibernate Search but had some questions regarding scoring. We are implementing a quicksearchengine in our webapp but want to customize the scoring a bit. Let's say, you have a User named Peter, and a search is done on Peter. The first result should therefore not be a

LUCENE-4713

2013-03-12 Thread Darren Hoffman
I am having the same experience as issue LUCENE-4713. Without modifying the source code myself, how do I overcome this? I am in the middle of migrating from 3.6 to 4.2 and I am unable to index or search. From the source code, I see there is a setter for a codec but there's not a constructor that

Re: Rewrite for RegexpQuery

2013-03-12 Thread Carsten Schnober
Am 11.03.2013 18:22, schrieb Michael McCandless: On Mon, Mar 11, 2013 at 9:32 AM, Carsten Schnober schno...@ids-mannheim.de wrote: Am 11.03.2013 13:38, schrieb Michael McCandless: On Mon, Mar 11, 2013 at 7:08 AM, Uwe Schindler u...@thetaphi.de wrote: Set the rewrite method to e.g.

RE: Rewrite for RegexpQuery

2013-03-12 Thread Uwe Schindler
Hi Carsten, I would suggest to use my example code with the fake query and custom rewrite. This does not have the overhead of BooleanQuery and more important: You don't need to change the *global* and *static* default in BooleanQuery. Otherwise you could introduce a denial of service case into

Re: Rewrite for RegexpQuery

2013-03-12 Thread Carsten Schnober
Am 12.03.2013 10:39, schrieb Uwe Schindler: I would suggest to use my example code with the fake query and custom rewrite. This does not have the overhead of BooleanQuery and more important: You don't need to change the *global* and *static* default in BooleanQuery. Otherwise you could

Re: Migrate/Upgrade frommLucene 2.3

2013-03-12 Thread Ramprakash Ramamoorthy
On Mon, Mar 11, 2013 at 5:02 PM, Ramprakash Ramamoorthy youngestachie...@gmail.com wrote: On Mon, Mar 11, 2013 at 3:41 PM, Uwe Schindler u...@thetaphi.de wrote: In that case, it should be fine. Otherwise you would need to reindex. Thank you Uwe. - Uwe Schindler H.-H.-Meier-Allee

RE: Migrate/Upgrade frommLucene 2.3

2013-03-12 Thread Uwe Schindler
Uwe, Just re-iterating so that I am understanding your statement right without ambiguity. I use standard analyzer for all english and numerals. I don't have a problem when reading 2.3 migrated indices with 4.1, right? Sorry, for the doubt again. YES!

Re: Migrate/Upgrade frommLucene 2.3

2013-03-12 Thread Ramprakash Ramamoorthy
On Tue, Mar 12, 2013 at 4:15 PM, Uwe Schindler u...@thetaphi.de wrote: Uwe, Just re-iterating so that I am understanding your statement right without ambiguity. I use standard analyzer for all english and numerals. I don't have a problem when reading 2.3 migrated indices with 4.1, right?

Re: Lucene scoring

2013-03-12 Thread Ian Lea
Sounds like a job for boosting. Document.setBoost() and/or Field.setBoost(). The former has gone away in lucene 4.x. See the migration guide. Or execute 2 searches, restricting the first to the contact docs or whichever you want to be top of the list. -- Ian. On Tue, Mar 12, 2013 at 7:36

Re: Example phrase query with lucene version 4

2013-03-12 Thread Ian Lea
QueryParser qp = new QueryParser(Version.whatever, somefield, new WhateverAnalyzer()); Query q = qp.parse(\The mouse gnawed the clothes of the king of Rome\); and q should be a PhraseQuery if I've got the quoting right. Some of those words might be stop words which might cause you problems

Term Statistics for MultiTermQuery

2013-03-12 Thread Carsten Schnober
Hi, here's another question involving MultiTermQuerys. My aim is to get a frequency count for a MultiTermQuery while I don't need to execute the query. The naive approach would be to create the Query, extract the terms, and get each term's frequency, approximately as follows: IndexSearcher

Re: Example phrase query with lucene version 4

2013-03-12 Thread Arlei Ferreira Farnetani Junior
In this case you are not using more search PhraseQuery the type that existed in previous versions ... I would like to use this PhraseQuery by having the possibility of bidding I use the property and thus enable setSlop have more content between words. So it is not recommended to use more

WeakReference Returning NULL

2013-03-12 Thread Peter Lavin
Hi all, I'm looking to create a TermFreqVector as follows TermFreqVector[] tfvs = null; try { tfvs = indxRead.getTermFreqVectors(docId); } catch (IOException e) { e.printStackTrace(); } However, the object tfvs is returning null. I've debugged it to a class called

Re: WeakReference Returning NULL

2013-03-12 Thread Peter Lavin
Please ignore this, I was using two different indexes, one of which did not have TermVectors.YES set, apologies, Peter On 03/12/2013 05:49 PM, Peter Lavin wrote: Hi all, I'm looking to create a TermFreqVector as follows TermFreqVector[] tfvs = null; try { tfvs =