I have researched and read many posts on this and I thought I had found the
solution, but to no avail.
I have several fields or attributes that can be null. A null value
signifies we need to perform some action on these entities, such as
"welcome_call_needed". Once the call is made, a timestamp for when the call
was made is added to the attribute.
Here is my latest attempt at finding those attributes with null values.
In my Account index file I have :
ThinkingSphinx::Index.define(:account,
:with => :active_record,
:delta => ThinkingSphinx::Deltas::DelayedDelta) do
............
has "welcome_call_made IS NULL", :as => :need_welcome_call, :type =>
:boolean
............
end
MySQL query as follows in the console:
mysql> select count(*) from accounts WHERE welcome_call_made is NULL;
+----------+
| count(*) |
+----------+
| 3989 |
+----------+
1 row in set (0.00 sec)
The query from the Rails 3.2.8 Console produces:
irb(main):005:0> accounts = Account.search :with => { :need_welcome_call =>
true }
=> []
I am using Thinking Sphinx 3.1.4 and Ruby 1.9.3-p547 along with Rails 3.2.8
and MySQL 5.6. I am certain I am missing something very elementary. Sphinx
is phenomenal and if I can get passed this last small hurdle it will have
greatly improved the performance/response time in our app.
Thanks again for the assistance and the code.
Damon
--
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 https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.