You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have two Eloquent models Eventdate and Event:
class EventDate {
use SearchableTrait;
public static $__es_config = [
'suggest' => ['event.name', 'event.excerpt', 'event.description']
];
public function event()
{
return $this->belongsTo(Event::class);
}
class Event {
use CallableTrait;
public function dates()
{
return $this->hasMany(EventDate::class);
}
I run the index process with:
php artisan larasearch:paths --relations --write-config Namespace\EventDate
php artisan larasearch:reindex --relations Namespace\EventDate
The index is created and I can succesfully do simple (exact match) searches. But I can't get suggestions to work, although I have them set up in the $__es_config property.
The response always gives me an empty options array:
In the bottom part you can see that [index] is not_analyzed. Shouldn't that be analyzed? Although the [fields] do have an analyzed array and suggest array. Don't know if I'm searching in the right direction? Is the mapping incorrect?
Can someone help with this? Thanks!
The text was updated successfully, but these errors were encountered:
Hi! I have two Eloquent models Eventdate and Event:
I run the index process with:
php artisan larasearch:paths --relations --write-config Namespace\EventDate
php artisan larasearch:reindex --relations Namespace\EventDate
The index is created and I can succesfully do simple (exact match) searches. But I can't get suggestions to work, although I have them set up in the
$__es_config
property.The response always gives me an empty options array:
I use the elasticsearch/elasticsearch package to query the index:
This gives me a huge array, but the (maybe) relevant parts looks like this:
In the bottom part you can see that
[index]
isnot_analyzed
. Shouldn't that beanalyzed
? Although the[fields]
do have ananalyzed
array andsuggest
array. Don't know if I'm searching in the right direction? Is the mapping incorrect?Can someone help with this? Thanks!
The text was updated successfully, but these errors were encountered: