Hey

I'm inserting some documents using

Map<String, Object> map = new HashMap<>();
map.put("field1", "something");
...
client.prepareIndex("a", "a").setSource(map).get();


This inserts field1 as a text field with an analyzed index, but it's not 
actually text, just a string id or other data field. This is inside an ORM, 
so I'd like to have it set to use a not analyzed index automatically when 
inserting the data.
I can't seem to find anything in the API for defining the mapping when 
indexing. Have I missed something? I'd prefer not to have to run a special 
mapping query after inserting the data as it would slow the ORM down to be 
constantly checking if indexes are analyzed or not...


-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/fe818851-a429-47cc-b119-142c4f0933be%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to