Re: Scoring exact matches higher in a stemmed field

2010-07-22 Thread Itamar Syn-Hershko
On 22/7/2010 9:20 PM, Shai Erera wrote: How is that different than extending QP? Mainly because the problem I'm having isn't there, and doing it from there doesn't feel right, and definitely not like solving the issue. I want to explore what other options there are before doing anything, an

Re: Scoring exact matches higher in a stemmed field

2010-07-22 Thread Shai Erera
> > Ideally, that would be through a class or a function I can override or > extend > How is that different than extending QP? About the "song of songs" example -- the result you describe is already what will happen. A document which contains just the word 'song' will score lower than a document

Re: Scoring exact matches higher in a stemmed field

2010-07-19 Thread Itamar Syn-Hershko
On 19/7/2010 5:50 PM, Shai Erera wrote: If your analyzer outputs b and b$ in the same position, then the below query will already be what the QP output today If you want to incorporate boosting, I can suggest that you extend QP, override newTermQuery for example, and if the term is a stemmed term

Re: Scoring exact matches higher in a stemmed field

2010-07-19 Thread Shai Erera
If your analyzer outputs b and b$ in the same position, then the below query will already be what the QP output today If you want to incorporate boosting, I can suggest that you extend QP, override newTermQuery for example, and if the term is a stemmed term, then set the query's boost (Query.setBoo

Re: Scoring exact matches higher in a stemmed field

2010-07-17 Thread Itamar Syn-Hershko
Shai, you got it right. I want to be able to send "b bb" through the QP with my custom analyzer, and get back "(b b$) (b bb$)" -- 2 terms with 2 tokens in the same position for each. I want this to be a native product of the engine, as opposed to forcing this from the query end. I'm using diff

Re: Scoring exact matches higher in a stemmed field

2010-07-16 Thread Shai Erera
Depends for which query no? ;) Sounds like you want to simulate the QP behavior http://lucene.apache.org/java/2_4_0/queryparsersyntax.html for boosting. Meaning, if for the query "b" you want to simulate the query "b OR b$^2" and have matches of b$ count more than b, then I'd follow how QP does it

Scoring exact matches higher in a stemmed field

2010-07-16 Thread Itamar Syn-Hershko
Hi all, Consider the following string: "the buffalo buffaloes" [1]. When passed through a stemming analyzer, the resulting token would be "buffalo buffalo" (assuming a good stemmer). To enable exact searches, say I mark the original term and index it at the same term position. So "the buf