We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am quite new to ES and am using the sleimanx2/plastic package to integrate it with my app.
sleimanx2/plastic
I have got the following models:
Record and Contributor
Record
Contributor
In Record model:
/** * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function contributors() { return $this->belongsToMany(Contributor::class, 'contributor_record', 'record_id', 'contributor_id'); }
In Contributor model I have got the following relationship:
/** * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function records() { return $this->belongsToMany(Record::class, 'contributor_record', 'contributor_id', 'record_id'); }
Issue is that when I am trying to search against the contributor's name property I am getting the exception:
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: {\n \"nested\" : {\n \"query\" : {\n \"match\" : {\n \"contributors.name\" : {\n \"query\" : \" * Int * \",\n \"operator\" : \"OR\",\n \"prefix_length\" : 0,\n \"max_expansions\" : 50,\n \"fuzzy_transpositions\" : true,\n \"lenient\" : false,\n \"zero_terms_query\" : \"NONE\",\n
The code I am using to query the contributor's name is:
return $this->record->search()->nested('contributors', function (SearchBuilder $builder) use ($searchTerm) { $builder->match('contributors.name', ' * '.$searchTerm.' * '); })->size(500)->get()->hits();
Would you consider this a Mapping issue?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am quite new to ES and am using the
sleimanx2/plastic
package to integrate it with my app.I have got the following models:
Record
andContributor
In
Record
model:In
Contributor
model I have got the following relationship:Issue is that when I am trying to search against the contributor's name property I am getting the exception:
The code I am using to query the contributor's name is:
Would you consider this a Mapping issue?
The text was updated successfully, but these errors were encountered: