<commit_before>setup:
  - do:
      indices.create:
          index: testidx
          body:
            mappings:
              testtype:
                properties:
                  text:
                    type :         "text"
                    term_vector :  "with_positions_offsets"
  - do:
      index:
        index: testidx
        type:  testtype
        id:    testing_document
        body:  {"text" : "The quick brown fox is brown."}

  - do:
      indices.refresh: {}

---
"Basic tests for multi termvector get":

  - do:
      mtermvectors:
        "term_statistics" : true
        "body" :
          "docs":
            -
                "_index" : "testidx"
                "_type" : "testtype"
                "_id" : "testing_document"

  - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
  - match: {docs.0.term_vectors.text.terms.brown.ttf: 2}

  - do:
        mtermvectors:
          "term_statistics" : true
          "body" :
            "docs":
              -
                  "_index" : "testidx"
                  "_type" : "testtype"
                  "_id" : "testing_document"

  - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
  - match: {docs.0.term_vectors.text.terms.brown.ttf: 2}

  - do:
        mtermvectors:
          "term_statistics" : true
          "index" : "testidx"
          "body" :<commit_msg>Test: mute failing mtermvector rest test<commit_after>setup:
  - do:
      indices.create:
          index: testidx
          body:
            mappings:
              testtype:
                properties:
                  text:
                    type :         "text"
                    term_vector :  "with_positions_offsets"
  - do:
      index:
        index: testidx
        type:  testtype
        id:    testing_document
        body:  {"text" : "The quick brown fox is brown."}

  - do:
      indices.refresh: {}

---
"Basic tests for multi termvector get":
  - skip:
      version: "all"
      reason:  "Test fails in ci see https://github.com/elastic/elasticsearch/issues/36281"
  - do:
      mtermvectors:
        "term_statistics" : true
        "body" :
          "docs":
            -
                "_index" : "testidx"
                "_type" : "testtype"
                "_id" : "testing_document"

  - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
  - match: {docs.0.term_vectors.text.terms.brown.ttf: 2}

  - do:
        mtermvectors:
          "term_statistics" : true
          "body" :
            "docs":
              -
                  "_index" : "testidx"
                  "_type" : "testtype"
                  "_id" : "testing_document"

  - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2}
  - match: {docs.0.term_vectors.text.terms.brown.ttf: 2}

  - do:
        mtermvectors:
          "term_statistics" : true
          "index" : "testidx"
          "body" :
{'fraction_non_alphanumeric': 0.11726046350743688, 'fraction_numerical': 0.007263922518159807, 'mean_word_length': 1.330378726833199, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7490344', 'n_tokens_mistral': 957, 'n_tokens_neox': 879, 'n_words': 177}