Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up include/exclude in terms aggregations with regexps, using Lucene regular expressions #10418

Merged

Commits on Apr 9, 2015

  1. Aggregations: Speed up include/exclude in terms aggregations with reg…

    …exps.
    
    Today we check every regular expression eagerly against every possible term.
    This can be very slow if you have lots of unique terms, and even the bottleneck
    if your query is selective.
    
    This commit switches to Lucene regular expressions instead of Java (not exactly
    the same syntax yet most existing regular expressions should keep working) and
    uses the same logic as RegExpQuery to intersect the regular expression with the
    terms dictionary. I wrote a quick benchmark (in the PR) to make sure it made
    things faster and the same request that took 750ms on master now takes 74ms with
    this change.
    
    Close elastic#7526
    jpountz committed Apr 9, 2015
    Copy the full SHA
    aecd9ac View commit details
    Browse the repository at this point in the history