The issue here is probably that you're trying to use a string in a filter -- 
:with => {:status => 'a'}

Have a read of this part of the docs, should hopefully clear things up:
http://freelancing-god.github.com/ts/en/common_issues.html#string_filters

Cheers

-- 
Pat

On 28/07/2010, at 4:57 AM, badnaam wrote:

> I have a VoteTopic model that has_many vote_items, belongs_to
> category, user.
> 
> When I do an index listing of the Vote model I see a difference in the
> number of results returned between Searchlogic and TS. It seems
> Searchlogic returns the correct number of total entries (135) whereas
> TS returns 20.
> 
> LISTINGS_PER_PAGE is set to 10
> 
> #searchlogic
>                VoteTopic.all_approved.paginate(:page =>
> page, :per_page => Constants::LISTINGS_PER_PAGE)
> scope_procedure :all_approved, lambda
> {status_equals(STATUS['approved']).descend_by_created_at(:include =>
> [{:vote_items => :votes}, :user, :category])}
> 
> #ts
>        (VoteTopic.search "", :with => {:status => 'a'},:order
> => :created_at, :sort_mode => :desc, :include => [{:vote_items
> => :votes}, :user, :category]).
>          paginate(:page => page, :per_page =>
> Constants::LISTINGS_PER_PAGE)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/thinking-sphinx?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to