appbaseio / appbaseio/reactivesearch

Strict query execution policy

Đang mở
#182 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement idea :thinking:
Ngôn ngữ chính
JavaScript
Star
4.9k
Fork
478
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.