elasticsearch - Index main-object, sub-objects, and do a search on sub-objects (that return sib-objects) -


i've object (simplified here), each strain have many chromosomes, have many locus, have many features, have many products, ... here put 1 of each.

the structure in json is:

{   "name": "my strain",   "public": false,   "authorized_users": [1, 23, 51],   "chromosomes": [     {       "name": "c1",       "locus": [         {           "name": "locus1",           "features": [             {               "name": "feature1",               "products": [                 {                   "name": "product1"                   //...                 }               ]             }           ]         }       ]     }   ] } 

i want add object in elasticsearch, moment i've add objects separatly: locus, features , products. it's okay search (i want type keyword, watch in name of locus, name of features, , name of products), need duplicate data public , authorized_users, in each subobject.

can register whole object in elasticsearch , search on each locus level, features , products ? , individually ? (no return strain object)

yes can search @ level (ie, query "chromosomes.locus.name").

but have arrays @ each level, have use nested objects (and nested query) want, bit more complex:

for last question, no, cannot subobjects individually, elastic returns whole json source object. if want data subobjects, have use nested aggregations.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -