Hi,

Re:

-----------------
> Is there some place I should indicate what parameters are including in
> the json objects send? I was able to test books.json without the
> error.

"Yes, in Solr's schema.xml (under the conf/ directory).  See
<http://wiki.apache.org/solr/SchemaXml> for more details.

        Erik Hatcher"

and:

-----------------

"I tried it and I get the same error response! Which is because... I
don't have a field named "datasource".

You need to check the Solr schema.xml for the available fields and
then add any fields that your JSON uses that are not already there. Be
sure to shutdown and restart Solr after editing the schema.

I did notice that there is a "keywords" field, but it is not
multivalued, while you keywords are multivalued.

Or, you can us dynamic fields, such as "datasource_s" and "keywords_ss
("s" for string and a second "s" for multivalued), etc. for your other
fields.

-- Jack Krupansky"

-----------------

Thanks very much for these responses.  I'm still confused by the fact
that there is no schema.xml for the books.json fields though. Was this
compiled into the start.jar? Also, where do I place my crafted
schema.xml? I tried in ~/solr-4.1.0/example/conf where the start.jar
is in/run from ~/solr-4.1.0/example but so far is still complaining
about not finding the 'datasource' field. (also tried placing it in
~/solr-4.1.0/example/solr/conf) (my current schema.xml is further
below.)

Also Jack, would it be better to parse this keywords field value
differently for it to be appropriately multivalued?:

"keywords":["EARTH SCIENCE
: Oceans : Ocean Temperature : Water
Temperature","Temperature","Integrated Ocean Observing
System","IOOS","Oceanographic Sensor Data","Intertidal Temperature
Data","continental shelf","seawater","temperature","Oregon","United
States of America","PISCO"]

Thanks,
Patrice


<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.5">
<fields>
   <field name="id" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="datasource" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="abstract" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="title" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="author" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
   <field name="contactOrganization" type="string" indexed="true"
stored="true" required="true" multiValued="false" />
   <field name="keywords" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
</fields>
</schema>

Reply via email to