that would explain it!

Luke tool (http://github.com/DmitryKey/luke) is also useful for such cases
or generally, when in need to check the field contents:



On Wed, Mar 11, 2015 at 12:50 PM, <phi...@free.fr> wrote:

> Hello,
>
> I found the reason: the query to store ymds in SOLR was invalid ("json"
> and "literal" are concatenated below).
>
> curl -Ss -X POST '
> http://myserver:8990/solr/archives0/update/extract?extractFormat=text&wt=jsonliteral.ymd=1944-12-31T00:00:00A&literal.id=159168
>
>
> Philippe
>
>
>
> ----- Mail original -----
> De: phi...@free.fr
> À: solr-user@lucene.apache.org
> Envoyé: Mercredi 11 Mars 2015 11:44:15
> Objet: Re: Missing doc fields
>
> I meant 'fl'.
>
> ----------------------------------------------------------------------
>
> http://myserver:8990/solr/archives0/select?q=*:*&rows=3&wt=json&fl=*
>
> ----------------------------------------------------------------------
>
>
> {"responseHeader":{"status":0,"QTime":3,"params":{"q":"*:*","fl":"*","rows":"3","wt":"json"}},"response":{"numFound":160238,"start":0,"docs":[{"id":"10","_version_":1495262519674011648},{"id":"1","_version_":1495262517261238272},{"id":"2","_version_":1495262517637677056}]}}
>
>
> ------------------ schema.xml ----------------------------------------
>
> ....
>
>  <field name="_version_" type="long" indexed="true" stored="true"/>
>
>    <!-- points to the root document of a block of nested documents.
> Required for nested
>       document support, may be removed otherwise
>    -->
>    <field name="_root_" type="string" indexed="true" stored="false"/>
>
>    <!-- Only remove the "id" field if you have a very good reason to.
> While not strictly
>      required, it is highly recommended. A <uniqueKey> is present in
> almost all Solr
>      installations. See the <uniqueKey> declaration below where
> <uniqueKey> is set to "id".
>    -->
>    <field name="id" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>
>
>    <field name="ymd" type="tdate" indexed="true" stored="true"/>
>
> ....
>
> -------------------------------------------------------------------
>
>
>
>
>
> ----- Mail original -----
> De: "Dmitry Kan" <solrexp...@gmail.com>
> À: solr-user@lucene.apache.org
> Envoyé: Mercredi 11 Mars 2015 11:38:26
> Objet: Re: Missing doc fields
>
> What is the ft parameter that you are sending?
>
>
> In order to see all stored fields use the parameter fl=*
>
> Or list the field names you need: fl=id,ymd
>
> On Wed, Mar 11, 2015 at 12:35 PM, <phi...@free.fr> wrote:
>
> > When I run the following query,
> >
> >
> http://myserver:8990/solr/archives0/select?q=*:*&rows=3&wt=json&ft=id,ymd
> >
> > The response is
> >
> >
> >
> {"responseHeader":{"status":0,"QTime":1,"params":{"q":"*:*","rows":"3","wt":"json","ft":"id,ymd"}},"response":{"numFound":160238,"start":0,"docs":[{"id":"10","_version_":1495262519674011648},{"id":"1","_version_":1495262517261238272},{"id":"2","_version_":1495262517637677056}]}}
> >
> >
> > the ymd field does not appear in the list of document fields, although it
> > is defined in my schema.xml.
> >
> > Is there a way to tell SOLR to return that field in responses?
> >
> >
> > Philippe
> >
> >
> >
> > ----- Mail original -----
> > De: phi...@free.fr
> > À: solr-user@lucene.apache.org
> > Envoyé: Mercredi 11 Mars 2015 11:06:29
> > Objet: Missing doc fields
> >
> >
> >
> > Hello,
> >
> > when I display one of my core's  schema, lots of fields appear:
> >
> > "fields":[{
> >         "name":"_root_",
> >         "type":"string",
> >         "indexed":true,
> >         "stored":false},
> >       {
> >         "name":"_version_",
> >         "type":"long",
> >         "indexed":true,
> >         "stored":true},
> >       {
> >         "name":"id",
> >         "type":"string",
> >         "multiValued":false,
> >         "indexed":true,
> >         "required":true,
> >         "stored":true},
> >       {
> >         "name":"ymd",
> >         "type":"tdate",
> >         "indexed":true,
> >         "stored":true}],
> >    ....
> >
> >
> > Yet, when I display $results in the richtext_doc.vm Velocity template,
> > documents only contain three fields (id, _version_, score):
> >
> > SolrDocument{id=3, _version_=1495262517955395584, score=1.0},
> >
> >
> > How can I increase the number of doc fields?
> >
> > Many thanks.
> >
> > Philipppe
> >
>
>
>
> --
> Dmitry Kan
> Luke Toolbox: http://github.com/DmitryKey/luke
> Blog: http://dmitrykan.blogspot.com
> Twitter: http://twitter.com/dmitrykan
> SemanticAnalyzer: www.semanticanalyzer.info
>



-- 
Dmitry Kan
Luke Toolbox: http://github.com/DmitryKey/luke
Blog: http://dmitrykan.blogspot.com
Twitter: http://twitter.com/dmitrykan
SemanticAnalyzer: www.semanticanalyzer.info

Reply via email to