lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Tinnes" <tin...@ecliptictech.com>
Subject Re: Weighted index
Date Fri, 21 Jun 2002 20:33:17 GMT

But is there a way to combine the scores of the individual fields to create
one total score? The problem is that the highest ranking document for the
'title' query will not necessarily match the highest ranking document for
the 'heading' query. I suppose I could simply add them up, but that would
mean iterating through all the results of both queries and adding the scores
to find the highest combined total. I don't suppose Lucene has a method of
ANDing in this manner to create a combined total field score?

- Mike

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Friday, June 21, 2002 2:35 PM
Subject: Re: Weighted index


> Or you could convert the query to
>
> title:"use search string"^5
> Or
> heading:"user search string"^3
>
> The ^ symbol will add the boosting factor to the score.
>
> You could also do this once you create the Query from the QueryParser, but
> this is up to you. Before or after the QueryParser, but I would probably
> have Lucene do the scoring.
>
> --Peter
>
> On 6/21/02 12:15 PM, "Mike Tinnes" <tinnes@ecliptictech.com> wrote:
>
> >
> > I suppose I could take the users search string and use it to query on
> > multiple fields using the query syntax. Then weight the resulting scores
for
> > the individual fields as I wish. Something like this..?
> >
> > score_1 = results of searching with 'title:"user search string"'
> > score_2 = results of searching with 'heading: "user search string"'
> > ...
> > score = ((score_1 * 5) + (score_2 * 10)) / 15
> >
> > - Mike
> >
> >
> > ----- Original Message -----
> > From: "Peter Carlson" <carlson@bookandhammer.com>
> > To: "Lucene Users List" <lucene-user@jakarta.apache.org>
> > Sent: Friday, June 21, 2002 1:48 PM
> > Subject: Re: Weighted index
> >
> >
> >> Lucene supporting boosting of terms in a query which will increase it
> >> relative weighting in the search results, but this is not supported on
a
> >> index level.
> >>
> >> So you could get the users query and add a boost factor to those fields
> > you
> >> want to have higher relevancy. There has been some discussion on how to
do
> >> this at the indexing level, but nothing has started yet.
> >>
> >> --Peter
> >>
> >>
> >> On 6/21/02 11:39 AM, "Mike Tinnes" <tinnes@ecliptictech.com> wrote:
> >>
> >>>
> >>> Hey all, is there any method that allows for the weighting of indexed
> > fields?
> >>> I'd like to implement a web search in which keywords occuring in
certain
> >>> elements (title, heading, metatags) score higher than others (body,
> > links,
> >>> etc).
> >>>
> >>> Thanks, Mike
> >>>
> >>>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> >> For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message