問題タブ [pyelasticsearch]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
97 参照

elasticsearch-plugin - PyES を使用してフィルター集約を作成する方法

PyESを使用して上記のクエリを生成するには?

0 投票する
1 に答える
1263 参照

python - Elasticsearch-py は script_score でクエリを実行できません

現在、elasticsearch-py を使用して Python で ES をクエリしようとしていますが、成功しませんでした...「elasticsearch-head」プラグインでリクエストをテストしていますが、正常に動作します (結果はスコアリングされます)。

ただし、Pythonで実行すると、何かが間違っているようで、同じ結果が得られますが、適切にスコアリングされません...

コードは次のとおりです。

これは、スコアリング メカニズムをテストするためだけに作成した、非常に単純なカスタム クエリです。

今私はそれをテストします:

これが与えるのは、不適切に採点された一連の結果だけです...スクリプトが使用されているかどうかを理解するために「_explanation」を有効にしました...この意味:-「_score」は常に0です-「_explanation」は示しています何かのようなもの:

0 投票する
1 に答える
248 参照

python - In elasticsearch-py, how different should the search command be if I used custom tokenization during indexing?

I am using elasticsearch-py to index tweets (originally in JSON format). In order to preserve special characters like hashtags, user targets and emoticons, I specified a special mapping while creating the index. This is what it looks like:

I am searching using this command:

Both returns the same number of hits, although I am pretty sure this should not be the case for the data I am using.

Am I going wrong with the search command?

0 投票する
2 に答える
605 参照

elasticsearch - Elasticsearch インデックスから一意の用語を取得する効率的な方法

私が目指しているのは、すべての一意の用語を md5 ハッシュと共にデータベースに保存することです。約 400000 の一意の用語を持つ 100 万のドキュメント インデックスがあります。この図はaggregations、elasticsearch で使用して取得しました。

以下を使用して、固有の用語を取得できます。

これにより、100 の一意の用語の用語集約とともに 10 の検索結果が得られます。しかし、約 400000 用語の JSON を取得するにはメモリが必要です。使用できるすべての検索結果を解析するのと同じですscan-scroll。すべてをメモリにロードせずに、すべての一意の用語を解析できる方法はありますか?

0 投票する
4 に答える
52568 参照

python - インデックス作成中のpythonelasticsearchクライアントセットマッピング

次のように、curl コマンドで作成されるインデックスのマッピングを設定できます。

しかし、pythonでelasticsearchクライアントを使用してそのインデックスを作成し、マッピングを設定する必要があります..方法は何ですか? 以下のことを試しましたが、うまくいきません: