1

I am trying to hit a query in elastic search. This is working fine except for '/' present in the search. the query is as shown below

GET styling_rules/product_line_filters/_search
{
  "query": {
    "filtered": {
      "query": {
        "query_string" : {
            "query" : "boyfriend / boxy"
        }
    },
      "filter": {
        "term": {
          "product_line_name": "women_blazers"
        }
      }
    }
  }
}

here in elasticsearch '/' is already present but with the query it is showing error. how to handle these situtation. Thanks in advance

1
  • Can you provide a sample document which should be matched against your query! Commented Apr 28, 2017 at 12:36

1 Answer 1

1

You need to escape that character. See here the full list of characters to be escaped in query_string: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.