uwazi icon indicating copy to clipboard operation
uwazi copied to clipboard

search v2 really slow and memory heave on certain datasets

Open daneryl opened this issue 2 years ago • 0 comments

Describe the bug Some searches are slow on elastic due to trying on too many fields, search v2 uses wildcards to select which fields to search and which to highlight, not only is this slow, but uses a lot of memory, in some cases triggering a circuit breaker for other queries being performed at the time.

To Reproduce Steps to reproduce the behavior:

  1. Load a dataset with a lot of template properties
  2. Search snippets on one of the entities
  3. Takes too much time to respond (times can vary depending on the machine/dataset)

Screenshots elastic_error

Additional context While debugging this, we noticed that search v1 specifies the list of fields (only searchable fields) so search on and highlight, which makes the query faster.

daneryl avatar Sep 23 '22 07:09 daneryl