2

As a result of the following query to the type:

"query": {
     "simple_query_string" : {
          "query" : "RUDVRUMMXXX"
        }
  }

I get 5 hits. RUDVRUMMXXX is the entire text value of some field.

When I try to search with just a bit of its value (e.x. VRUMMXXX, or VRUMMX) elastic finds nothing.

I tried to add wildcard like that:

"query": {
     "simple_query_string" : {
          "query" : "*VRUMMXXX",
          "analyze_wildcard" : true
        }
  }

but get zero result anyway.

also tried this:

"query": {
     "wildcard" : {
          "query" : "*VRUMMXXX"
        }
  }

...same success.

Any help is appreciated.

1 Answer 1

3

Try this:

 { 
   "query": 
      { 
         "query_string" : 
           { 
                 "query" : "*VRUMMXXX"
            } 
       } 
 }
Sign up to request clarification or add additional context in comments.

2 Comments

Error: "type": "query_parsing_exception", "reason": "[_na] query malformed, no field after start_object"
still 0 hits :( I've substituted "some_field" with correct one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.