Hello everyone,
I am new to ES and would love to hear some feedback for a planned data
structure/mapping.
Some facts:
- the application can have multiple projects (up to 1000)
- Each project can contain multiple media file entries (up to 10,000)
- Files can be shared with multiple users (up to 100 / project)
- Files can have multiple metadata entries, which are user-defined an will
vary from project to project (up to 30) - ES should be the primary data store for "media files"
- Users and metadata are stored in mongo db
- Searchable fields should be the "name" and all "metadata" entries
- Each search request is first filtered by the "shared" field to make sure
the user has access - Mappings are individually defined per _type(=project)
Index: localhost:9200/media
Type(s): localhost:9200/media/
Example schema for a "file entry":
{
"_index" : "media",
// Mongo id of the current project
"_type" : "51d406802e6b5e92b4000003",
"_id" : "uCdAr0J1Qdu7Iv3xdycbrg",
"_score" : 1.0,
"_source" : {
"name": "My media file",
"shared":[
// Mongo ids of users
"51d3f86f31517b3fa5000003",
"51d3f86f31517b3fa5000004",
"51d3f86f31517b3fa5000005",
"51d3f86f31517b3fa5000006",
...
],
"metadata":[
// Mongo ids of metadata entries
{"51d69d8f0c62690000000011": "Mike"},
{"51d69d8f0c62690000000016": 2000},
{"51d69d8f0c62690000000017": 2005}
{"51d69d8f0c62690000000016": [
"Autor1", "Autor2", "Autor3"
]},
...
]
}
}
Would this structure lead to any problems/work at all?
Thanks for your feedback!
--
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.