{"record":{"id":"fed531043040831d","repo":"weaviate/weaviate","slug":"cannot-parse-rerank-v","errorCode":null,"errorMessage":"cannot parse rerank %v","messagePattern":"cannot parse rerank (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/handlers/grpc/v1/prepare_reply.go","lineNumber":486,"sourceCode":"\t\t}\n\n\t\t// grouped results are only added to the first object for GQL reasons\n\t\t// however, reranking can result in a different order, so we need to check every object\n\t\t// recording the result if it's present assuming that it is at least somewhere and will be caught\n\t\tif generateFmt.GroupedResult != nil && *generateFmt.GroupedResult != \"\" {\n\t\t\tgroupedGenerativeResults = *generateFmt.GroupedResult\n\t\t}\n\t}\n\n\tif rerankEnabled {\n\t\trerankRaw, ok := addProps[\"rerank\"]\n\t\tif !ok {\n\t\t\treturn nil, \"\", fmt.Errorf(\"rerank is not present %v\", addProps)\n\t\t}\n\n\t\trerank, ok := rerankRaw.([]*additionalModels.RankResult)\n\t\tif !ok {\n\t\t\treturn nil, \"\", fmt.Errorf(\"cannot parse rerank %v\", rerankRaw)\n\t\t}\n\t\tret.Rerank = &pb.RerankReply{\n\t\t\tScore: *rerank[0].Score,\n\t\t}\n\t}\n\n\t// group results does not support more additional properties\n\tsearchParams.AdditionalProperties = additional.Properties{\n\t\tID:       searchParams.AdditionalProperties.ID,\n\t\tVector:   searchParams.AdditionalProperties.Vector,\n\t\tVectors:  searchParams.AdditionalProperties.Vectors,\n\t\tDistance: searchParams.AdditionalProperties.Distance,\n\t}\n\n\t// group objects are returned as a different type than normal results ([]map[string]interface{} vs []interface). As\n\t// the normal path is used much more often than groupBy, convert the []map[string]interface{} to []interface{}, even\n\t// though we cast it to map[string]interface{} in the extraction function.\n\t// This way we only do a copy for groupBy and not for the standard code-path which is used more often","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/handlers/grpc/v1/prepare_reply.go#L468-L504","documentation":"Type-guard failure in extractGroup: the 'rerank' additional property is present but is not []*additionalModels.RankAdditionalProperty (e.g. nil, a single object, or a different type). The rerank module attached its output in an unexpected shape, so reply serialization cannot proceed. Indicates a module/server version inconsistency rather than client misuse.","triggerScenarios":"Thrown at adapters/handlers/grpc/v1/prepare_reply.go:486 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the rerank module version matches the server","Report as a bug with the observed type"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}