I've this in my index: "ground beef".
This is my config:
settings:
index:
analysis:
analyzer:
index_analyzer:
tokenizer: whitespace
filter: [lowercase, asciifolding, word_delimiter, snowball]
This is how I search:
$query = new \Elastica\Query;
$boolQuery = new \Elastica\Query\Bool;
$matchQuery = new \Elastica\Query\Match;
$filter = new \Elastica\Filter\Term(array('visible' => 'true'));
$termQuery = new \Elastica\Query\Term;
$termQuery->setTerm('locale_id', $localeId);
$matchQuery->setFieldQuery('name', $name);
$matchQuery->setFieldParam('name', 'type', 'phrase_prefix');
$boolQuery->addMust($termQuery);
$boolQuery->addMust($matchQuery);
$query->setQuery($boolQuery);
$this->finder->findPaginated($query, array('from' => $from, 'size' => $size));
Everything works like charm.
If I search for "ground beef", I'll get my entities. If I search for "beef ground", nothing will be returned.
Has anyone an idea?