lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrique Lamas" <enrique.la...@corp.ya.com>
Subject queryParser and sorting question
Date Mon, 24 Jul 2006 13:19:32 GMT
Hi,
I'm, trying to execute a query to find some words, and I'm using

QueryParser queryParser = new MultiFieldQueryParser(new String[] {"tags", 
"title"}, ProcessConstants.analyzer);
Query query = queryParser.parse("word1 word2 word3");

I want to show the results sorted like this:

first, documents containing all of the three words, and this documents 
sorted by one of the index fields.
Next, documents containing two of the words, also sorted by the same field 
like before.
And so on.

┬┐How can I do this?

I wold like to avoid executing several queries of this kind:
"word1 + word2 + word3"
"word1 + word2 - word3"
"word1 - word2 + word3"
"word1 - word2 - word3"
.....

Thanks


---------------------------------------------------------------------
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