Elasticsearch URI based query with AND operator

后端 未结 4 1504
一向
一向 2021-01-31 09:00

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*\"
         


        
4条回答
  •  天命终不由人
    2021-01-31 09:49

    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*"
    

提交回复
热议问题