Hi all,
i've this strange problem
thinking_sphinx.yml
development:
>
> mysql41: 9301
>
> mem_limit: 1024M
>
> dict: keywords
>
> enable_star: true
>
> min_prefix_len: 3
>
> sql_range_step: 10000000
>
> test:
>
> mysql41: 9303
>
> mem_limit: 1024M
>
> dict: keywords
>
> enable_star: true
>
> min_prefix_len: 3
>
> sql_range_step: 10000000
>
>
module SphinxHelper
>
> def init_thinking_sphinx
>
> ThinkingSphinx::Test.init
>
> ThinkingSphinx::Test.start_with_autostop
>
> index
>
> end
>
>
>> def index
>
> ThinkingSphinx::Test.index
>
> sleep 0.25 until index_finished?
>
> end
>
>
>> def index_finished?
>
> Dir[Rails.root.join(ThinkingSphinx::Test.config.indices_location,
>> '*.{new,tmp}.*')].empty?
>
> end
>
> end
>
>
class PostSphinxTest < ActiveSupport::TestCase
>
>
>> def setup
>
> init_thinking_sphinx
>
> @user = create(:user)
>
> end
>
>
>> test 'sphinx order by created_at desc' do
>
> search = PostSearch.new(@user, order: 'created_at', direction: 'desc')
>
> requests = Request.ts_search(search)
>
> requests.each_with_index do |r, i|
>
> rr = requests[i+1]
>
> if rr
>
> assert_operator r.created_at, :>=, rr.created_at
>
> end
>
> end
>
> end
>
>
when i run this test i get this error
ThinkingSphinx::Search::StaleIdsException: Record IDs found by Sphinx but
> not by ActiveRecord
This error occurs even if i run only this specific test
It seems indeces aren't syncronized with the test database
Any suggestion or help?
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.