queryManager.uris does not honor additional-query in search options
まだ誰も着手していません。
評価
調査の方向性
提供されている Java の再現コードと all.xml のオプション内容を使用し、QueryManager.search と QueryBatcher のエントリポイントから始めます。単純な検索と QueryBatcher で、オプション名とその and-not-query コレクションフィルターがどのように適用されるかを比較します。両方のパスが、ignoredCollection の除外を含め、同じコレクションフィルター済みの結果を返せば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version of MarkLogic Java Client API
6.5.0
Version of MarkLogic Server
11.0.2
Java version
JDK 17
OS and version
ProductName: macOS
ProductVersion: 13.5
BuildVersion: 22G74
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
The current issue is a follow-up of this one: https://github.com/marklogic/java-client-api/issues/1640
In the last issue you correctly mentioned that the correct format for search positive/negative is: positive-query and negative-query
However, the way I created the last issue is not 1:1 with the issue that we actually had. Our issue is actually the following:
executing a search query and passing an options name parameter (where the options contains an and-not-query looking for a collection is simply ignored in QueryBatcher, but it works for a simple search).
Let me help you a bit with a piece of code:
QueryManager queryManager= markLogicDatabaseClient.newQueryManager();
final RawCombinedQueryDefinition structQueryDef = queryManager
.newRawCombinedQueryDefinition(new StringHandle(
"<search xmlns=\"http://marklogic.com/appservices/search\">\n" +
" <query>\n" +
" <and-query>\n" +
" <term-query>\n" +
" <text>world</text>\n" +
" </term-query>\n" +
" </and-query>\n" +
" </query>\n" +
"</search>"), "all");
final SearchHandle result = queryManager.search(structQueryDef, new SearchHandle());
result.getMatchResults();
The content of "all.xml" contains (between other stuff):
<cts:and-not-query>
<cts:annotation type="searchable-collections"/>
<cts:positive>
<cts:collection-query>
<cts:uri>collection1</cts:uri>
<cts:uri>collection2</cts:uri>
</cts:collection-query>
</cts:positive>
<cts:negative>
<cts:collection-query>
<cts:uri>ignoredCollection</cts:uri>
</cts:collection-query>
</cts:negative>
</cts:and-not-query>
Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
The output is correct for a simple search, the collections are filtered, but for QueryBatcher they are not.
Expected output: What specifically did you expect to happen?
The output is the same for both search and QueryBatcher (collections are taken into account)
Alternatives: What else have you tried, actual/expected?
- 主要言語
- Java
- スター
- 61
- フォーク
- 74
- 平均マージ
- 2日 53分
- マージ済み PR(30日)
- 8
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
marklogic/java-client-api のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
marklogic/java-client-api#1939 · コメント 1 件 ·
-
Bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
marklogic/java-client-api#1886 · コメント 7 件 ·
marklogic/java-client-api の issue をすべて見る
似ている issue
-
certification
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's オープンbug ecr
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Needs: Triage Type: Feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/copilot-sdk#2760 ·