dgraph 中文名字查询不准确或查不到数据问题
使用eq查询,中文查询,无返回值
{
q(func: eq(td.attribute.type, "person"))@filter(eq(td.attribute.name@zh,"可乐")){
uid
expand(_all_)
}
}
英文查询有返回值
{
q(func: eq(td.attribute.type, "person"))@filter(eq(td.attribute.name@zh,"t1")){
uid
expand(_all_)
}
}
使用allofterms,中文英文均可查询
{
q(func: eq(td.attribute.type, "person"))@filter(allofterms(td.attribute.name@zh,"可乐")){
uid
expand(_all_)
}
}
使用anyofterms查询,中文查询数据不准确,英文查询准确
{
q(func: eq(td.attribute.type, "person"))@filter(anyofterms(td.attribute.name@zh,"可乐")){
uid
expand(_all_)
}
}