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:[email protected]] 
Sent: 01 April 2011 15:55
To: [email protected]
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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]

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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to