Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **How to query with fields which have whitespace in name?**
- **Example:**
- PUT my-index/my-type/my-id
- {
- "field name" : "field_value"
- }
- **Answer:**
- _we need to use **backslash** to escape **whitespace** character as shown below:_
- GET my_index/_search
- {
- "query":{
- "query_string": {
- "query": "field\\ name:\"field_value\""
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement