Elasticsearch can be prevented from automatically creating an index and
automatically indexing unknown fields by updating the elasticsearch.ymlfile as follows:
Almost forget: With this, you'll need to explicitly create an index with
the mappings you need, along with whatever filters those mappings require.
Brian
On Tuesday, August 6, 2013 10:11:12 AM UTC-4, InquiringMind wrote:
Elasticsearch can be prevented from automatically creating an index and
automatically indexing unknown fields by updating the elasticsearch.ymlfile as follows:
Thank you for your response. However, I don't think this does what I
want. It's fine if unknown fields are automatically indexed, I don't want
to prevent that. I was wondering if it's possible to define in the mapping
that some fields are required. For example, you define a field called
"title", and you want all documents that are indexed to have the "title"
field. Is it possible to configure Elasticsearch to validate that this
field is in the document when you index it, and throw an error if it is
missing?
I think in Solr, you can just add required="true" to the schema.xml when
you define the fields for a type. Is there a way to do this in
Elasticsearch?
On Tuesday, August 6, 2013 2:13:00 PM UTC, InquiringMind wrote:
Almost forget: With this, you'll need to explicitly create an index with
the mappings you need, along with whatever filters those mappings require.
Brian
On Tuesday, August 6, 2013 10:11:12 AM UTC-4, InquiringMind wrote:
Elasticsearch can be prevented from automatically creating an index and
automatically indexing unknown fields by updating the elasticsearch.ymlfile as follows:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.