mirror of https://github.com/milvus-io/milvus.git
45 lines
1008 B
C++
45 lines
1008 B
C++
|
#include <gtest/gtest.h>
|
||
|
#include "query/Parser.h"
|
||
|
#include "query/Predicate.h"
|
||
|
#include "query/QueryNode.h"
|
||
|
|
||
|
TEST(Query, Naive) {
|
||
|
SUCCEED();
|
||
|
using namespace milvus::wtf;
|
||
|
std::string dsl_string = R"(
|
||
|
{
|
||
|
"bool": {
|
||
|
"must": [
|
||
|
{
|
||
|
"term": {
|
||
|
"A": [
|
||
|
1,
|
||
|
2,
|
||
|
5
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"range": {
|
||
|
"B": {
|
||
|
"GT": 1,
|
||
|
"LT": 100
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"vector": {
|
||
|
"Vec": {
|
||
|
"metric_type": "L2",
|
||
|
"params": {
|
||
|
"nprobe": 10
|
||
|
},
|
||
|
"query": "$0",
|
||
|
"topk": 10
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
})";
|
||
|
}
|