Comments (6)
I'm seeing this error as well. @chenzk1993 did you happen to identify the root cause?
from milvus-sdk-java.
did you try latest java SDK?
from milvus-sdk-java.
which is 2.2.5, use milvus version 2.2.8
from milvus-sdk-java.
@xiaofan-luan Yes, I'm using managed Milvus (Zilliz) and the latest Java SDK version.
Some additional information that might help narrow down the cause:
- The collections we are searching are very small right now (my team is building some demos and POCs to familiarize ourselves with Milvus, so we are keeping our dataset size small for the time being).
- We are performing hybrid searches
The exception is being thrown when calling the SearchResultsWrapper.getIDScore()
method
public List<IDScore> getIDScore(int indexOfTarget) throws ParamException, IllegalResponseException {
Position position = getOffsetByIndex(indexOfTarget);
long offset = position.getOffset();
long k = position.getK();
if (offset + k > results.getScoresCount()) {
throw new IllegalResponseException("Result scores count is wrong");
}
List<IDScore> idScore = new ArrayList<>();
IDs ids = results.getIds();
if (ids.hasIntId()) {
LongArray longIDs = ids.getIntId();
if (offset + k > longIDs.getDataCount()) {
throw new IllegalResponseException("Result ids count is wrong");
}
for (int n = 0; n < k; ++n) {
idScore.add(new IDScore("", longIDs.getData((int)offset + n), results.getScores((int)offset + n)));
}
} else if (ids.hasStrId()) {
StringArray strIDs = ids.getStrId();
if (offset + k > strIDs.getDataCount()) {
throw new IllegalResponseException("Result ids count is wrong");
}
for (int n = 0; n < k; ++n) {
idScore.add(new IDScore(strIDs.getData((int)offset + n), 0, results.getScores((int)offset + n)));
}
} else {
throw new IllegalResponseException("Result ids is illegal"); <-------- Exception originates here
}
return idScore;
}
from milvus-sdk-java.
Refer to the example:
from milvus-sdk-java.
The exception "Result ids is illegal" is usually thrown when user performs a search to an empty collection.
I have made a change to remove the exception, it will return an empty list instead of exception.
The original code:
} else {
throw new IllegalResponseException("Result ids is illegal");
}
After the change:
} else {
return idScores;
}
This change will be available in sdk version v2.3.3/v2.2.15, close this issue as well.
from milvus-sdk-java.
Related Issues (20)
- version 2.3.x and 2.4.x do not support .withElementType(DataType.Int32) in the code below. Without this the collection can not be created. HOT 1
- We encountered performance issues when using milvus-sdk-java version 2.4.2 to connect to milvus v2.4.5-gpu. HOT 2
- Is there a method to switch to another database after instantiating the client in the Java SDK? HOT 3
- how connect to a milvus cluster HOT 8
- GetCollStatResponseWrapper randomly returns 0 size for collections in 2.3.x HOT 4
- MilvusClientV2 doesn't support JSON as a return type HOT 5
- 能否在SDK中增加EmbeddingModels和Rerankers相关接口,同时做好归一化,目前看只有PY的sdk存在。 HOT 9
- milvus-sdk-java 2.3.5版本后,引入了hadoop-client依赖,其中slf4j-reload4j-1.7.36.jar与logback-classic-1.2.12.jar存在冲突,有好的解决方案吗? HOT 3
- java sdk中dataType为DataType.Bool的字段无法使用STL_SORT索引,但是文档中是可以支持 HOT 2
- Java SDK中使用MilvusClientV2的search(SearchReq request)方法返回的结果中score字段名变成了distance HOT 3
- io.milvus.v2的包下载地址不清楚求解答? HOT 2
- 使用milvus java sdk的QueryIterator出现报错:id > \Q123456\, error: line 1:12 token recognition error at: '\' HOT 3
- When grouping is being released in Java sdk ? I see it's merged to main but when is the next release of sdk planned HOT 2
- milvus 增加鉴权访问之后连接报错 Failed to initialize connection. Error: DEADLINE_EXCEEDED HOT 1
- 版本对照表有点问题 HOT 2
- [Issue] Unable to connect to milvus v2.4.4 HOT 1
- Not Able to upsert document into collection with type Float16Vector. HOT 2
- No found insertIds, please check your requests HOT 7
- Unable to insert documents into milvus, float16 vector contain nan or infinity value HOT 5
- Not able to insert vectors with FLOAT16 type. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from milvus-sdk-java.