-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
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
Entities Indexing error #274
Comments
it sounds like you have to delete the index and start over. Did you give that a try? |
I have tried that but it start throwing the 'Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]' then in the ES logs i see the same type of error. also seeing 2020-12-08T19:59:14,864][INFO ][o.e.a.b.TransportShardBulkAction] [usda-nal-i5k.ttl.im] [website][0] mapping update rejected by primary Is there a section of the code where its making the bulk index requests where we can force the *_id to be the integer type we want? |
@erikattechslice I managed to test your code to index a small tripal site using Elasticsearch 7.
It's likely that the code we use to bulk index entities/pages is not supported by ES7. I'd go through the elasticsearch-php documentation to see if there is anything different that should be done. |
Hi Abdullah, Could you please share your test setup?
I tried going through the docker compose in tripal_elasticsearch but the
node health is being read in php as a string instead of an array. I have
not had this issue before.
specifically here:
if (!empty($health)) {
$header = array_keys($health);
$rows[] = array_values($health);
$output = theme('table', ['header' => $header, 'rows' => $rows]);
$form['health'] = [
'#type' => 'markup',
'#title' => t('Elasticsearch Server Health'),
'#description' => t(
'The table below shows the health of your local Elasticsearch server.'
),
'#markup' => '<h4>' . t('Local Elasticsearch Server Health')
. '</h4>' . '<p>' . t(
'The table below shows the health of your local Elasticsearch server.'
) . '</p>' . $output,
];
}
…On Thu, Dec 10, 2020 at 8:11 PM Abdullah Almsaeed ***@***.***> wrote:
@erikattechslice <https://github.com/erikattechslice> I managed to test
your code to index a small tripal site using Elasticsearch 7.
- Index gets created without issues.
- The indexing process went through without errors.
- But searching the index returns no results.
It's likely that the code we use to bulk index entities/pages is not
supported by ES7. I'd go through the elasticsearch-php documentation to see
if there is anything different that should be done.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQYKXIOWF3FAI5VKERBNDLLSUFWS7ANCNFSM4URDS6HA>
.
|
Docker is not working on my Mac for some reason so I switched to Laravel Homestead. If you are familar with Homestead, then I'd strongly recommend using it. Other than docker, I was also able to set it up directly on my machine but honestly it's a hassle to do it that way. |
For the indexes mapping. can we remove the fields section? Is this being
used for something im not seeing? Thanks
…-Erik
{
"website" : {
"aliases" : { },
"mappings" : {
"properties" : {
"content" : {
"type" : "text",
"fields" : {
"raw" : {
"type" : "text"
}
}
},
"nid" : {
"type" : "integer",
"fields" : {
"raw" : {
"type" : "integer"
}
}
},
"title" : {
"type" : "text",
"fields" : {
"raw" : {
"type" : "text"
}
}
},
"type" : {
"type" : "text",
"fields" : {
"raw" : {
"type" : "text"
}
}
}
}
},
"settings" : {
"index" : {
"number_of_shards" : "5",
"provided_name" : "website",
"max_result_window" : "1000000",
"creation_date" : "1607715231068",
"analysis" : {
"analyzer" : {
"website" : {
"filter" : [
"lowercase"
],
"type" : "custom",
"tokenizer" : "standard"
}
}
},
"number_of_replicas" : "0",
"uuid" : "wa-9ubSZTtC983ef2Y2Tow",
"version" : {
"created" : "7090299"
}
}
}
}
}
On Fri, Dec 11, 2020 at 12:45 PM Abdullah Almsaeed ***@***.***> wrote:
Docker is not working on my Mac for some reason so I switched to Laravel
Homestead <https://laravel.com/docs/8.x/homestead>. If you are familar
with Homestead, then I'd strongly recommend using it.
Other than docker, I was also able to set it up directly on my machine but
honestly it's a hassle to do it that way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQYKXINPB5747FHB434D6JLSUJLEDANCNFSM4URDS6HA>
.
|
https://github.com/erikattechslice/tripal_elasticsearch I have a fork and trying to get the module to work with ES7. Getting the below error for entities index:
site http://default] [TRIPAL ERROR] [TRIPAL_ELASTICSEARCH] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [entity_id] cannot be changed from type [integer] to [long]"}],"type":"illegal_argument_exception","reason":"mapper [entity_id] cannot be changed from type [integer] to [long]"},"status":400}
also seeing this warn spam from the cron:
Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]
Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]
Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]
Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]
Invalid argument supplied for foreach() file_entity.file.inc:248 [warning]
Invalid argument supplied for foreach() file_entity.file.inc:248
i tried to force tine entity_id to an int on line 175 of EntiitesIndexJob.php with 👍
$all[] = (object) [
'entity_id' => (int)($entity->id),
'title' => $title,
'bundle_label' => $record->bundle_label,
'content' => $content,
];
any thoughts? Thanks for the help
The text was updated successfully, but these errors were encountered: