appbaseio / appbaseio/reactivesearch

Strict query execution policy

Abierto
#182 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement idea :thinking:
Lenguaje dominante
JavaScript
Estrellas
4.9k
Forks
478
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.