Answer the question
In order to leave comments, you need to log in
Why does elasticsearch only search in one field?
Good day everyone.
I don’t understand a little here why elasticsearch searches for only one field, namely title.
Here is the indexing (I index the .docx file using ingest-attachment):
$fullfile = __DIR__.'/prrr23.docx';
$params = [
'index' => 'factoryfiles',
'type' => 'files',
'id' => 'testId',
'pipeline' => 'filesNtd',
'body' => [
'contentdocs' => base64_encode(file_get_contents($fullfile)),
'title' => 'Заголовок тестового документа',
],
];
$x = $this->obj->index($params);
$query = [
'multi_match' => [
'query' => '*жирным*',
'fields' => ['title', 'contentdocs'],
],
];
$searchParams = [
'index' => 'factoryfiles',
'type' => 'files',
'body' => [
'query' => $query
],
];
$x = $this->obj->search($searchParams);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question