v6: rerank cannot be used with BM25, Hybrid or FetchObjects
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Inizia con BaseVectorSearchBuilder e BaseQueryOptions.Builder, quindi esamina come Bm25.Builder, Hybrid.Builder e FetchObjects.Builder ereditano le rispettive opzioni. Controlla Rerank.appendTo(SearchRequest.Builder) e conferma che rerank sia esposto per questi operatori, preservando al contempo il comportamento near-search esistente; il lavoro è completato quando il client può inviare richieste di rerank BM25 e Hybrid attraverso il percorso gRPC esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 34
- Fork
- 30
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di weaviate/java-client
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
weaviate/java-client#621 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
weaviate/java-client#619 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
weaviate/java-client#615 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
weaviate/java-client#607 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
weaviate/java-client#623 ·
Tutte le issue di weaviate/java-client
Issue simili
-
type: possible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
grimmory-tools/grimmory#2850 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
aoqia194/leaf-loader#19 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/streampark#4521 ·