Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problem (and possible bug?) with global search
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Timo Virkkala  
View profile  
 More options Aug 31 2011, 2:22 am
From: Timo Virkkala <timo.virkk...@gmail.com>
Date: Wed, 31 Aug 2011 09:22:29 +0300
Local: Wed, Aug 31 2011 2:22 am
Subject: Re: [ts] Problem (and possible bug?) with global search
Loading development environment (Rails 3.0.9)
irb(main):001:0> Riddle.loaded_version
=> "2.0.1"
irb(main):002:0> Riddle.loaded_version.to_i
=> 2

No problems there. I'm just wondering - Riddle seems to check the
loaded version by running the indexer binary. But at what time does it
load the bin_path from the configuration? Could it be that at the time
the SphinxTypeMappings map is built, the bin_path is not yet known? Or
does it maybe run the indexer at that point with a wrong path?

-Timo

On Wed, Aug 31, 2011 at 02:20, Pat Allan <p...@freelancing-gods.com> wrote:
> Looks like it - can you check the value of Riddle.loaded_version in script/console?

> --
> Pat

> On 30/08/2011, at 10:39 PM, Timo Virkkala wrote:

>> Hi,

>> The problem persists with 2.0.7.

>> I investigated further. The current monkey-patch I need to get things
>> working is:

>> class ThinkingSphinx::Attribute
>>  SphinxTypeMappings[:string] = :sql_attr_string
>> end

>> So, it seems that setting that in ThinkingSphinx::Attribute somehow
>> fails. Normally the code in ThinkingSphinx::Attribute checks
>> Riddle.loaded_version.to_i > 1 and sets that if the result is true.

>> Could it be that Riddle.loaded_version fails at that point?

>> -Timo

>> On Tue, Aug 30, 2011 at 13:44, Pat Allan <p...@freelancing-gods.com> wrote:
>>> Right - the sphinx_internal_class shouldn't be sql_attr_str2ordinal, but sql_attr_string. That's the problem, but as for the cause... can you try the latest TS gem release instead of Github? v2.0.7

>>> --
>>> Pat

>>> On 30/08/2011, at 7:23 PM, Timo Virkkala wrote:

>>>> Hi,

>>>> I'll try to create a minimal example and post that somewhere.
>>>> Meanwhile, some snippets from the current conf file:

>>>> source brand_core_0
>>>> {
>>>>  [...]
>>>>  sql_query = SELECT [...] 3717453404 AS `class_crc`, IFNULL('Brand',
>>>> '') AS `sphinx_internal_class` [...]
>>>>  [...]
>>>>  sql_attr_uint = class_crc
>>>>  sql_attr_str2ordinal = sphinx_internal_class
>>>>  [...]
>>>> }

>>>> Is that what you were looking for? That's from a table which does not
>>>> have STI. One STI table has the following:

>>>> source party_core_0
>>>> {
>>>>  [...]
>>>>  sql_query = SELECT [...]  CASE IFNULL(`parties`.`type`, '') WHEN
>>>> 'Person' THEN 863032384 WHEN 'Organization' THEN 3655317636 ELSE
>>>> 1213489636 END AS `class_crc`, IFNULL(`parties`.`type`, '') AS
>>>> `sphinx_internal_class` [...]
>>>>  [...]
>>>>  sql_attr_uint = class_crc
>>>>  sql_attr_str2ordinal = sphinx_internal_class
>>>>  [...]
>>>> }

>>>> -Timo

>>>> On Tue, Aug 30, 2011 at 11:58, Pat Allan <p...@freelancing-gods.com> wrote:
>>>>> Hi Timo

>>>>> Thanks for getting back to me. Can you share your development.sphinx.conf file in a gist or similar? Make sure you remove the database password from each source.

>>>>> --
>>>>> Pat

>>>>> On 29/08/2011, at 7:50 PM, Timo Virkkala wrote:

>>>>>> Hi Pat,

>>>>>> And thanks for the quick reply. Yeah, it happens in all environments. We do have some STI with a column called 'type' in one table. But the problem exists even when I limit indexing to only one of our models (and remove the older index files), and that one doesn't have a column called 'type'.

>>>>>> -Timo

>>>>>> --
>>>>>> 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/-/2ebUP3XjggEJ.
>>>>>> To post to this group, send email to thinking-sphinx@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
>>>>>> 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 thinking-sphinx@googlegroups.com.
>>>>> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
>>>>> 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 thinking-sphinx@googlegroups.com.
>>>> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
>>>> 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 thinking-sphinx@googlegroups.com.
>>> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
>>> 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 thinking-sphinx@googlegroups.com.
>> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
>> 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 thinking-sphinx@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.