I have a products table that looks like this:

explain products;
+--------------+---------------------+------+-----+---------
+----------------+
| Field        | Type                | Null | Key | Default |
Extra          |
+--------------+---------------------+------+-----+---------
+----------------+
| id           | bigint(20) unsigned | NO   | PRI | NULL    |
auto_increment |
| campaign_id  | bigint(20) unsigned | NO   |     | NULL
|                |
| title        | varchar(255)        | NO   |     | NULL
|                |
+--------------+---------------------+------+-----+---------
+----------------+

My index is defined like this:

class Product < ActiveRecord
  define_index do
    indexes title
    has campaign_id
  end
end

Note that campaign_id is a 64-bit number. If I search like this
(not :with) I get expected matches:

Product.search("something that matches", :match_mode => :any)

If I add a :with criteria against the campaign_id attribute, and I
know it matches, I get an empty array back:

Product.search("something that matches", :match_mode => :any, :with =>
{:campaign_id => 11034677780151994064})

Using Rails 3, TS 2.0.0.rc2, MySQL 5.0. Sphinx 0.9.9, compiled for 64-
bit document ids.

Any ideas?

AJ

-- 
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