You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Cescky <ee...@gmail.com> on 2011/04/01 16:15:10 UTC

About the lucene sort

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.

RE: About the lucene sort

Posted by Carl Austin <Ca...@detica.com>.
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 <ee...@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


Re: About the lucene sort

Posted by Ian Lea <ia...@gmail.com>.
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 <ee...@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