Hi AJ
Thinking Sphinx *should* pick up on bigint columns and treat them as such when
defining indexes - and when using Sphinx 0.9.9, all filter integers are sent
through as 64 bit integers... so I'm at a bit of a loss why this is
happening... however, let's start by looking at the source in the generated
development.sphinx.conf file - can you share the product source please? (Make
sure you remove the database password.)
Cheers
--
Pat
On 30/09/2010, at 4:47 AM, AJ Stiles wrote:
> 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.
>
--
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.