Can get only one kind of search to to return results


(Dave K) #1

I have tried many queries to return phrases from our indexes. I'm calling this a full text search.

The individual setting up our elasticsearch indexes came up with the following form of search:
{"query": {"bool":{"must":[{"wildcard":{"DESC":" + phrase + "}}]}}}
Unless I do a wildcard search I do not get any results or correct results.

The phrase is of the form, for example: "post traumatic stress disorder".
{"query": {"bool":{"must":[{"wildcard":{"DESC":" + "post traumatic stress disorder" + "}}]}}}

Our web app is developed in C# (the back slash is an escape character not included in the search when it's submitted). I'm doing the searches via the browser setting the commands via body searches.

This format return exact matches. If the search phrase is "post traumatic stress disorder", all records returned
contain the exact phrase "post traumatic stress disorder". I do not get back the documents containing
"Post Traumatic Stress Disorder".

How can I get all documents containing "post traumatic stress disorder" regardless of the case the phrase contains?

Thanks,
Dave K


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.