> i want to implements pagination like google search result page in my
> project.We use lucene3.3.Here are 2 issue:
> 1.How can i get the number of matched documents
TopDocs.totalHits
> 2.What is the best practice for lucene search results pagination
http://wiki.apache.org/lucene-java/Lu
You can use SOLR.
On Wed, Sep 21, 2011 at 1:37 PM, Ian Lea wrote:
>> i want to implements pagination like google search result page in my
>> project.We use lucene3.3.Here are 2 issue:
>> 1.How can i get the number of matched documents
>
> TopDocs.totalHits
>
>> 2.What is the best practice
TopDocs search(Query query, int n)
.Hope i clear my issue.
thanks again
2011-09-21
janwen | China
-
网易闪电邮(fm.163.com),免登录、助您同时管理多个邮箱!
发件人: Ian Lea
发送时间: 2011-09-21 16:08
主 题: Re: search match documents and pagination in lucene3.x
收件人
: Manish Bafna
发送时间: 2011-09-21 16:15
主 题: Re: search match documents and pagination in lucene3.x
收件人: java-user@lucene.apache.org
You can use SOLR.
On Wed, Sep 21, 2011 at 1:37 PM, Ian Lea wrote:
>> i want to implements pagination like google search result page in my
>> pr
> 网易闪电邮(fm.163.com),免登录、助您同时管理多个邮箱!
>
>
>
> 发件人: Ian Lea
> 发送时间: 2011-09-21 16:08
> 主 题: Re: search match documents and pagination in lucene3.x
> 收件人: java-user@lucene.apache.org
>
>
>
>> i want to implements pagination
: http://www.qianpin.com/
发件人: Ian Lea
发送时间: 2011-09-21 16:27
主 题: Re: Re: search match documents and pagination in lucene3.x
收件人: java-user@lucene.apache.org
The n in search(Query query, int n) specifies the number of hits
(docs) you want returned. There is no point in lucene
totalHits = searcher.search( query,searcher.maxDoc()).scoreDocs.length