set explain to true and read the explain output if cache is use?

Jason

On Fri, Feb 13, 2015 at 3:47 AM, <ffors...@homeaway.com> wrote:

> I am using a function score with a function filter to score a subset of
> results higher. I specify to cache the function filter, but its performance
> is slower and slower the more clauses I add to the filter.
>
> A query with 2 geo_polygons clauses returns relatively fast (30ms), but
> the more polygons clauses I add the slower it gets. With 50 polygons the
> call slows to 1s. Does elasticsearch actually cache the filter?
>
> Example query with 2 geo_polygons clauses:
> {
>   "query": {
>     "function_score": {
>       "filter": {
>         "bool": {
>           "must": [
>             {
>               "term": {
>                 "city": "LA"
>               }
>             }
>           ]
>         }
>       },
>       "functions": [
>         {
>           "filter": {
>             "bool": {
>               "should": [
>                 {
>                   "geo_polygon": {
>                     "location": {
>                       "points": [
>                         [
>                           -118.3971081,
>                           34.081519
>                         ],
>                         [
>                           -118.3440351,
>                           34.081519
>                         ],
>                         [
>                           -118.3440351,
>                           34.131086
>                         ],
>                         [
>                           -118.3971081,
>                           34.131086
>                         ]
>                       ]
>                     }
>                   }
>                 },
>                 {
>                   "geo_polygon": {
>                     "location": {
>                       "points": [
>                         [
>                           -118.3907139,
>                           34.05576
>                         ],
>                         [
>                           -118.361375,
>                           34.05576
>                         ],
>                         [
>                           -118.361375,
>                           34.083811
>                         ],
>                         [
>                           -118.3907139,
>                           34.083811
>                         ]
>                       ]
>                     }
>                   }
>                 }
>               ],
>               "_cache": true
>             }
>           },
>           "boost_factor": 2
>         }
>       ],
>       "score_mode": "sum"
>     }
>   }
> }
>
> --
> 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 elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/c990d908-2b15-4797-9300-22a71aeb4972%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/c990d908-2b15-4797-9300-22a71aeb4972%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAHO4itze5wyDX%2Bp3OC%2BPpN%3Db1XHLQQvKb68ZEeOnAA9tEAwiBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to