I am using Laravel 5.1
and the mustafaaloko/elasticquent5
package (found here).
But when trying to return results, I can only get results when searching for the exact word. If I try to search part of the word, it returns nothing.
I am using Profile::addAllToIndex();
and dd(Profile::search(Input::get('search_term')));
My config looks like this:
<?php
return array(
/*
|--------------------------------------------------------------------------
| Custom Elasticsearch Client Configuration
|--------------------------------------------------------------------------
|
| This array will be passed to the Elasticsearch client.
| See configuration options here:
|
| http://ift.tt/1rOUwKt
*/
'config' => [
'hosts' => ['ahp.dev:9200'],
'logging' => true,
'logPath' => storage_path() . '/logs/elasticsearch.log',
'logLevel' => Monolog\Logger::WARNING,
],
/*
|--------------------------------------------------------------------------
| Default Index Name
|--------------------------------------------------------------------------
|
| This is the index name that Elastiquent will use for all
| Elastiquent models.
*/
'default_index' => 'default',
);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire