|
413 | 413 | - match: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 0 } |
414 | 414 |
|
415 | 415 | --- |
416 | | -"indices mappings exact count test for indices level": |
417 | | - |
418 | | - - requires: |
419 | | - test_runner_features: [arbitrary_key] |
420 | | - reason: "_ignored_source added to mappings" |
421 | | - |
422 | | - - do: |
423 | | - indices.create: |
424 | | - index: index1 |
425 | | - body: |
426 | | - settings: |
427 | | - number_of_shards: 4 |
428 | | - number_of_replicas: 0 |
429 | | - mappings: |
430 | | - runtime: |
431 | | - a_source_field: |
432 | | - type: keyword |
433 | | - properties: |
434 | | - "@timestamp": |
435 | | - type: date |
436 | | - authors: |
437 | | - properties: |
438 | | - age: |
439 | | - type: long |
440 | | - company: |
441 | | - type: text |
442 | | - fields: |
443 | | - keyword: |
444 | | - type: keyword |
445 | | - ignore_above: 256 |
446 | | - name: |
447 | | - properties: |
448 | | - first_name: |
449 | | - type: keyword |
450 | | - full_name: |
451 | | - type: text |
452 | | - last_name: |
453 | | - type: keyword |
454 | | - link: |
455 | | - type: alias |
456 | | - path: url |
457 | | - title: |
458 | | - type: text |
459 | | - url: |
460 | | - type: keyword |
461 | | - |
462 | | - - do: |
463 | | - nodes.info: {} |
464 | | - - set: |
465 | | - nodes._arbitrary_key_: node_id |
466 | | - |
467 | | - - do: |
468 | | - nodes.stats: { metric: _all, level: "indices", human: true } |
469 | | - |
470 | | - # In the below assertions, we expect a field count of 26 because the above mapping expects the following: |
471 | | - # Field mappers (incl. alias fields and object mappers' flattened leaves): |
472 | | - # 1. _data_stream_timestamp |
473 | | - # 2. _doc_count |
474 | | - # 3. _feature |
475 | | - # 4. _field_names |
476 | | - # 5. _id |
477 | | - # 6. _ignored |
478 | | - # 7. _ignored_source |
479 | | - # 8. _index |
480 | | - # 9. _index_mode |
481 | | - # 10. _nested_path |
482 | | - # 11. _routing |
483 | | - # 12. _seq_no |
484 | | - # 13. _source |
485 | | - # 14. _tier |
486 | | - # 15. _version |
487 | | - # 16. @timestamp |
488 | | - # 17. authors.age |
489 | | - # 18. authors.company |
490 | | - # 19. authors.company.keyword |
491 | | - # 20. authors.name.last_name |
492 | | - # 21. authors.name.first_name |
493 | | - # 22. authors.name.full_name |
494 | | - # 23. link |
495 | | - # 24. title |
496 | | - # 25. url |
497 | | - # Object mappers: |
498 | | - # 26. authors |
499 | | - # 27. authors.name |
500 | | - # Runtime field mappers: |
501 | | - # 28. a_source_field |
502 | | - |
503 | | - - gte: { nodes.$node_id.indices.mappings.total_count: 28 } |
504 | | - - is_true: nodes.$node_id.indices.mappings.total_estimated_overhead |
505 | | - - gte: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 26624 } |
506 | | - - match: { "nodes.$node_id.indices.indices.${_project_id_prefix_}index1.mappings.total_count": 28 } |
507 | | - - is_true: "nodes.$node_id.indices.indices.${_project_id_prefix_}index1.mappings.total_estimated_overhead" |
508 | | - - match: { "nodes.$node_id.indices.indices.${_project_id_prefix_}index1.mappings.total_estimated_overhead_in_bytes": 28672 } |
509 | | - |
510 | | ---- |
511 | | -"Lucene segment level fields stats": |
512 | | - |
513 | | - - do: |
514 | | - indices.create: |
515 | | - index: index1 |
516 | | - body: |
517 | | - settings: |
518 | | - number_of_shards: 1 |
519 | | - number_of_replicas: 0 |
520 | | - routing.rebalance.enable: none |
521 | | - mappings: |
522 | | - runtime: |
523 | | - a_source_field: |
524 | | - type: keyword |
525 | | - properties: |
526 | | - "@timestamp": |
527 | | - type: date |
528 | | - authors: |
529 | | - properties: |
530 | | - age: |
531 | | - type: long |
532 | | - company: |
533 | | - type: text |
534 | | - fields: |
535 | | - keyword: |
536 | | - type: keyword |
537 | | - ignore_above: 256 |
538 | | - name: |
539 | | - properties: |
540 | | - first_name: |
541 | | - type: keyword |
542 | | - full_name: |
543 | | - type: text |
544 | | - last_name: |
545 | | - type: keyword |
546 | | - link: |
547 | | - type: alias |
548 | | - path: url |
549 | | - title: |
550 | | - type: text |
551 | | - url: |
552 | | - type: keyword |
553 | | - - do: |
554 | | - cluster.state: {} |
555 | | - |
556 | | - - set: |
557 | | - routing_table.indices.index1.shards.0.0.node: node_id |
558 | | - |
559 | | - - do: |
560 | | - nodes.stats: { metric: _all, level: "indices", human: true } |
561 | | - |
562 | | - - do: |
563 | | - index: |
564 | | - index: index1 |
565 | | - body: { "title": "foo", "@timestamp": "2023-10-15T14:12:12" } |
566 | | - - do: |
567 | | - indices.flush: |
568 | | - index: index1 |
569 | | - - do: |
570 | | - nodes.stats: { metric: _all, level: "indices", human: true } |
571 | | - |
572 | | - - gte: { nodes.$node_id.indices.mappings.total_count: 28 } |
573 | | - - lte: { nodes.$node_id.indices.mappings.total_count: 30 } |
574 | | - - gte: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 28672 } |
575 | | - - lte: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 30720 } |
576 | | - - match: { nodes.$node_id.indices.mappings.total_segments: 1 } |
577 | | - - gte: { nodes.$node_id.indices.mappings.total_segment_fields: 28 } |
578 | | - - lte: { nodes.$node_id.indices.mappings.total_segment_fields: 30 } |
579 | | - - gte: { nodes.$node_id.indices.mappings.average_fields_per_segment: 28 } |
580 | | - - lte: { nodes.$node_id.indices.mappings.average_fields_per_segment: 30 } |
581 | | - |
582 | | - - do: |
583 | | - index: |
584 | | - index: index1 |
585 | | - body: { "title": "bar", "@timestamp": "2023-11-15T14:12:12" } |
586 | | - - do: |
587 | | - indices.flush: |
588 | | - index: index1 |
589 | | - - do: |
590 | | - nodes.stats: { metric: _all, level: "indices", human: true } |
591 | | - |
592 | | - - gte: { nodes.$node_id.indices.mappings.total_count: 28 } |
593 | | - - lte: { nodes.$node_id.indices.mappings.total_count: 30 } |
594 | | - - gte: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 28672 } |
595 | | - - lte: { nodes.$node_id.indices.mappings.total_estimated_overhead_in_bytes: 30720 } |
596 | | - - match: { nodes.$node_id.indices.mappings.total_segments: 2 } |
597 | | - - gte: { nodes.$node_id.indices.mappings.total_segment_fields: 56 } |
598 | | - - lte: { nodes.$node_id.indices.mappings.total_segment_fields: 60 } |
599 | | - - gte: { nodes.$node_id.indices.mappings.average_fields_per_segment: 28 } |
600 | | - - lte: { nodes.$node_id.indices.mappings.average_fields_per_segment: 30 } |
601 | | ---- |
602 | 416 |
|
603 | 417 | "indices mappings does not exist in shards level": |
604 | 418 |
|
|
0 commit comments