lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stoppelman" <stop...@gmail.com>
Subject Re: Weighting Issue
Date Fri, 31 Aug 2007 16:48:59 GMT
Kalvir,

Have you tried giving the name field a boost?  E.g. name:(John Smith)^10
alias:(John Smith)

-M

On 8/31/07, Kalvir Sandhu <kalv@kalv.co.uk> wrote:
>
> Hi all.
>
> I am working on building a lucene index to search names of people. I want
> to
> be able to score things differently. Here is an example of the behaviour i
> need.
>
> Doc 1 with aliases
> name: Bob Jones
> alias: John Smith Andrew Jones
>
> Doc 2 without aliases
> name: John Andrew Smith
> alias: none
>
> When i run a search with the lucene query:
> name:(John Smith) alias:(John Smith)
>
> I get Doc 2 as higher scored result than Doc 1. And the score of Doc 2 is
> quite low. I need the score to not reflect how many names were assigned to
> the document. I have been playing with the DefaultSimilarity to override
> certain fields but not getting anywhere.
>
> I could use a ConstantScoreQuery but i want to be able to perfom Fuzzy
> query
> options sometimes too.
>
> Any Ideas?
>
> Kalv.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message