date field comparison

12 views
Skip to first unread message

mohitnegi

unread,
Oct 14, 2011, 2:59:26 AM10/14/11
to thinkin...@googlegroups.com
Hi
I have a two models having one to many relationship user and test

a user can have multiple test.

Now there is a test_date field in test model.

so in my user model
i am creating sphinx index in user table.
How can i do sphinx search by test_date


define_index
 has test.test_date, :as =>testdate
end

Because ts only support integer field as multi.




Pat Allan

unread,
Oct 14, 2011, 10:19:42 PM10/14/11
to thinkin...@googlegroups.com
Have you tried using that attribute, just like you've defined it? It may work, as Sphinx stores times as integers.

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/UfTqSENWcMgJ.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Reply all
Reply to author
Forward
0 new messages