I have a document with a tag '*'
Yet when I construct a term query it returns no results. How can I query documents with the tag '*'. My guess is it's a special character that needs to be escaped.
Update with answer
I needed to set the property to not analyzed so that elastic search wouldn't strip out punctuation etc.
$myTypeMapping = array( '_source' => array( 'enabled' => true ), 'properties' => array( 'tag' => array("type" => "string", "index" => "not_analyzed") ) ); $indexParams['body']['mappings']['file'] = $myTypeMapping;