How to search data in where condition

(雪中的凤凰) #1

Hi Team,

How to search as below condition when need search all without any key
" select * from XXX where header like '% abc%' '
for example:
i need to query all result, but if same ID ( same id like 'urn_newsml_reuters.com_20170413_nL8N1HL0Y7' and 'urn_newsml_reuters.com_20170413_nL8N1HL0Y7_abc') mean is one is general, another ones is for another purpose, the different is _XXX at behind), it only need show one.
my current code only

POST /news/ {  "query": { "bool": { "must": [  { "range": { "CDate": {  "gt": "2017-04-13T15:54:07" ,  "lte": "2017-04-13T23:59:59"  } } }  ] } },  "from": 0, "size": 100, "sort": [ { "CDate": { "order": "desc" } } ] }

this query only can search all, please kindly advice how to query as i told at above?

thanks and best regards

(Simon Willnauer) #2

sorry Sharon, your problem description doesn't make sense to me. Can you provide concrete examples of docs you want to match and what not?

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.