New to writing ES queries and have a docs like:
{
"state" : "california",
"relation" : "neighour_right",
"related_state" : "arizona"
},
..
{
"state" : "arizona",
"relation" : "neighour_left",
"related_state" : "california"
}
How do query the index to find the docs that have circular references like the above?
Thanks!
thiago
(Thiago Souza)
May 19, 2018, 4:50am
2
That ain't possible. Elasticsearch does not handles relationships like that. At most, it can do hierarchical relationship (1-N) using either Nested or Parent/Child mappings. Refer to the following for more information about relationships in Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html
Thanks, will look into loading into some relational db and find the way out.
Can Graph do something like that?
thiago
(Thiago Souza)
May 23, 2018, 6:53pm
5
Graph would return a graph-like structure at term and document count level only. It doesn't turns Elasticsearch into a graph database.
system
(system)
Closed
June 20, 2018, 6:53pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.