elasticsearch-codeigniter-library icon indicating copy to clipboard operation
elasticsearch-codeigniter-library copied to clipboard

Add multiple Filters to a search

Open howzit opened this issue 10 years ago • 9 comments

Hi, I am struggling to understand how to add multiple filters to a search. Can you assist?

howzit avatar Nov 14 '15 09:11 howzit

If you still have problem i can assist.

confact avatar Aug 09 '16 12:08 confact

Hello, may I have the example of search?

tejashwikalptaru avatar Feb 22 '17 13:02 tejashwikalptaru

hi, can you comment example search query

sk-karthik avatar Jun 23 '17 12:06 sk-karthik

Hello,please provide the example of search ? query_all is not support LIKE Statement .. How i execute search operation ?

chirayushri avatar Aug 07 '18 07:08 chirayushri

Sample Search Query { "query":{ "bool":{ "must":[ {"match":{"createdDate":"2018-07-15"}}, {
"bool":{ "should":[ {"match":{"status":"Y"}}, {"match":{"deletestatus":"N"}} ] } }
] } } }

sk-karthik avatar Aug 07 '18 08:08 sk-karthik

its worked for exact match.. how i perform like operation as in sql for elastic ?? How i query following please ?? Select * from lists where list_name LIKE '%edu%'

chirayushri avatar Aug 07 '18 11:08 chirayushri

You can use "match_phrase"

{ "query": { "match_phrase": { "list_name": "edu" } } }

sk-karthik avatar Aug 07 '18 12:08 sk-karthik

plz give example for this library which function used for execute this format query ..

chirayushri avatar Aug 07 '18 13:08 chirayushri

@chirayushri this is easy to do with the advancedquery function. just do what @sk-karthik say, by making a json object to send as one of the paramater to the advancedquery function.

confact avatar Apr 12 '19 14:04 confact