Wild Card Search on Analyzed fields

We are unable to provide wildcard based search on anlyzed fields

We want to impliment starts with and endswith functionality for the fields
Consider the following document
{
"fid": 175764,
"eval": null,
"tval": "multi Layered mobile screen",
"sval": null,
"cval": null,
"ival": "",
"nval": "",
"modd": "2014-01-01",
"modu": "polaris virtusa"
}

Here field "tval" uses statndard analyzer for indexing
if user serches for tval = "^multi layered", above document to be return as it starts with same set of terms
if user serches for tval = "mobile screen^", above document to be return as it ends with same set of terms

We are unable to implement above functionality on analyzed fields
is there any way to achieve this ?

Note : using ES 2.2

I think you'll need to also index that field as unanalyzed if you want wildcard queries to work on the entire string.

Separately, I don't think ES accepts the ^ for begin/end anchoring.

See https://www.elastic.co/guide/en/elasticsearch/guide/current/_wildcard_and_regexp_queries.html for details.

1 Like

Thank you mike
I think not analyzed would solve my problem