lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Rank results only on some fields
Date Sat, 31 Jul 2010 08:19:10 GMT
You can construct the query using a customized query parser that wraps all
queries not with the suggested field name using a "new
ConstantScoreQuery(new QueryWrapperFilter(originalCreatedQuery))". Override
newFieldQuery() to do that and pass the super call to this ctor chain.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Philippe [mailto:mailer.thomas@gmail.com]
> Sent: Saturday, July 31, 2010 10:04 AM
> To: java-user@lucene.apache.org
> Subject: Rank results only on some fields
> 
> Hi,
> 
> I want to rank my results only on parts of my query.  E.g my query is
> "TITLE:Lucene AND AUTHOR:Manning". After this query standard lucene
> ranking for both fields take place.
> 
> However, is it possible to query the index using the full query and rank
> results only according to the "TITLE"-Field?
> 
> Regards,
>      Philippe
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message