Check the "/select" request handler in solrconfig. See if it defaults "start" or "rows". start is the initial document number (e.g., 1), and rows is the number of rows to actually return in the response (nothing to do with numFound). The internal Solr default is rows=10, but you can set it to 20, 50, 100, or whatever, but DO NOT set it to 0 unless you just want the header without any actual documents.

-- Jack Krupansky

-----Original Message----- From: Nitin Agarwal
Sent: Monday, July 29, 2013 11:49 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr 4.3.1 - query does not return documents, just numFounds, 2 shards, replication Factor 1

Jason, all my fields are set with stored=ture and indexed = true, and I used

select?q=*:*&fl=*,score

but still I get the same response

*<response>
  <lst name="responseHeader">
     <int name="status">0</int>
     <int name="QTime">138</int>
     <lst name="params">
        <str name="fl">*,score</str>
        <str name="q">*:*</str>
     </lst>
   </lst>
   <result name="response" numFound="167906126" start="0" maxScore="1.0"/>
</response>*

Here is what my schema looks like

*<fields>
<field name="_version_" type="long" indexed="true" stored="true"
multiValued="false" />
<field name="bill_account_name" type="lowercase" indexed="true"
stored="true" required="false" />
<field name="bill_account_nbr" type="lowercase" indexed="true"
stored="true" required="false" />
<field name="cust_name" type="lowercase" indexed="true" stored="true"
required="false" />
       **<field name="tn_lookup_key_id" type="lowercase"
indexed="true" stored="true" required="true" />
</fields>*



Nitin


On Mon, Jul 29, 2013 at 9:38 AM, Jason Hellman <
jhell...@innoventsolutions.com> wrote:

Nitin,

You need to ensure the fields you wish to see are marked stored="true" in
your schema.xml file, and you should include fields in your fl= parameter
(fl=*,score is a good place to start).

Jason

On Jul 29, 2013, at 8:08 AM, Nitin Agarwal <2nitinagar...@gmail.com>
wrote:

> Hi, I am using Solr 4.3.1 with 2 Shards and replication factor of 1,
> running on apache tomcat 7.0.42 with external zookeeper 3.4.5.
>
> When I query "select?q=*:*"
>
> I only get the number of documents found, but no actual document. When I
> query with rows=0, I do get correct count of documents in the index.
> Faceting queries as well as group by queries also work with rows=0.
> However, when rows is not equal to 0 I do not get any documents.
>
> When I query the index I see that a query is being sent to both shards,
and
> subsequently I see a query being sent with just ids, however, after that
> query returns I do not see any documents back.
>
> Not sure what do I need to change, please help.
>
> Thanks,
> Nitin



Reply via email to