lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cescky" <290131...@qq.com>
Subject Re:RE: About the lucene sort
Date Sat, 02 Apr 2011 11:29:49 GMT
Hi,


Yes, I print the query.toString(), it is ConstantScore.


Which method should I use to change it? And How to modify it to make it sort by relevance
not the constant score(reading file order)? Any example?
 
 
------------------ Original ------------------
From:  "Carl Austin"<Carl.austin@detica.com>;
Date:  Sat, Apr 2, 2011 00:22 AM
To:  "java-user"<java-user@lucene.apache.org>; 

Subject:  RE: About the lucene sort

 
 Don't prefix queries get rewritten wrapped in ConstantScoreQuery,
meaning all will get the same score and you get them in read order?
Checking the API, PrefixQuery uses
MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, which can be changed
with setRewriteMethod. 

-----Original Message-----
From: Ian Lea [mailto:ian.lea@gmail.com] 
Sent: 01 April 2011 15:55
To: java-user@lucene.apache.org
Subject: Re: About the lucene sort

Probably a bug in your code.

If you post again with, as a minimum, the version of lucene that you are
using and your search/sort code, you might get a better answer.
Best of all would be a complete self-contained standalone program or
test case that demonstrates the problem.


--
Ian.


On Fri, Apr 1, 2011 at 3:15 PM, Cescky <ee07b381@gmail.com> wrote:
> Hi,
>
>
> I know the default is sort by relevance. While, when i search the
prefix (interface*), it does not work. It can only sort the document by
the order of reading files.
>
>
> What is the problem???
>
>
> Thx.

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

Please consider the environment before printing this email.

This message should be regarded as confidential. If you have received this email in error
please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by an authorised
signatory.  The contents of this email may relate to dealings with other companies within
the Detica Limited group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message