embedder in semantic and similar search requestsContext:
The default embedder is the embedder that is used in search and similar requests when (resp.) hybrid.embedder and embedder were not passed.
Currently, the default embedder is implicitly designated in the following way:
"default".Motivation:
The main motivation for modifying this behavior is the following:
_vectors.<name-of-embedder>), it is difficult to rename an embedder, so changing the default embedder is difficult after the fact.Change:
hybrid.embedder is now a mandatory parameter in GET and POST /indexes/{:indexUid}/search
hybrid even for full-vector search (with only vector and not q)embedder is now a mandatory parameter in GET and POST /indexes/{:indexUid}/similarExamples:
POST /indexes/movies/search
{
"q": "batman",
"hybrid": {
// 💥 Breaking change: this is now mandatory even if there is a single
// declared embedder
"embedder": "text"
}
}
POST /indexes/movies/similar
{
"id": 42,
// 💥 Breaking change: this is now mandatory even if the embedder is
// called "default"
"embedder": "default"
}
Rationale:
While this choice forces the user to communicate possibly trivial information (in the case where there is only one embedder, or there is an embedder called default), this change has the following advantages: