fix: avoid sending empty analyzer params in runAnalyzer - #2014
Merged
sre-ci-robot merged 3 commits intoAug 18, 2026
Conversation
|
Welcome @zch0214! It looks like this is your first PR to milvus-io/milvus-sdk-java 🎉 |
Contributor
Author
|
/assign @yelusion2 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.6 #2014 +/- ##
======================================
Coverage ? 62.62%
Complexity ? 3766
======================================
Files ? 426
Lines ? 24412
Branches ? 2358
======================================
Hits ? 15289
Misses ? 7844
Partials ? 1279
🚀 New features to boost your workflow:
|
|
Tick the box to add this pull request to the merge queue (same as
|
yhmo
reviewed
Aug 17, 2026
yhmo
reviewed
Aug 17, 2026
yhmo
reviewed
Aug 17, 2026
zch0214
force-pushed
the
fix/run-analyzer-null-analyzer-params
branch
from
August 18, 2026 02:12
9a72118 to
2a489b6
Compare
Signed-off-by: zhouchuhang <zch0214@gmail.com>
zch0214
force-pushed
the
fix/run-analyzer-null-analyzer-params
branch
from
August 18, 2026 03:09
2a489b6 to
5f7a14e
Compare
Use actualDbName() to resolve the target database, consistent with other vector operations, so runAnalyzer in collection mode works with non-default databases. Signed-off-by: zhouchuhang <zch0214@gmail.com>
The server requires the collection to be loaded when running the analyzer in collection mode. Create an index on the vector field and load the collection before calling runAnalyzer. Signed-off-by: zhouchuhang <zch0214@gmail.com>
zch0214
force-pushed
the
fix/run-analyzer-null-analyzer-params
branch
from
August 18, 2026 07:10
f2ead0a to
0d1e035
Compare
Contributor
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo, zch0214 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: avoid sending empty analyzer params in runAnalyzer
Fixes #2013
See also #2017 for the master branch.
Problem
VectorService.runAnalyzer()unconditionally callssetAnalyzerParams(JsonUtils.toJson(request.getAnalyzerParams())). SinceRunAnalyzerReqBuilderinitializesanalyzerParamsto anempty
HashMap, the collection-based mode (passingcollectionName/fieldNamewithoutanalyzerParams) results inanalyzer_params = "{}", which the server rejects with:Fix
Only set
analyzer_paramson the gRPC request whenanalyzerParamsis non-empty. The!isEmpty()check is the operative fix (the builder always initializesanalyzerParamsto an empty map); the!= nullcheck is defensive-only.Verification
runAnalyzer(collectionName=..., fieldName="page_content", texts=[...])fails with the error above.analyzerParams-only mode still works as before.