All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rest-api-spec.test.mlt.20_docs.yml Maven / Gradle / Ivy

There is a newer version: 2.18.0
Show newest version
---
"Basic mlt query with docs":
  - do:
      indices.create:
        index: test_1
        body:
          settings:
            number_of_replicas: 0
  - do:
      index:
          index:  test_1
          id:     1
          body:   { foo: bar }

  - do:
      index:
          index:  test_1
          id:     2
          body:   { foo: baz }

  - do:
      index:
          index:  test_1
          id:     3
          body:   { foo: foo }

  - do:
      indices.refresh: {}

  - do:
      cluster.health:
           wait_for_status: green

  - do:
      search:
          rest_total_hits_as_int: true
          index:   test_1
          body:
            query:
              more_like_this:
                like:
                  -
                    _index: test_1
                    doc:
                      foo: bar
                  -
                    _index: test_1
                    _id: 2
                  -
                    _id: 3
                include: true
                min_doc_freq: 0
                min_term_freq: 0

  - match: { hits.total: 3 }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy