阿里云首页 开放搜索

向量检索

向量检索介绍

为了满足更多元化、更复杂的业务场景,开放搜索推出向量检索功能,在特定的业务场景下(特别是教育搜题场景、图片搜索场景),可以结合多路搜索功能,提升搜索结果的准确率。下面将介绍向量索引的语法说明注意事项

语法说明

query = 向量索引:向量

示例:查询64维的向量索引
vector: '0.377796,-0.958450,0.409853,-0.238177,-1.293826,0.356797,-0.295727,0.847301,-1.220337,0.148032,-1.128458,0.903187,0.509352,0.293686,-1.005852,-0.488839,0.888227,-0.555556,-0.658025,0.267552,-0.567601,0.003045,0.591734,-0.515983,-1.316453,-1.462450,0.091946,1.554954,0.384802,0.720498,0.144338,1.217826,0.724039,0.044212,0.571332,-1.425430,0.618965,0.481887,-1.617787,1.505416,-0.683652,1.030900,0.562021,0.162437,0.816546,0.112229,-0.739288,-0.342643,-0.199292,0.508368,-1.384887,-1.842170,0.952622,-1.699499,0.199430,-0.232464,-0.273227,-0.383696,-0.511302,0.005458,1.873572,-0.926169,-0.417587,-0.660156'

注意事项

  • 向量索引对应的字段必须为DOUBLE_ARRAY类型。

  • 向量分词器目前支持的维度有64维、128维、256维,每个维度对应的DOUBLE_ARAARY类型的字段中的元素也必须为64维、128维、256维,必须精准对应。

  • 向量索引的长度限制为编码前4K,一般一个query里面最多支持查询2个向量索引