Closed Bug 674953 Opened 14 years ago Closed 14 years ago

Optimizing search with ElasticSearch

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adrian, Assigned: adrian)

References

()

Details

Attachments

(2 files, 1 obsolete file)

The search with ElasticSearch needs some optimizations and changes to be usable in production. Mainly: * Choose the good indexes given the date range ; * Remove as many things as possible from the "query" block (filters are faster) ; * Run some tests to eventually find other improvements.
This patch changes several things in ES search: * Securing the date so we can not search after the current date ; * Refactoring the code a bit, having more static functions (easier to unit-test) ; * Fixing the date field to use when querying (date_processed instead of client_crash_date) ; * Using the dated indexes from prod (like socorro_110730) when querying, and doing it in a secured manner.
Attachment #549886 - Flags: review?(lars)
Done any profiling yet?
Comment on attachment 549886 [details] [diff] [review] ES uses dated indexes + fixed date field + some refactoring this looks adequate. You've still got some long lines, but that isn't a show-stopper.
Attachment #549886 - Flags: review?(lars) → review+
Assignee: nobody → adrian
Target Milestone: 2.2 → 2.3
Attached patch Use filters instead of queries (obsolete) — Splinter Review
Because filters are better than queries in ES (filters are cached, not queries): * Replaced the missing and exists query_string with filters ; * Rewrote the way versions are handled, using filters instead of a query_string ; * Removed the now useless code about query_string.
Attachment #551898 - Flags: review?(lars)
Because filters are better than queries in ES (filters are cached, not queries): * Replaced the missing and exists query_string with filters ; * Rewrote the way versions are handled, using filters instead of a query_string ; * Removed the now useless code about query_string ; * Fixed a typo ; * Fixed the corresponding unit test.
Attachment #551898 - Attachment is obsolete: true
Attachment #551898 - Flags: review?(lars)
Attachment #551914 - Flags: review?(lars)
Comment on attachment 551914 [details] [diff] [review] Use filters instead of queries v2 Review of attachment 551914 [details] [diff] [review]: ----------------------------------------------------------------- Vacations took Lars away.
Attachment #551914 - Flags: review?(lars) → review?(chris.lonnen)
Attachment #551914 - Flags: review?(chris.lonnen) → review+
Last patch landed on trunk with commit r3409: http://code.google.com/p/socorro/source/detail?r=3409
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: