// This file is autogenerated, DO NOT EDIT // Use `node scripts/generate-docs-examples.js` to generate the docs examples [source, js] ---- const response = await client.explain({ index: "my-index-000001", id: 0, query: { script_score: { query: { match: { message: "elasticsearch", }, }, script: { source: "\n long count = doc['count'].value;\n double normalizedCount = count / 10;\n if (explanation != null) {\n explanation.set('normalized count = count / 10 = ' + count + ' / 10 = ' + normalizedCount);\n }\n return normalizedCount;\n ", }, }, }, }); console.log(response); ----