OR and AND Operators in Elasticsearch query

前端 未结 2 2064
醉梦人生
醉梦人生 2021-02-13 01:59

I have few json document with the following format :-

    _source: {
            userId: \"A1A1\",
            customerId: \"C1\",
            component: \"comp_         


        
2条回答
  •  一整个雨季
    2021-02-13 02:52

    If you use a query_string query, your ANDs and ORs will be interpreted as such by the Lucene library.

    This allows you to search for

    (currentUserId OR currentCustomerId) AND currentComponent
    

    for instance. By default, the values will be searched for in all fields.

提交回复
热议问题