v6: Filter containsAny(String) sends a scalar, which the server always rejects
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- backend-api-design
Research direction
Read src/main/java/io/weaviate/client6/v1/api/collections/query/Filter.java around the containsAny(String) overload and compare it with the List overload. Check the existing filter tests for how value_text_array is serialized, then confirm the single string is sent as a one-element array; the related overloads are noted as potentially affected. Done means the request matches the server’s array contract.
Written by the indexing model from the issue text.
Description
Summary
Filter.property(p).containsAny(String value), the single-value overload, sends a scalar value_text. The server rejects ContainsAny with a scalar on every property type and transport, so this overload can never succeed. It is also the one Java picks for containsAny("x"), so it's the easiest one to call.
Reproduction (client 6.3.2, server 1.39.13)
Property tags is text[]:
collection.query.fetchObjects(q -> q.filters(Filter.property("tags").containsAny("tag1")));
// sent: value_text: "tag1"
// WeaviateApiException: ... extract contains values: value type should be []string but is string
collection.query.fetchObjects(q -> q.filters(Filter.property("tags").containsAny(List.of("tag1"))));
// sent: value_text_array { values: "tag1" } → works
The server gives the same error for a scalar ContainsAny on a plain text property, and over GraphQL. So the server contract is "always an array", and the single-value overload doesn't follow it.
Expected
containsAny(String) sends a one-element value_text_array. Removing the overload would also work, since varargs covers it. The same probably applies to containsAll and containsNone, and to the single-value overloads of the other types, though I've only verified String.
- Dominant language
- Java
- Stars
- 34
- Forks
- 29
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from weaviate/java-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
weaviate/java-client#631 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
weaviate/java-client#629 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
weaviate/java-client#628 ·
-
v6: ShardReplica.shardName has no @SerializedName, so the shard is always nullPossibly taken @dudanogueira claimed this 61 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
weaviate/java-client#621 ·
-
v6: Shard.vectorQueueLenght is misspelled, so the vector queue length is always 0Possibly taken @dudanogueira claimed this 61 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
weaviate/java-client#619 ·
All issues in weaviate/java-client
Similar issues
-
Area-UIUX Issue-Bug Issue-Easy (good first issue)
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
TeamAmaze/AmazeFileManager#4769 ·
Maintainers usually reply within 7 days
-
Expose SManga.memo & SChapter.memo fields in GraphQL APIs to support source-specific client featuresOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Suwayomi/Suwayomi-Server#2551 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ShaftHQ/SHAFT_ENGINE#7861 ·
Maintainers usually reply within 1 day