I tried to perform next query with Elasticsearch:
curl -XGET '
10.10.10.50:9200/janusgraph_location_type_index/_search?pretty' -H 'Content-Type: application/json' -d'
{
   "sort" : [
       { "location_id" : "asc" },
       "_score"
   ],
   "from" : 2000000, "size" : 11000,
   "query" : {
       "bool" : {
           "must" : {
               "match" : {
                   "location_type" : 3
               }
           },
           "filter" : {
               "range" : {
                   "location_id" : { "gt" : 6255148 }
               }
           }
       }
   }
}
'
It takes about 4 seconds to finish. The result is the next:
{
 "took" : 3736,
 "timed_out" : false,
 "_shards" : {
   "total" : 5,
   "successful" : 5,
   "skipped" : 0,
   "failed" : 0
 },
 "hits" : {
   "total" : 2372187,
   "max_score" : null,
   "hits" : [
     {
       "_index" : "janusgraph_location_type_index",
       "_type" : "location_type_index",
       "_id" : "v9s5mw",
       "_score" : 1.0,
       "_source" : {
         "location_type" : 3,
         "location_id" : 11090923
       },
       "sort" : [
         11090923,
         1.0
       ]
     },
     {
       "_index" : "janusgraph_location_type_index",
       "_type" : "location_type_index",
       "_id" : "v9s8so",
       "_score" : 1.0,
       "_source" : {
         "location_type" : 3,
         "location_id" : 11090924
       },
       "sort" : [
         11090924,
         1.0
       ]
     },
     {
       "_index" : "janusgraph_location_type_index",
       "_type" : "location_type_index",
       "_id" : "v8lb80",
       "_score" : 1.0,
       "_source" : {
         "location_id" : 11090925,
         "location_type" : 3
       },
       "sort" : [
         11090925,
         1.0
       ]
     },
// AND 10997 OTHER SIMILAR RESULTS
I don't see here a vertex id property which is strange. How Janusgraph retrieves vertices with this result? Elasticsearch definitely works fast. The question only, how JanusGraph works with indexes. Because the query (which is analog to above query performs very long. Definitely more than 1 hour but it never was finished.):
Am I doing something wrong? Maybe I should configure JanusGraph to work properly with indexes?
Best regards,
Alexandr