Have you tried using the explain method on a Searcher and examining the results?
Best
Erick
On Thu, Jun 2, 2011 at 3:51 PM, Clemens Wyss wrote:
> I have a minimal unit test in which I add three documents to an index. The
> documents have two fields "year" and "descritpion".
> doc1(year = "2007"
I have a minimal unit test in which I add three documents to an index. The
documents have two fields "year" and "descritpion".
doc1(year = "2007", desc = "text with 2007 and 2009")
doc2(year = "2009", desc = "text with 2007 and 2009")
doc3(year = "2008", desc = "text with 2007 and 2009")
To searc
>
>
> On Nov 30, 2008, at 11:11 AM, Marc Sturlese wrote:
>
>>
>> Hey there,
>> I have a simple question about boosting fields,
>> I have a lucene indexer app that indexes data from a db. At indexing
>> time I
>> give different boost to the fields de
time boosting has much more granularity than
index time boosting, meaning you have more bits to express the boost
value during search than you do during indexing.
HTH,
Grant
On Nov 30, 2008, at 11:11 AM, Marc Sturlese wrote:
Hey there,
I have a simple question about boosting fields,
I have a
Hey there,
I have a simple question about boosting fields,
I have a lucene indexer app that indexes data from a db. At indexing time I
give different boost to the fields depending on if the field is title or
content. Would it be the same to set the boost at searching time instead of
at indexing
pache.org
Subject: Re: de-boosting fields
: Isn't it also true that using Field.Index.NO_NORMS when creating the
field will
: remove it from the scoring formula? I thought I read that somewhere,
but now
: can't find where.
queries on fields with NO_NORMS will still contribute to the score,
I've implemented the zero boost solution and it seems to be doing what I
want. Thanks to everyone who had suggestions.
-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED]
Sent: Monday, December 11, 2006 11:45 AM
To: java-user@lucene.apache.org
Subject: Re: de-boo
: Isn't it also true that using Field.Index.NO_NORMS when creating the field
will
: remove it from the scoring formula? I thought I read that somewhere, but now
: can't find where.
queries on fields with NO_NORMS will still contribute to the score, but
the field *length* and/or field bosts won'
Daniel Naber wrote:
On Saturday 09 December 2006 02:25, Scott Smith wrote:
What is the best way to do this? Is changing the boost the right
answer? Can a field's boost be zero?
Yes, just use: term1 term2 category1^0 category2^0. Erick's Filter idea is
also useful.
Isn't it also true that
: I've googled for custom scorers and haven't found anything. If anyone
: can point me to some posts, that would be appreciated.
you really don't need a custom Scorer for what you are describing. custom
Scorers are used with Custom Query classes, and there's relaly nothing
custom about hte quer
iel Naber's post), but
that seems like overkill.
I'll take a look at filters as well.
From: Erick Erickson [mailto:[EMAIL PROTECTED]
Sent: Fri 12/8/2006 7:06 PM
To: java-user@lucene.apache.org
Subject: Re: de-boosting fields
I've certainly seen refer
k at filters as well.
From: Erick Erickson [mailto:[EMAIL PROTECTED]
Sent: Fri 12/8/2006 7:06 PM
To: java-user@lucene.apache.org
Subject: Re: de-boosting fields
I've certainly seen references to writing custom scorers, so it's possible.
you might find valuable hints by searchin
On Saturday 09 December 2006 02:25, Scott Smith wrote:
> What is the best way to do this? Is changing the boost the right
> answer? Can a field's boost be zero?
Yes, just use: term1 term2 category1^0 category2^0. Erick's Filter idea is
also useful.
Regards
Daniel
--
http://www.danielnaber.
I've certainly seen references to writing custom scorers, so it's possible.
you might find valuable hints by searching the mail archive. I'll leave it
to the more expert folks to suggest which is your best option.
Although (and I'm talking beyond my competence here), it *may* work for you
to asse
I have a collection of documents for which I've always returned the
results sorted on the date/time of the document (using a sort object in
the search method on my Searcher). It works great.
Suddenly, I have a requirement to return the documents in relevancy
order. So, that's easy (I thought)
I still have a similar problem with the boost factor. I change the
name to have the AND operator and set that query's boost to a very
high value in relation to the others. I also have a regular OR based
name so that it doesn't rule those out. However whenever I change
the boost values wi
Jeremy Hanna wrote:
I would use a database function to force the ordering like the one your
provided that works in Oracle, but it doesn't look like mysql 5
supports that. If anyone else knows of a way to force the ordering
using mysql 5 queries, please respond. I think I'll just resort th
hing we
needed for presentation within the Lucene index. We saw a net
performance increase AND simpler code when we did this.
-Mike
-Original Message-
From: Jeremy Hanna [mailto:[EMAIL PROTECTED]
Sent: Fri 4/14/06 1:15 PM
To: java-user@lucene.apache.org
Cc:
Subject: Re:
ND simpler code
when we did this.
-Mike
-Original Message-
From: Jeremy Hanna [mailto:[EMAIL PROTECTED]
Sent: Fri 4/14/06 1:15 PM
To: java-user@lucene.apache.org
Cc:
Subject: Re: Boosting Fields (in index) or Queries
Wow, I finally found out why I was getting results in
Wow, I finally found out why I was getting results in the wrong order
- I got the results in the correct order from the Lucene index. I
got the explanation of each of the results along with their database
id and found the ordering mismatch.
The problem is in the database call. I am calling
On Apr 13, 2006, at 8:55 PM, Jeremy Hanna wrote:
Looking at the results, the first document in the results should
hopefully be near the bottom and the Explanation for this document
has a Description/Details (using the toString() on the Explanation)
of:
product of:
0.0 = sum of:
0.0 =
Thanks for the tip. I'm trying to decipher what the explanation
tells me right now.
Btw, here is the code that I'm currently running:
QueryParser nameParser = new QueryParser("name", analyzer);
QueryParser categoryParser = new QueryParser("category", analyzer);
QueryParser descripti
The best recommendation is to have a look at the Explanation returned
from IndexSearcher.explain() for a specific query and document to
trace how things are being scored. Is it possible you're boosting
all documents by the same amount?
Erik
On Apr 13, 2006, at 6:29 PM, Jeremy Han
I have a situation where I'm indexing database entries and have
fields such as:
name
sku
model
category name
description
features
specifications
I am trying to set a priority higher for the name, category name, and
description.
I've tried setting the fields' boost values as I've indexed th
I have a situation where I'm indexing database entries and have
fields such as:
name
sku
model
category name
description
features
specifications
I am trying to set a priority higher for the name, category name, and
description.
I've tried setting the fields' boost values as I've indexed th
On Apr 27, 2005, at 11:02 AM, Sven wrote:
Hi folks,
I have a question about boosting fields in a Query.
Suppose we have documents like this in the index:
fieldA:String fieldB:String fieldC:Date fieldD:Number
And the query is like that:
fieldA: wordA1 wordA2 wordA3 wordA4
fieldB: wordB1 wordB2
the power in the hands
of people entering queries.
Otis
--- Sven <[EMAIL PROTECTED]> wrote:
>
>
> Hi folks,
>
> I have a question about boosting fields in a Query.
> Suppose we have documents like this in the index:
>
> fieldA:String fieldB:String fieldC:Da
Hi folks,
I have a question about boosting fields in a Query.
Suppose we have documents like this in the index:
fieldA:String fieldB:String fieldC:Date fieldD:Number
And the query is like that:
fieldA: wordA1 wordA2 wordA3 wordA4
fieldB: wordB1 wordB2 wordB3 wordB4
fieldC:[date1 to
28 matches
Mail list logo