RSQL to Elasticsearch Query Converter

What is RSQL?

Introduction

RSQL (Rest Services Query Language is a language for writing queries to retrieve filtered resources from RESTful Services/APIs. Its basis is FIQL (Feed Item Query Language). Using RSQL, one can write human readable queries for retrieving the desired resources/data which in turn can be converted into Elasticsearch Query by the tool

RSQL Operators

Comparison Operators

Operator NameOperator SymbolAlternate Symbol Example 1 Example 2
Equal to==name == AlbertsearchText=='what is rsql'
Not Equal to!=firstName != albertaddress.postalCode != 12345
Greater Than>=gt=price > 10.50height =gt= 5.6
Greater Than or Equal to>==ge=price >= 20.99height =ge= 5.6
Less Than<=lt=interest.rate < 3.75height =lt= 5.6
Less Than or Equal to<==le=interest.rate <= 3.75 height =le= 5.6
In=in=color =in= (red,green,blue)address.country.city=in=('New York', Seattle, Vancouver)
Not in=out=food.ingredients =out= (nut, gluten, soya)item.size=out=(XL, XXl)

Logical Operators

Operator NameSymbolAlternate SymbolExample 1Example 2
ANDand;price <= 99.99 and color == greenprice >= 99.99;color != green
ORor,category == fruit or category == vegetablesize == 8,size == 10

Copyright © Karigar's Input/Output Tools 2020.