v6: rerank score is never unmarshalled from the search reply
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- api, backend-api-design
Línea de trabajo
Rastrea el deserializador de QueryResponse en la API client6 y los paquetes ORM internos, comenzando por las lecturas existentes de distance, certainty, score y explainScore. Inspecciona QueryMetadata y QueryResponseGroup junto con MetadataResult y GroupByResult.rerank. Se considera completado cuando las puntuaciones de rerank, incluido el manejo explícito de su presencia, están disponibles mediante las API de objeto público y de resultados agrupados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The server returns a rerank score per object (and per group for a grouped search), but the client never unmarshals it. A reranked search therefore arrives correctly ordered with the number that produced the order missing, and there is no way to get it through the public API.
Per object
MetadataResult carries both the value and an explicit presence flag:
double rerank_score = 21;
bool rerank_score_present = 22;
but QueryMetadata exposes only four fields:
public final class QueryMetadata extends Record {
public Float distance();
public Float certainty();
public Float score();
public String explainScore();
}
Per group
Same thing on the grouped path. GroupByResult.rerank is a RerankReply { double score = 1; }, while QueryResponseGroup exposes only:
public String name();
public Float minDistance();
public Float maxDistance();
public long numberOfObjects();
public List<QueryObjectGrouped<T>> objects();
The field is never read
Extracting io/weaviate/client6/v1/api/** and io/weaviate/client6/v1/internal/orm/** from client6-6.3.1-all.jar and grepping for rerankScore, getRerankScore and RerankReply returns zero matches. Disassembling the QueryResponse unmarshaller shows it reading getCreationTimeUnix, getLastUpdateTimeUnix, getDistance, getCertainty, getScore and getExplainScore — and nothing else.
The server does populate it
Wrapping the Rpc returned by QueryRequest.rpc(...) and reading MetadataResult off the reply before delegating to the real unmarshal yields real values, correlated by uuid — querying "fish" over a set of animal descriptions with reranker-cohere:
0.781147420 The fish is an aquatic animal that lives ...
0.051658671 The dog is a very popular domestic anima ...
0.050354082 The lion is a wild and majestic animal, ...
The row order matches the score descending, which is exactly the ordering the server applied — so the data is present on the reply and simply discarded.
Impact
Without this, a client cannot show or threshold on the rerank score, or explain the resulting order. The only workaround is to reach into GrpcTransport/QueryRequest internals and re-read the reply, which is not something a consumer should have to do.
Suggested fix
Add a rerankScore component to QueryMetadata (honouring rerank_score_present, since 0.0 is a legitimate score) and read it in the QueryResponse unmarshaller. The same for QueryResponseGroup from GroupByResult.rerank.
Version
- java-client 6.3.1 (also present in 6.3.0)
- Weaviate 1.39.0
- Lenguaje dominante
- Java
- Estrellas
- 34
- Forks
- 30
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
weaviate/java-client#621 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
weaviate/java-client#619 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
weaviate/java-client#615 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
weaviate/java-client#607 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
weaviate/java-client#603 ·
Todos los issues de weaviate/java-client
Issues similares
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Abiertoarea/plugin
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Add canonical URLs and a sitemap Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/rocketmq-dashboard#5064 ·