elasticsearch-model/spec/elasticsearch/model/adapters/active_record/associations_spec.rb [101:132]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Post.__elasticsearch__.refresh_index!
      end

      let(:category_a) do
        Category.where(title: "One").first_or_create!
      end

      let(:category_b) do
        Category.where(title: "Two").first_or_create!
      end

      let(:post) do
        Post.create! title: "First Post", text: "This is the first post..."
      end

      let(:search_result) do
        Post.search(query: {
                      bool: {
                        must: {
                          multi_match: {
                            fields: ['title'],
                            query: 'first'
                          }
                        },
                        filter: {
                          terms: {
                            categories: ['One']
                          }
                        }
                      }
                    } )
      end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elasticsearch-model/spec/elasticsearch/model/adapters/active_record/associations_spec.rb [146:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Post.__elasticsearch__.refresh_index!
      end

      let(:category_a) do
        Category.where(title: "One").first_or_create!
      end

      let(:category_b) do
        Category.where(title: "Two").first_or_create!
      end

      let(:post) do
        Post.create! title: "First Post", text: "This is the first post..."
      end

      let(:search_result) do
        Post.search(query: {
                      bool: {
                        must: {
                          multi_match: {
                            fields: ['title'],
                            query: 'first'
                          }
                        },
                        filter: {
                          terms: {
                            categories: ['One']
                          }
                        }
                      }
                    } )
      end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



