You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2013/08/06 21:51:49 UTC
[jira] [Closed] (SOLR-5120) Solrj Query response error with result
number
[ https://issues.apache.org/jira/browse/SOLR-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shawn Heisey closed SOLR-5120.
------------------------------
Resolution: Not A Problem
This should have been brought up on the solr-user mailing list, or perhaps the IRC channel. Even if it were actually a bug, which it's not, it should have been discussed first.
http://lucene.apache.org/solr/discussion.html
Your response indicates that your query has a "start" parameter of 1. If that had been set to zero or omitted entirely, you would have seen both results.
> Solrj Query response error with result number
> ----------------------------------------------
>
> Key: SOLR-5120
> URL: https://issues.apache.org/jira/browse/SOLR-5120
> Project: Solr
> Issue Type: Bug
> Environment: linux, lubuntu, java version "1.7.0_13".
> Reporter: Łukasz Woźniczka
> Priority: Critical
>
> This is my simple code :
> QueryResponse qr;
> try {
> qr = fs.execute(solrServer);
> System.out.println("QUERY RESPONSE : " + qr);
> for (Entry<String, Object> r : qr.getResponse()) {
> System.out.println("RESPONSE: " + r.getKey() + " -> " + r.getValue());
> }
> SolrDocumentList dl = qr.getResults();
> System.out.println("--RESULT SIZE:[ " + dl.size() );
> } catch (SolrServerException e) {
> e.printStackTrace();
> }
> I am using solrj and solr-core version 4.4.0. And there is a bug probably in solrj in query result. I am creating one simple txt doc with content 'anna' and then i am restar solr and try to search this phrase. Nothing is found but this is my query response system out {numFound=1,start=1,docs=[]}.
> So as you can see ther is info that numFound=1 but docs=[] <-- is empty. Next i add another document with only one word 'anna' and then try search that string and this is sysout;
> {numFound=2,start=1,docs=[SolrDocument{file_id=9882, file_name=luk-search2.txt, file_create_user=-1, file_department=10, file_mime_type=text/plain, file_extension=.txt, file_parents_folder=[5021, 4781, 341, -20, -1], _version_=1442647024934584320}]}
> So as you can see ther is numFound = 2 but only one document is listed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org