You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by kafka0102 <ka...@163.com> on 2010/11/19 08:49:31 UTC

how about another SolrIndexSearcher.numDocs method?

In my app,I want to search numdocs for some queries. I see SolrIndexSearcher has two methods:
public int numDocs(Query a, DocSet b)
public int numDocs(Query a, Query b)

But these're not fit for me.For search's params,I get q and fq, and q' results are not in filterCache.But above methods are both using filtercache. So I think a method like:
public int numDocs(Query q, List<Query> fqs) (q not with filtercache,fqs with filtercache)
would be fine.
And now,I cannot extend SolrIndexSearcher because of SolrCore. What should I do to solve the problem?
thanks.


Re:how about another SolrIndexSearcher.numDocs method?

Posted by kafka0102 <ka...@163.com>.
numDocs methods seem just for filterCache. So I just need use QueryResult search(QueryResult qr, QueryCommand cmd) by setting QueryCommand.len=0?I would try it.

At 2010-11-19 15:49:31,kafka0102 <ka...@163.com> wrote:
In my app,I want to search numdocs for some queries. I see SolrIndexSearcher has two methods:
public int numDocs(Query a, DocSet b)
public int numDocs(Query a, Query b)

But these're not fit for me.For search's params,I get q and fq, and q' results are not in filterCache.But above methods are both using filtercache. So I think a method like:
public int numDocs(Query q, List<Query> fqs) (q not with filtercache,fqs with filtercache)
would be fine.
And now,I cannot extend SolrIndexSearcher because of SolrCore. What should I do to solve the problem?
thanks.




网易163/126邮箱百分百兼容iphone ipad邮件收发