lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Sharma <anura...@gmail.com>
Subject applicability of schema on document
Date Sat, 27 Sep 2014 08:05:31 GMT
I am trying to understand how the schema and it's field types gets applied
to a document. Is it based on a document Id e.g. how to specify solr to
store fields like age as integer, dateofbirth as date but not as a string
or vice versa. Also, is it possible to change the field type at runtime?

Direct update using below command adds the values even when the id doesn't
exist:
curl http://localhost:8983/solr/update\?commit\=true -H
'Content-type:application/json' -d '[{"dob": {"add":
["2014-02-12T12:00:00Z", "2014-07-16T12:00:00Z"]}, "id": 1111}]'
My doubts in the above scenario are:

   - Is it taking some default types based on parsed values?
   - Is it also possible to store multiple types in a single field?
   - What are the rules for schema less doc

Above scenario is tried using solr.war in example/webapps Following are
multiple schema files in example directory
./example/example-DIH/solr/db/conf/schema.xml
./example/example-DIH/solr/mail/conf/schema.xml
./example/example-DIH/solr/rss/conf/schema.xml
./example/example-DIH/solr/solr/conf/schema.xml
./example/example-DIH/solr/tika/conf/schema.xml
./example/example-schemaless/solr/collection1/conf/schema.xml
./example/multicore/core0/conf/schema.xml
./example/multicore/core1/conf/schema.xml
./example/solr/collection1/conf/schema.xml


Any documentation or unit tests describing the flow, creating and using the
schema will be helpful.

Thanks
Anurag

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