Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ReactiveSearch: Total hits returns to default 10000 after 'size' props changes

オープン
#1,939 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
elasticsearch, javascript, react
領域
frontend, search

調査の方向性

ReactiveList のエントリポイントから始め、track_total_hits: true を指定した defaultQuery を使いながら size prop を変更して問題を再現します。size が変更されたときにクエリがどのように再構築されるかを追跡します。この変更後も結果の合計件数が 10000 を超えたままになれば作業完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Affected Projects
ReactiveSearch

Describe the bug
I set defaultQuery as below
defaultQuery={props => ({
track_total_hits: true
})}
Now I get the correct total hits which is more than default 10000,
But when the 'size' property is changed in my ReactiveSearch code, defaultQuery doesn't work and total hits goes back 10000.
I saw in other thread to pass ?rest_total_hits_as_int=true in request parameter. But I don't know how and where.
Any sample code is appreciated.

To Reproduce
<ReactiveList
dataField="main_no" /
componentId="Result01"
react={{
and: ["Main No"],
}}
pagination={true}
paginationAt="both"
showResultStats={true}
size={this.state.selectedRow.value}
defaultQuery={() => {
return { track_total_hits: true };
}}
preserveResults={true}
render={(this.state.selectedOption.value === 'eval') ? this.ReactiveList : this.ReactiveList2}
onPageChange={
this.hideid
}
style={{
padding: "0.015625em",
}}
/>
Steps to reproduce the behavior:
Change the size from the interface
Expected behavior
Total number of results should not be changed to default value:10000

主要言語
JavaScript
スター
4.9k
フォーク
479
平均マージ
4日 10時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

appbaseio/reactivesearch のほかの issue

appbaseio/reactivesearch の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。