lundi 20 janvier 2020

Elastic search returning incorrect results

I am using elastic search with laravel.

When I pass value "abbas" to $q, elastic search returns results matching with abbas as well as robert. Query is:

$q = Input::get('q');

    $pararm = [            
        'bool'=>[
            'must'=>[
                'wildcard'=>[
                    '_all'=>[
                        'value'=>"*".strtolower($q)."*"                                   
                    ]
                ]
            ]
        ]
    ];

    $arrobjUsers    = collect(User::searchByQuery($pararm))->keyBy('id');

Please let me know where I am wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire