A couple questions on mapping definition. I run ES embedded in my
application nodes.
Using the java API only, no source file, how do you initialize your
mappings? What I want to do is change the "default" mapping so that
all indexing and query parsing is done with this configuration.
When I index and build my JSon entity representation, I want to
specify the tokenize and store attribute for each field individually.
Is there some example code I can check somewhere?
Here's what I have right now but I'm getting a 'mapping type is
missing' exception...
Thanks for helping...
// Initialize the ES embedded client.
// Set path.data from the app.lucene.dir setting in
application.properties.
Properties esProperties = new Properties();
esProperties.putAll(configuration);
esProperties.setProperty("path.data",
You put the index configuration as a mapping for a type. Mappings are for document types, index settings are for things like custom analyzers.
On Tuesday, June 28, 2011 at 11:23 PM, Spring Ninja wrote:
Hi all,
A couple questions on mapping definition. I run ES embedded in my
application nodes.
Using the java API only, no source file, how do you initialize your
mappings? What I want to do is change the "default" mapping so that
all indexing and query parsing is done with this configuration.
When I index and build my JSon entity representation, I want to
specify the tokenize and store attribute for each field individually.
Is there some example code I can check somewhere?
Here's what I have right now but I'm getting a 'mapping type is
missing' exception...
Thanks for helping...
// Initialize the ES embedded client.
// Set path.data from the app.lucene.dir setting in
application.properties.
Properties esProperties = new Properties();
esProperties.putAll(configuration);
esProperties.setProperty("path.data",
configuration.getProperty(ConfigurationConstants.PROP_APP_LUCENE_DIR));
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.