I am trying to build a GPS tracking system.
For this I am concerning to use graph theory.

If I build nodes(geo-point) and edges(from node id, to node id), can I find the shortest path between 2 nodes?

Above is my index concept.
If I want to find a shortest path between node 111 and node 333, is there any method to find it at once.
(I can find edges with 'from node 111' and expand it to 'to' but is has lots of loop so the time complexity is grow up)

'nodes' index
{
id : 111,
geo-point
}

{
id : 222,
geo-point
}

{
id : 333,
geo-point
}

....

'edges' index
{
from : 111,
to : 222
}

{
from : 222,
to : 333
}

...

If you have any idea on it, please share this with me.

I don't think you can make Elasticsearch solve the problem for you. I think the best you could do with Elasticsearch would be to implement the shortest path algorithm on top of Elasticsearch (by the way, you might want to cache the distances on the edges). Note that it might be slow though, I suspect a graph database would be a better fit for this problem.

I have an idea to build the shortest path algorithm but the search time is the issue.
(I may try this to see whether I can make it time efficiently or not )

Also, I will search for the other options(graph db)

Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.