具有AND运算符的弹性搜索URI查询 [英] Elasticsearch URI based query with AND operator
本文介绍了具有AND运算符的弹性搜索URI查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在基于URI的查询中指定AND操作?我正在寻找类似的东西:
How do I specify AND operation in URI based query? I'm looking for something like:
http://localhost:9200/_search?q="profiletype:student AND username:s*"
推荐答案
根据文档,正如你所描述的那样。请参阅 http://www.elasticsearch.org/guide/参考/ query-dsl / query-string-query.html
According to documentation, it should work as you described it. See http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html
也就是说,您还可以使用以下内容:
That said, you can also use the following:
http://localhost:9200/_search?q="+profiletype:student +username:s*"
这篇关于具有AND运算符的弹性搜索URI查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文