Hello, I need to retrieve documents using a "join" property.
Let's explain:
I have 2 kind of documents in my index : "test"
images and chunks, they are formatted like this
{
"type":"image" or "chunk",
"content":"some textual content",
"imageVector":[the image dense vector],
"textVector":[the chunk dense vector],
"path":"a textual path",
"decription":"a textual description",
"joinKey":"a unique id that some images shared with some chunks"
}
Warn : They don't have a parent-child relation.
I want to make an hybrid search (syntax and vector search) on my images (so filtering on the "type" field ="image") :
- the syntax part of this search as to match the "path" field (with a boost :0.8) and some keywords in the "description" field (with a boost:0.2).
- the vectorsearch part is a knn search based on the "imageVector" field.
I want to weight the syntax search part to 0.3 and the knn part to 0.7.
BUT I want the result of this hybrid search is not images themselves but the associated chunks through the 'joinKey' field they have in common.
Is there a way to achieve that in a single one search?
Thank you for your help
(PS : I use javascript (or can test in the kibana console)