HTTP://本地主机:8080 /搜索/项terms.prefix = AB&terms.fl =文字和terms.sort =计
我有上述条款查询,我的工作正常。 返回“text”字段中具有特定前缀的所有术语,按count排序。
我想只返回另一个字段“language”为“en”的术语,我可以在术语查询中添加这样的过滤器吗?
http://localhost:8080/search/terms?terms.prefix=ab&terms.fl=text&terms.sort=count
I have the above terms query which works as I expect. Returns all the terms from the "text" field that have a certain prefix, sorted by count.
I want to return only the terms where another field "language" is "en" can I add such a filter to a terms query?
最满意答案
遗憾的是,您无法通过TermsComponent访问字段中的索引术语时进行TermsComponent 。 例如,当您提出自动建议时,这是您面临的限制之一。 如果您正在进行自动建议,支持过滤的方法之一是基于facet和前缀参数,如此处所述。
Unfortunately you can't filter while accessing the indexed terms within a field through the TermsComponent. That's one of the limitations you face when you make auto suggestions for example. If you're making auto-suggestions, one of the ways that supports filtering is based on a facet and the prefix parameter like explained here.
更多推荐
发布评论