[Search] Update the shard failure testing instructions in search_source.ts (#165281)

## Summary

While working with @1Copenut on troubleshooting an EUI upgrade issue, we
ran into some problems following these instructions, so I've updated
them to include the full steps needed to test shared failures.

---------

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Davis McPhee 2023-09-01 11:15:21 -03:00 committed by GitHub
parent 26afc4d196
commit f721e3a82e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -918,8 +918,12 @@ export class SearchSource {
};
body.query = buildEsQuery(index, query, filters, esQueryConfigs);
// For testing shard failure messages in UI, uncomment the next block and switch to `kibana*` data view
// body.query = {
// For testing shard failure messages in the UI, follow these steps:
// 1. Add all three sample data sets (flights, ecommerce, logs) to Kibana.
// 2. Create a data view using the index pattern `kibana*` and don't use a timestamp field.
// 3. Uncomment the lines below, navigate to Discover,
// and switch to the data view created in step 2.
// body.query.bool.must.push({
// error_query: {
// indices: [
// {
@ -930,7 +934,8 @@ export class SearchSource {
// },
// ],
// },
// };
// });
// Alternatively you could also add this query via "Edit as Query DSL", then it needs no code to be changed
if (highlightAll && body.query) {
body.highlight = getHighlightRequest(getConfig(UI_SETTINGS.DOC_HIGHLIGHT));