Re: Sorting & SQL-Database

2006-07-08 Thread George Abraham
Dominik, Sorry I saw this a little late, but I asked a similar question back in Dec 2005 and Jeff Rodenburg gave me some splendid help which we are implementing even now. Here is the gist of his solution. - Include the Lucene Doc's score (or sequential order, as an int) with the list of id values

RE: Sorting & SQL-Database

2006-07-04 Thread Mike Streeton
Re: Sorting & SQL-Database Hi, Looking at your problem I can think of one solution for small and *midsize* result sets. (And I have to say it may be similar to what Aleksander proposes). Write workaround query in the following form: select addfield from ( select addfield, generated_counter fro

Re: Sorting & SQL-Database

2006-07-03 Thread Lukas Vlcek
Hi, Looking at your problem I can think of one solution for small and *midsize* result sets. (And I have to say it may be similar to what Aleksander proposes). Write workaround query in the following form: select addfield from ( select addfield, generated_counter from table where id = 2 union

Re: Sorting & SQL-Database

2006-07-03 Thread Monsur Hossain
On 6/30/06, Dominik Bruhn <[EMAIL PROTECTED]> 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

Re: Sorting & SQL-Database

2006-07-01 Thread Michael D. Curtin
Dominik Bruhn wrote: Hy, i use Lucene to index a SQL-Table which contains three fields: a index-field, the text to search in and another field. When adding a lucene document I let Lucene index the search-field and also save the id along with it in the lucene index. Uppon searching I collect

Re: Sorting & SQL-Database

2006-07-01 Thread Aleksander M. Stensby
Well, it is common in most databasesystems, that if you dont specify a sort, you get the results sorted by id, or by when the rows are inserted into the db. The quickest way for you is to write around your query. instead of doing one query, just do where queries with equals. this would prod

Re: Sorting & SQL-Database

2006-07-01 Thread karl wettin
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 rele

Sorting & SQL-Database

2006-06-30 Thread Dominik Bruhn
Hy, i use Lucene to index a SQL-Table which contains three fields: a index-field, the text to search in and another field. When adding a lucene document I let Lucene index the search-field and also save the id along with it in the lucene index. Uppon searching I collect all ids and add them to