How to make where-and-or clause statement in elasticsearch?


(Guta Saputra) #1

im newbie in elasticsearch,
i want to create a query to search document using multiple parameters.

when i use one parameter, its work.

but when i use where / or statement it goes wrong.

what should i do?
i want to make query like this :

select * from motorvehicle_table where nama_kendaraan = "toyota" and
tahun_kendaraan = 2016 and tipe_kendaraan = "Non-Truck"

many thanks return in advance.
thank you.


(Isabel Drost-Fromm) #2

I think for the query you are describing you would be better served checking out the Boolean Query to chain your constraints together.

As an aside: When making future posts, instead of posting screenshots consider posting pre-formatted text (docs for syntax) instead, usually this is easier to read then having to scale images up and down.

Hope this helps,
Isabel


(system) #3