Wild cards should work on not_analyzed fields. Not sure what's really going on here. Can you please give us a sample document here? Will try to load it into my local machine and see whats up.
OK Bhavana. We got the answer from someone who actually co-wrote elasticsearch the definitive guide
Here is what you need to try:
The `/` need to be escaped as well, so `page.keyword:http\\:\\/\\/www.somename.com\\/places\\/*`, otherwise `//` is considered an empty regex
You can use this to debug your queries to understand what is really being searched.
POST search_index/_validate/query?explain
{
"query": {
"query_string": {
"query": "page.keyword:http\://www.somename.com\/places\/*",
"analyze_wildcard": true
}
}
}
case 1)
page.keyword:"http\\:\\/\\/www.somename.com\\/places\\/"*
showing all the values in the index
case 2)
page.keyword:"http\\:\\/\\/www.somename.com\\/places\\/*"
No results
case 3)
page:http\\:\\/\\/www.somename.com\\/places\\/*
failed to parse query
case 4)
page.keyword:http\\:\\/\\/www.somename.com\\/places\\/*
failed to parse query
case 5)
"page.keyword:http\\:\\/\\/www.somename.com\\/places\\/*"
No results
case 6)
"page.keyword:http\\:\\/\\/www.somename.com\\/places\\/"*
showing all the values in the index
Could not able to get the required result with the above changes too,
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.