[英]RediSearch: OR union on 2 tag fields doesn't work?
Hello I am new to using Redisearch.您好,我是使用 Redisearch 的新手。 When I try to do a search on 2 tag fields with or union, something like
当我尝试使用或联合搜索 2 个标记字段时,类似于
FT.SEARCH Idx "@TagOne:{tag} | @TagTwo:{tag}" FT.SEARCH Idx "@TagOne:{tag} | @TagTwo:{tag}"
redis reports syntax error, apparently @Tag{} doesn't work of it is in front of '|' redis 报告语法错误,显然@Tag{} 不起作用它在'|'前面but it is okay when it is behind it.
但是当它在它后面时没关系。 I can combine other types of fields with tag in a OR union, but there can be at most one tag field in the union, is it designed this way?
我可以在OR union中将其他类型的字段与tag结合起来,但是union中最多可以有一个tag字段,是这样设计的吗?
FT.SEARCH Idx "@TagOne|TagTwo:{tag}" doesn't work either. FT.SEARCH Idx "@TagOne|TagTwo:{tag}" 也不起作用。 Is there a way around this?
有没有解决的办法?
I am using redisearch v. 2.2.5我正在使用 redisearch v. 2.2.5
please add parentheses: FT.SEARCH Idx "(@TagOne:{tag}) | (@TagTwo:{tag})"请添加括号:FT.SEARCH Idx "(@TagOne:{tag}) | (@TagTwo:{tag})"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.