Thanks InquiringMind.
I got what you said but I'm still unable to make it work.
You'll see my current and desired mappings in this
gist: gist:5502715 · GitHub
These are pretty basic indices and not for complex text parsing. As you can
guess these indices will have litttle to nothing text analysis but huge
number of updates and searches.
Anyway, I'm now in doubt if the huge number of records could slow down the
updates and retrieval.
Maybe having completely differente indices like /userdir/user and
/groupdir/group and possibly later /whateverdir/whatever
BTW, I can't find specific documentation on the PUT Mapping API.
This one (
Elasticsearch Platform — Find real-time answers at scale | Elastic)
doesn't provides much information or I'm missing something else.
Could you please give me some guidance on this?
Thanks in advance.
Fernando
El martes, 30 de abril de 2013 17:20:48 UTC-3, InquiringMind escribió:
If the index already exists and you want to make changes, you must update
the mappings, and also update the settings if you need additional analyzers
and such for the new mappings.Mappings cannot conflict (in general; I've never wanted to override that
warning), making it easy to add new types and to add new fields to existing
types.The API for updating an existing index is a little different than for
creating it: When creating the index I generated the complete
settings+mappings as one JSON document and submitted it (via the Java API,
but the curl API also accepts it). For updating, I had to submit the index
settings and the document mappings as two separate JSON documents. It took
a little fiddling to get it right, but it works very nicely.On Tuesday, April 30, 2013 4:13:17 PM UTC-4, Fernando Javier Martin wrote:
Hi all.
Sorry if this looks like a silly question or error of concept.
Scenario:
I've created an index /directorio/usuario and now I want to create/directorio/grupo(and maybe to keep extending
/directorio later on).I've generated the directorio index and populated it with usuario
objects.
Now I'm trying to create the mapping for the grupo objects{
"mappings": {
"grupo":{
"properties":{
"allow_sex":{
"type":"string", "index" : "not_analyzed"
},
"avatar":{
"type":"string", "index" : "not_analyzed"
},
"description":{
"type":"string", "index" : "not_analyzed"
},
"id":{
"type":"integer"
},
"is_open":{
"type":"boolean"
},
"members_qty":{
"type":"integer"
},
"name":{
"type":"string"
},
"user_owner":{
"type":"string", "index" : "not_analyzed"
}
}
}
}
}That throws "error":"IndexAlreadyExistsException[[directorio]
Already exists]",
*Questions: *
- Is it possible to create the mapping for another object on an existing
index? - Is it fine to have two different objects under the same index?
I've chosen that structure just for the sake of having a "directory" which
has "users", "groups", etc... - Currently we have a bit over 1 million
users and growing around 2K/day - Groups are just a bunch so far, but
eventually will start growing fast.
Thanks in advance!
--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.