change structure of search in anticipation of other fns
For example in we will probably want to combine vector with keyword
search
@@ -77,6 +77,8 @@ func (r *Repo) VectorSearch(ctx context.Context, index string,
"function_score": map[string]interface{}{
"query": query,
"boost_mode": "replace",
+ "functions": []interface{}{
+ map[string]interface{}{
"script_score": map[string]interface{}{
"script": map[string]interface{}{
"inline": "binary_vector_score",
@@ -90,6 +92,8 @@ func (r *Repo) VectorSearch(ctx context.Context, index string,
},
},
},
+ },
+ },
"size": limit,
}
