" <[EMAIL PROTECTED]>
: To:
: Sent: Thursday, August 10, 2006 1:41 AM
: Subject: Re: custom sort
:
:
:
: what you want is not a customized sort as much as a customized Score ..
: scores can be customized by modifying your Similarity, class -- LIA has
: some good info on this, but the b
e document.
I subclass DefaultSimilarity and set it to IndexSearcher, but I don't know
what reimplementation of the methods is what I need.
Thanks
- Original Message -
From: "Chris Hostetter" <[EMAIL PROTECTED]>
To:
Sent: Thursday, August 10, 2006 1:41 AM
Subject: Re: c
what you want is not a customized sort as much as a customized Score ..
scores can be customized by modifying your Similarity, class -- LIA has
some good info on this, but the best way to figure out what you want may
be to start by creating your own Similarity class and then look at the
search.exp
On 22 Nov 2005, at 11:29, Gus Kormeier wrote:
Hey John,
My understanding is that if you add a field with the same name as a
previous field added, you will be overwriting the value stored in the
document.
So if you add:
doc.add(Field.Text("sequence", "1"));
doc.add(Field.Text("sequence",
Hey John,
My understanding is that if you add a field with the same name as a
previous field added, you will be overwriting the value stored in the
document.
So if you add:
doc.add(Field.Text("sequence", "1"));
doc.add(Field.Text("sequence", "2"));
doc.add(Field.Text("sequence", "3"));
Af
You can use the FieldCache to access the values of multiple fields (the same
source default sorting uses).
Alternately, if you want to generate a score based on a function of multiple
fields rather than doing an absolute sort, you can use FunctionQuery:
http://issues.apache.org/jira/browse/LUCENE-
Hi thanks for the reply. Yes that sounds like it would work with the two
searches. Perhaps a custom sort might be less overhead since it would just be
one search, but I think your solution will work for my purposes. Thanks much.
raymond
--
Sent from the Lucene - Java Users forum at Nabble.com
: What I'm doing now is taking the whole resulting document collection,
: iterating through it and manually moving these 10 documents to the front
: of the collection. This is slow and ugly. I was hoping there might be
: a slicker way to do it as part of the actual sort. I will play around
: wi
I had to do something similar, but I plan on re-writing it into something
more elegant. I hope this helps give you some ideas.
1. Create a QueryFilter on only those items that matched the criteria (have
a required clause in your boolean query)
2. Create a BitFilter which takes a BitSet from step
Actually in this case I am sorting by score already but I'm not sure if that
helps. Regardless of how I do my primary sort, I want to tweak the results
such that some hardcoded number of documents that match some criteria get
pushed or frontloaded to the top of the results. For instance think
: You can just assign the field B some weight when creating the index?
that implies that the field "A" being sorted on is SCORE ... which isn't
allways the case.
: Is it possible to write a custom sort for a query such that the first
: N documents that match a certain additional criteria get pus
When using sort there is no meaning for weight.
Aviran
http://www.aviransplace.com
-Original Message-
From: Chris Lu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 12:35 AM
To: java-user@lucene.apache.org; raymondcreel
Subject: Re: custom sort
You can just assign the field
You can just assign the field B some weight when creating the index?
--
Chris Lu
Lucene Search RAD on Any Database
http://www.dbsight.net
On 8/29/05, raymondcreel (sent by Nabble.com) <[EMAIL PROTECTED]> wrote:
>
> Is it possible to write a custom sort for a query such that the fir
13 matches
Mail list logo