문제

Hello I have a problem with elasticsearch php api, elastica.

if I run this:

$elasticaQueryMatch= new Elastica\Query\Match();
$elasticaQueryMatch->setField('fax', "16147591649");
$elasticaResultSet = $elasticaIndex->search($elasticaQueryMatch); 
var_dump($elasticaResultSet);

I get 7 results and the telephone number for all of the results is "16147591649"

Then if I run this:

$elasticaQueryMatch= new Elastica\Query\Match();
$elasticaQueryMatch->setField('telephone', "16147591649");
$elasticaResultSet = $elasticaIndex->search($elasticaQueryMatch); 
var_dump($elasticaResultSet);

I get 0 results

도움이 되었습니까?

해결책

Fixed it by creating a new index, changed my mapping and then rebuilt my index. It was the mapping and the analyzers for certain fields that were causing issues.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top