Hi,

We ran tests comparing performance of Indexed-Shape Queries to custom 
Geoshape Queries. We found that Elasticsearch yielded roughly same results 
in both cases. We expected Indexed Shape queries to be faster than custom 
Geoshape queries. Our understanding is that Elasticsearch has to convert 
the custom geoshapes to quadtree on the fly as opposed to having it 
pre-generated. I was wondering if anyone could let us know why there is no 
difference in performance between these two query types.

*Experiment Design*

We indexed suburb boundary geometries into one doctype, and geocoded points 
of interest (POIs) into another. We picked top 20 suburbs with geometries 
that have most vertices, and ran two following queries for each suburb 
geometry.

Geoshape Query

GET /spike_index/doc_type_pois/_search
{
   "query": {
      "geo_shape": {
         "field_geocode": {
            "shape": {
               "type": "polygon",
               "coordinates": [ <suburb multipolygon> ]
            }
         }
      }
   }
}

Indexed-Shape Query

GET /spike_index/doc_type_pois/_search
{
   "query": {
      "geo_shape": {
         "field_geocode": {
            "indexed_shape": {
               "id": "<pre-indexed-geometry-id>",
               "type": "doc_type_suburb_quadtree",
               "index": "spike_index",
               "path": "field_geometry"
            }
         }
      }
   }
}

The test was carried out using Siege from a box located within the same VPC 
as the Elasticsearch instances. Please find the results below.

*Indexed-Shape Query Results*

Transactions:                749559 hits
Availability:                100.00 %
Elapsed time:                602.80 secs
Data transferred:         10342.97 MB
Response time:                  0.01 secs
Transaction rate:          1243.46 trans/sec
Throughput:                 17.16 MB/sec
Concurrency:                 14.92
Successful transactions:      749559
Failed transactions:                0
Longest transaction:             5.01
Shortest transaction:             0.00

*Geoshape Query Results*

Transactions:                723894 hits
Availability:                100.00 %
Elapsed time:                599.16 secs
Data transferred:          9988.83 MB
Response time:                  0.01 secs
Transaction rate:          1208.18 trans/sec
Throughput:                 16.67 MB/sec
Concurrency:                 14.92
Successful transactions:      723894
Failed transactions:                0
Longest transaction:             1.02
Shortest transaction:             0.00

If anyone could shed some light on why the results of these queries are the 
same that would be very helpful. 




-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/bfebad47-fd6d-45fe-8bca-97eb14199dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to