appbaseio / appbaseio/reactivesearch

Strict query execution policy

Aberta
#182 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement idea :thinking:
Linguagem predominante
JavaScript
Estrelas
4.9k
Forks
478
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.