I try to be more specific:

Given the three documents below.
When I search for "moon", I'd like to get the follwoing order of my search 
result:

moon
The moon is bright
This is a moon

i.e. the "leftmost hit" of my search term should be rated highest/best...

How should I analyze/search my documents to get this search/rating behavior?

> -----Ursprüngliche Nachricht-----
> Von: Erick Erickson [mailto:[email protected]]
> Gesendet: Mittwoch, 4. Mai 2011 13:50
> An: [email protected]
> Betreff: Re: Higher scoring if term is at the beginning of a field/document
> 
> What is the problem you're trying to solve? I'm wondering if this is an XY
> problem. See:
> http://people.apache.org/~hossman/#xyproblem
> 
> Best
> Erick
> 
> On Wed, May 4, 2011 at 3:16 AM, Clemens Wyss <[email protected]>
> wrote:
> > Given the I have 3 documents with exactly one field and the fields have the
> following contents:
> > This is a moon
> > The moon is bright
> > moon
> >
> > If I analyze these documents they all hit on "moon". But how do I need to
> analyze/search my index in order to have the following "sort order":
> > moon
> > The moon is bright
> > This is a moon
> >
> > i.e. the earlier the term appears the higher the score.
> >
> > Thx
> > Clemens
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to