lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <ka...@snigel.net>
Subject Re: Sorting & SQL-Database
Date Sat, 01 Jul 2006 08:09:01 GMT
On Sat, 2006-07-01 at 01:10 +0200, Dominik Bruhn wrote:

> SELECT id,addfield FROM table WHERE id IN ([LUCENERESULT]);
> 
> Where LUCENERESULT is like 2,3,19,3,5.
> 
> This works fine but got one problem: The Search-Result of Lucene is order by 
> relevance and so the id-list is also sorted by relevance. But the result of 
> the SQL-Query is sorted by the id which destroys the relevance-sorting.
> 
> Does anybody know a work-arround?

This is really a question you should ask in the forum of your RDBMS. You
could always execute multiple SQL-queries within the same statement
without too much loss. But I'm certain there is a way to enforce the
order as you specified it in the WHERE-clause.


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