v6: rerank cannot be used with BM25, Hybrid or FetchObjects
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Comienza con BaseVectorSearchBuilder y BaseQueryOptions.Builder; después, inspecciona cómo Bm25.Builder, Hybrid.Builder y FetchObjects.Builder heredan sus opciones. Comprueba Rerank.appendTo(SearchRequest.Builder) y confirma que rerank está disponible para esos operadores, preservando al mismo tiempo el comportamiento existente de near-search; se considera terminado cuando el cliente puede enviar solicitudes de rerank de BM25 y Hybrid a través de la ruta gRPC existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
rerank(...) can only be attached to the near* search operators. BM25, Hybrid and FetchObjects cannot be reranked through the client, even though the server, the gRPC wire format and the other official clients all support it.
Where it comes from
rerank(Rerank) is declared on BaseVectorSearchBuilder:
abstract class BaseVectorSearchBuilder<SelfT, NearT> extends BaseQueryOptions.Builder<SelfT, NearT> {
public SelfT rerank(Rerank);
...
}
so only NearText.Builder, NearVector.Builder, NearObject.Builder and the NearMediaBuilder family inherit it. Bm25.Builder, Hybrid.Builder and FetchObjects.Builder extend BaseQueryOptions.Builder, which has no rerank.
It is not a wire limitation
SearchRequest.rerank is a top-level proto field. Marshalling a plain BM25 search with the client's own code produces a request with hasRerank() == false — nothing sets it — but setting that single field and sending the result down the same GrpcTransport works:
client marshalled hasRerank=false
BM25+rerank over gRPC: rows=3 scores=3
0.054848 The rabbit is a small and cute animal,
0.051831 The cat is an independent and agile do
0.051601 The dog is a very popular domestic ani
Those values match what GraphQL returns for the same query (0.05484826, 0.05183117, 0.051601294), so the server is doing the same work either way.
Verified against Weaviate 1.39.0 with reranker-cohere, client 6.3.1. The equivalent GraphQL queries succeed for both BM25 and Hybrid:
{ Get { Reranker(limit: 3, bm25: {query: "animal"}) {
t1 _additional { rerank(property: "t1", query: "fish") { score } } } } }
Other clients expose it
The docs page for reranking has a "Rerank keyword search results" section with bm25Rerank examples for Python, JavaScript/TypeScript, Go and GraphQL. Java is the only language missing from that tab set.
Suggested fix
Move rerank from BaseVectorSearchBuilder up to BaseQueryOptions.Builder, so every search operator inherits it. Rerank.appendTo(SearchRequest.Builder) already targets the top-level request, so no marshalling change appears to be needed.
Version
- java-client 6.3.1 (also present in 6.3.0)
- Weaviate 1.39.0
- Lenguaje dominante
- Java
- Estrellas
- 34
- Forks
- 29
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de weaviate/java-client
-
v6: ShardReplica.shardName has no @SerializedName, so the shard is always nullPosiblemente ocupada @dudanogueira la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
weaviate/java-client#621 ·
-
v6: Shard.vectorQueueLenght is misspelled, so the vector queue length is always 0Posiblemente ocupada @dudanogueira la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
weaviate/java-client#619 ·
-
v6: tenant updates are not split at the server's 100-tenant limit, so activate/deactivate fails above 100Posiblemente ocupada @dudanogueira la tomó hace 37 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
weaviate/java-client#615 ·
-
v6: NvidiaReranker sends "baseUrl"; the module reads "baseURL"Posiblemente ocupada @dudanogueira la tomó hace 40 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
weaviate/java-client#607 ·
-
v6: groups/UserType spells db_env_user as db_end_user, and is an unreferenced duplicatePosiblemente ocupada @dudanogueira la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
weaviate/java-client#623 ·
Todos los issues de weaviate/java-client
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/skywalking#14120 ·
Los mantenedores suelen responder en 1 día
-
[Feature] 关于启动游戏进度条显示的优化Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
HMCL-dev/HMCL#6943 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
micronaut-projects/micronaut-core#13677 ·
Los mantenedores suelen responder en 1 día
-
new feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#5594 ·
Los mantenedores suelen responder en 3 días