Limit number of search results

2006-07-25 Thread headhunter

Hello,

I am looking for a way to limit the number of search results I retrieve when
searching.

I am only interested in (let's say) the first ten hits of a query.. maybe I
want to look at hits ten..twenty to, but usually only the first results are
important. 

Right now lucene searches through the entire index, returning way more than
the desired ten documents. 

Any way to limit this?

Thanks for answers,
Johannes
-- 
View this message in context: 
http://www.nabble.com/Limit-number-of-search-results-tf1998377.html#a5485639
Sent from the Lucene - Java Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Limit number of search results

2006-07-25 Thread headhunter

Hello Miles,

thanks for your answer. 

I guess the recommended way to implement paging of results is to do your own
query-results caching, right? Or does lucene also do this for me?


Johannes
-- 
View this message in context: 
http://www.nabble.com/Limit-number-of-search-results-tf1998377.html#a5498091
Sent from the Lucene - Java Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Limit number of search results

2006-07-25 Thread headhunter

Hello,

this really doesn't answer my question ;)

I've indeed read the FAQ (though I couldn't believe this point ;) .

Is it recommended to do the search again - discarding the uninteresting
values - because lucene caches the results, or just because lucene is so
damn fast?

Johannes
-- 
View this message in context: 
http://www.nabble.com/Limit-number-of-search-results-tf1998377.html#a5498319
Sent from the Lucene - Java Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Limit number of search results

2006-07-26 Thread headhunter

Hello Daniel,

thank you for your answer. 

I'm still a little worried about doing uneccesarry work - this is totally
different from what I know when working with DBMS. 

Johannes
-- 
View this message in context: 
http://www.nabble.com/Limit-number-of-search-results-tf1998377.html#a5498842
Sent from the Lucene - Java Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Limit number of search results

2006-07-26 Thread headhunter


Chris Hostetter wrote:
> 
> [..]
> 
> : In the first case: there is no uneccessary work.  Lucene must look at
> : every matching docId in order to determing which docs should be the
> first
> : 10.
> [..]
> 
Yes, you are right. Haven't thought of that :)

'Bout the second thing: You're right too.. I can indeed do other
optimimations which will work just fine !

Thanks for all your help!

Johannes


-- 
View this message in context: 
http://www.nabble.com/Limit-number-of-search-results-tf1998377.html#a5499379
Sent from the Lucene - Java Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]