v6: rerank score is never unmarshalled from the search reply
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 74/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- java
- Domaine
- api, backend-api-design
Piste de recherche
Suivez le désérialiseur de QueryResponse dans l’API client6 et les packages ORM internes, en commençant par les lectures existantes de distance, certainty, score et explainScore. Examinez QueryMetadata et QueryResponseGroup avec MetadataResult et GroupByResult.rerank. La tâche est terminée lorsque les scores de rerank, y compris la gestion explicite de leur présence, sont disponibles via les API d’objet public et de résultats groupés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Java
- Étoiles
- 34
- Forks
- 29
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de weaviate/java-client
-
v6: ShardReplica.shardName has no @SerializedName, so the shard is always nullPeut-être pris @dudanogueira l’a pris il y a 35 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
weaviate/java-client#621 ·
-
v6: Shard.vectorQueueLenght is misspelled, so the vector queue length is always 0Peut-être pris @dudanogueira l’a pris il y a 35 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
weaviate/java-client#619 ·
-
v6: tenant updates are not split at the server's 100-tenant limit, so activate/deactivate fails above 100Peut-être pris @dudanogueira l’a pris il y a 47 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
weaviate/java-client#615 ·
-
v6: NvidiaReranker sends "baseUrl"; the module reads "baseURL"Peut-être pris @dudanogueira l’a pris il y a 50 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
weaviate/java-client#607 ·
-
v6: rerank cannot be used with BM25, Hybrid or FetchObjectsPeut-être pris @dudanogueira l’a pris il y a 50 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
weaviate/java-client#603 ·
Toutes les issues de weaviate/java-client
Issues similaires
-
agent-java community triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
elastic/apm-agent-java#4594 ·
Les mainteneurs répondent en général sous 1 jour
-
area/plugin good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
kestra-io/plugin-soda#137 ·
-
area/plugin good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
kestra-io/plugin-aws#816 ·
Les mainteneurs répondent en général sous 2 jours
-
area/plugin good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
kestra-io/plugin-kestra#200 ·
Les mainteneurs répondent en général sous 1 jour
-
bug untriaged
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
opensearch-project/search-relevance#618 ·
Les mainteneurs répondent en général sous 3 jours