appbaseio / appbaseio/reactivesearch

Strict query execution policy

Aperta
#182 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement idea :thinking:
Lingua principale
JavaScript
Stelle
4.9k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Issue Type:**
Enhancement

**Description:**
Currently, we allow execution of null queries when query-options (`sort`, `from`, `size`) are present. This can result in an extra query request - Check DataSearch component, it happens after clearing the current-value and this can happen in other components as well.

Consider this use-case:

When a component's query is cleared `query: null` and it has some query options present like `size: 20` (as in case of DataSearch), an unnecessary empty query `{ size: 20 }` gets executed since we loosely execute queries at reactivecore.

Ideally, we should should strictly check for keys like - `query`, `sort`* or `aggs`, if present, then execute the query, otherwise only update the query-tree and do not execute the query. This will have some side-effects in the actuator components when no `defaultQuery` is present, which we can handle by adding a default `match_all: {}` query.

(Need to look more into this, as it may have some unexpected side-effects in other components as well)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.