Sha256: afd98bc86fe1356ed3bc867e8b047dcf9e3ce46c21390f68a363c9c9eb28f1f6

Contents?: true

Size: 703 Bytes

Versions: 17

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

require 'acceptance/spec_helper'

describe 'Executing multiple searches in one Sphinx call', :live => true do
  it "returns results matching the given queries" do
    pancakes = Article.create! :title => 'Pancakes'
    waffles  = Article.create! :title => 'Waffles'
    index

    batch = ThinkingSphinx::BatchedSearch.new
    batch.searches << Article.search('pancakes')
    batch.searches << Article.search('waffles')

    batch.populate

    expect(batch.searches.first).to include(pancakes)
    expect(batch.searches.first).not_to include(waffles)

    expect(batch.searches.last).to include(waffles)
    expect(batch.searches.last).not_to include(pancakes)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.5.1 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.5.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.4.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.3.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.2.1 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.2.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.1.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-5.0.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.4.1 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.4.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.3.2 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.3.1 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.3.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.2.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.1.0 spec/acceptance/batch_searching_spec.rb
thinking-sphinx-4.0.0 spec/acceptance/batch_searching_spec.rb