Elasticsearch exact String match search with multiple range

POST /plans-en_us/_search
{
"query": {
"bool": {
"filter": [
{
"terms": {
"provider.id": [
"FkYJIg9%2FTjiRzUFN%2BVfIag",
"ro7hDWUMRbWuaMPQ0wfkGw"
],
"boost": 1
}
},
{
"range": {
"plan.booking_acceptance.period_start": {
"from": null,
"to": "2019-11-20T00:00:00.000Z",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"plan.booking_acceptance.period_end": {
"from": "2019-11-20T00:00:00.000Z",
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"plan.booking_acceptance.acceptance_start": {
"from": null,
"to": -2000,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"plan.booking_acceptance.cutoff_end": {
"from": -2000,
"to": null,
"include_lower": false,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.max_guest": {
"from": 4,
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.min_guest": {
"from": null,
"to": 4,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.max_adult": {
"from": 2,
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.min_adult": {
"from": null,
"to": 2,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.max_children": {
"from": 1,
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"item.min_children": {
"from": null,
"to": 1,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"provider.child_age_to": {
"from": 3,
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"version": false
}

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Performing SQL Queries on MS Access Database using UCanAccess JDBC Driver and VSCode

What are the different environments in a software development team?

Troubleshooting Workflows with Zenaton

Rise of the Mining Dead

Reactive input validation: another way

AWS Beginner Quick Start Guide

In this article, we will talk about the Cronos network, as one of the most advanced IBC projects.

Media.net (Directi) Interview Experience

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
DoggyFootGuy

DoggyFootGuy

More from Medium

Why String is Immutable in Java?

JVM — Java Virtual Machine

DSA | Cycle detection using Floyd’s algorithm

Java — Version Evolution