let's say I want to have a search result whereby this particular field of each item has the string e.g # hashtag
like for example i have a data field named description, so what I want to get from the result, only those items that has a string 'hashtag' within their description like e.g
"the english alphabet has 28 letters #hashtag"
so, that item with this description field above should be included in the search result, because the description field value string has a "#hashtag" string inside.
how to do that in elastica ? what filtering or function should I use?
<?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
// The !== operator can also be used. Using != would not work as expected
// because the position of 'a' is 0. The statement (0 != false) evaluates
// to false.
if ($pos !== false) {
echo "The string '$findme' was found in the string '$mystring'";
echo " and exists at position $pos";
} else {
echo "The string '$findme' was not found in the string '$mystring'";
}
?>