Elastic search percolate - Performance

Hello,
we are trying out the elastic search (version 5.5) percolate for our notification feature. But we see the performance is really slow.

{"query": {
            "bool": {
              "must": [
                {
                  "bool": {
                    "should": [
                      {
                        "term": {
                          "cType": {
                            "value": "R",
                            "boost": 1
                          }
                        }
                      }
                    ],
                    "disable_coord": false,
                    "adjust_pure_negative": true,
                    "minimum_should_match": "1",
                    "boost": 1
                  }
                },
                {
                  "terms": {
                    "oType": [
                      "O"
                    ],
                    "boost": 1
                  }
                },
                {
                  "geo_shape": {
                    "actualLocation": {
                      "shape": {
                        "type": "polygon",
                        "orientation": "right",
                        "coordinates": [
                          [
                            [
                              [
                                1.3313,
                                4.0267
                              ],
                              [
                                1.3848,
                                4.0302
                              ],
                              [
                                1.4362,
                                4.0356
                              ],
                              [
                                1.4836,
                                4.0521
                              ],
                              [
                                1.5252,
                                4.0744
                              ],
                              [
                                1.5595,
                                4.1016
                              ],
                              [
                                1.5802,
                                4.1326
                              ],
                              [
                                1.596,
                                4.1662
                              ],
                              [
                                1.6015,
                                4.201
                              ],
                              [
                                1.5964,
                                4.2362
                              ],
                              [
                                1.5809,
                                4.2699
                              ],
                              [
                                1.5556,
                                4.301
                              ],
                              [
                                1.5214,
                                4.3283
                              ],
                              [
                                1.4797,
                                4.3507
                              ],
                              [
                                1.4321,
                                4.3674
                              ],
                              [
                                1.3803,
                                4.3777
                              ],
                              [
                                1.3301,
                                4.3809
                              ],
                              [
                                1.2823,
                                4.3778
                              ],
                              [
                                1.2305,
                                4.3675
                              ],
                              [
                                1.1829,
                                4.3509
                              ],
                              [
                                1.1412,
                                4.3285
                              ],
                              [
                                1.107,
                                4.3012
                              ],
                              [
                                1.0817,
                                4.2701
                              ],
                              [
                                1.0662,
                                4.2363
                              ],
                              [
                                1.061,
                                4.2013
                              ],
                              [
                                1.0666,
                                4.1662
                              ],
                              [
                                1.0824,
                                4.1326
                              ],
                              [
                                1.1031,
                                4.1016
                              ],
                              [
                                1.1374,
                                4.0744
                              ],
                              [
                                1.179,
                                4.0521
                              ],
                              [
                                1.2264,
                                4.0356
                              ],
                              [
                                1.2779,
                                4.0302
                              ],
                              [
                                1.3313,
                                4.0267
                              ]
                            ]
                          ]
                        ]
                      },
                      "relation": "within"
                    },
                    "ignore_unmapped": false,
                    "boost": 1
                  }
                }
              ],
              "disable_coord": false,
              "adjust_pure_negative": true,
              "boost": 1
            }
          }
  }

We tried to use 50000 such queries and tried to percolate 1 document. All the queries will have a geo-shape as we are dealing with location based documents.

Questions.

we have 50000 queries with geo shape in it. In spite of filtering with other criteria, I believe elastic search should at least check the geo-shape for 10000 - 20000 queries.

  1. Is the performance expected ?
  2. Are you seeing any changes in our query that will increase the performance drastically ?

Kindly help.

Thank you,
Pradeep.

I already tried the query mentioned here and got 0 hits.

I also see an open ticket regarding the performance of the percolation with geo-shape.

The results seemed to be very slow. It took almost 6 seconds. Our actual data set is 250000 queries.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.