lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandy Ding <sandy.ding...@gmail.com>
Subject Re: indexed and stored fields don't appear in the response
Date Mon, 09 Feb 2015 09:57:46 GMT
Sorry about the error, I have copied the wrong schema file :(

The schema.xml file is actually as follows:

<field name="_version_" type="long" indexed="true" stored="true"/>
<field name="id" type="mem_long" indexed="true" stored="true"
required="true" multiValued="false" docValues="true" />
<field name="bizid" type="string" indexed="true" stored="true"
required="false" multiValued="true" docValues="true"/>
<field name="tagid" type="string" indexed="true" stored="true"
required="false" multiValued="true" docValues="true" />
<field name="age" type="int" indexed="true" stored="false" required="false"
multiValued="false" docValues="false" />

The command
    curl "http://localhost:8983/solr/pa_info/select?
q=bizid:2380505101&rows=10
<http://localhost:8983/solr/pa_info/select?q=*:*&rows=10>"
will get the following response:

<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">15</int><lst name="params"><str
name="q">bizid:2380505101</str><str name="rows">10</str></lst></lst><result
name="response" numFound="5" start="0" maxScore="13.121421"><doc><long
name="id">287447279</long><long
name="_version_">1492411976981151745</long></doc><doc><long
name="id">782566232</long><long
name="_version_">1492340159745622018</long></doc><doc><long
name="id">857940024</long><long
name="_version_">1492411976981151747</long></doc><doc><long
name="id">1282927396</long><long
name="_version_">1492340159742476289</long></doc><doc><long
name="id">2998557484</long><long
name="_version_">1492340159744573441</long></doc></result>
</response>

And my question is why bizid and tagid didn't appear in the response?


2015-02-09 17:17 GMT+08:00 Anshum Gupta <anshum@anshumgupta.net>:

> What happens? You seem to be getting back the stored fields for the top 10
> documents.
> What do you want/think should happen?
>
> On Mon, Feb 9, 2015 at 12:56 AM, Sandy Ding <sandy.dingxin@gmail.com>
> wrote:
>
> > Part of my schema is as follows:
> >
> >     <field name="_version_" type="long" indexed="true" stored="true"/>
> >     <field name="id" type="mem_long" indexed="true" stored="true"
> > required="true" multiValued="false" docValues="true" />
> >      <field name="bizid" type="string" indexed="true" stored="false"
> > required="false" multiValued="true" docValues="true"/>
> >
> > When I issue the following command,
> >
> >     curl "http://localhost:8983/solr/pa_info/select?q=*:*&rows=10"
> >
> > The response is:
> >
> > <response>
> > <lst name="responseHeader"><int name="status">0</int><int
> > name="QTime">16</int><lst name="params"><str name="q">*:*</str><str
> > name="rows">10</str></lst></lst><result name="response"
> numFound="2831784"
> > start="0" maxScore="1.0"><doc><long name="id">659404797</long><long
> > name="_version_">1492348841962242048</long></doc><doc><long
> > name="id">1012335897</long><long
> > name="_version_">1492348841963290626</long></doc><doc><long
> > name="id">1783978259</long><long
> > name="_version_">1492348841963290627</long></doc><doc><long
> > name="id">1197289303</long><long
> > name="_version_">1492348841963290629</long></doc><doc><long
> > name="id">941465004</long><long
> > name="_version_">1492348841963290630</long></doc><doc><long
> > name="id">609776598</long><long
> > name="_version_">1492348841963290632</long></doc><doc><long
> > name="id">414796514</long><long
> > name="_version_">1492348841963290633</long></doc><doc><long
> > name="id">2296978215</long><long
> > name="_version_">1492348841964339202</long></doc><doc><long
> > name="id">1007119321</long><long
> > name="_version_">1492348841964339205</long></doc><doc><long
> > name="id">2404196933</long><long
> > name="_version_">1492348841964339208</long></doc></result>
> > </response>
> >
> > Any idea why this happen?
> >
> > Thanks~
> >
>
>
>
> --
> Anshum Gupta
> http://about.me/anshumgupta
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message