我的基准是我的索尔尔指数的2版,其中第1版包括:
searchable(:auto_index => false, :auto_remove => true,
:include => { :account => true,
:user_practice_contact => [:city],
:user_professional_detail => [:specialty, :subspecialties]}) do
第二:
searchable(:auto_index => false, :auto_remove => true) do
我期望看到该版本的速率,包括:
包括:
Benchmark.measure { User.limit(50).each do |u|; u.index; end; Sunspot.commit; }
=> #<Benchmark::Tms:0x1130b34e8 @real=6.8079788684845, @utime=5.05, @cstime=0.0, @cutime=0.0, @total=5.2, @label="", @stime=0.149999999999999>
并且没有:
Benchmark.measure { User.limit(50).each do |u|; u.index; end; Sunspot.commit; }
=> #<Benchmark::Tms:0x112ef0fe8 @real=6.82465195655823, @utime=4.92, @cstime=0.0, @cutime=0.0, @total=5.07, @label="", @stime=0.15>
Does anybody know if the includes are supposed to work? And if so, am I doing it wrong? I looked at the docs: http://outoftime.github.com/sunspot/rails/docs/ and see no mention of that.