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

Received: by 10.42.76.136 with SMTP id e8mr396061ick.25.1314921740739;
        Thu, 01 Sep 2011 17:02:20 -0700 (PDT)
X-BeenThere: thinking-sphinx@googlegroups.com
Received: by 10.231.67.204 with SMTP id s12ls394381ibi.3.gmail; Thu, 01 Sep
 2011 17:02:19 -0700 (PDT)
Received: by 10.42.162.72 with SMTP id w8mr388988icx.32.1314921738793;
        Thu, 01 Sep 2011 17:02:18 -0700 (PDT)
Received: by 10.42.162.72 with SMTP id w8mr388987icx.32.1314921738782;
        Thu, 01 Sep 2011 17:02:18 -0700 (PDT)
Return-Path: <p...@freelancing-gods.com>
Received: from khmerlocal.com (67-207-129-237.slicehost.net [67.207.129.237])
        by gmr-mx.google.com with ESMTPS id z10si133073icv.7.2011.09.01.17.02.17
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 01 Sep 2011 17:02:17 -0700 (PDT)
Received-SPF: neutral (google.com: 67.207.129.237 is neither permitted nor denied by best guess record for domain of p...@freelancing-gods.com) client-ip=67.207.129.237;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 67.207.129.237 is neither permitted nor denied by best guess record for domain of p...@freelancing-gods.com) smtp.mail=...@freelancing-gods.com
Received: from 192-168-1-7.tpgi.com.au (14-201-69-166.static.tpgi.com.au [14.201.69.166])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by khmerlocal.com (Postfix) with ESMTPSA id 761473569B
	for <thinking-sphinx@googlegroups.com>; Fri,  2 Sep 2011 00:02:16 +0000 (UTC)
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Apple Message framework v1244.3)
Subject: Re: [ts] Problem (and possible bug?) with global search
From: Pat Allan <p...@freelancing-gods.com>
In-Reply-To: <21580952-B71C-4774-AE5B-FEF3348B368F@freelancing-gods.com>
Date: Fri, 2 Sep 2011 10:02:13 +1000
Content-Transfer-Encoding: quoted-printable
Message-Id: <2A2271E9-258B-44C4-BECC-CC8C324E393A@freelancing-gods.com>
References: <12150029.1180.1314277209784.JavaMail.geo-discussion-forums@yqgn17> <1E8BDBFE-00F2-4BE3-ADC2-CE28E6A5DD34@freelancing-gods.com> <18686243.4029.1314611458223.JavaMail.geo-discussion-forums@yqlo5> <C8B187C1-01C3-45D6-9805-EE9B1100A...@freelancing-gods.com> <CAMZZDn0qQoHB_zcKa_4ics=aHN_nOkeD3072-GEwJjv2ja0...@mail.gmail.com> <F9B17DB4-0D0C-4975-8869-501298E76...@freelancing-gods.com> <CAMZZDn1_QKvOS3csFhdzscAthvjNqJdHLb-COBHouVVQ7NT...@mail.gmail.com> <D5058EB9-63AF-49A3-8188-59C238A0E...@freelancing-gods.com> <CAMZZDn1UmiN-8fkcz2BPTud5VvL6MPuVm2+yXg51ePxS=OR...@mail.gmail.com> <21580952-B71C-4774-AE5B-FEF3348B3...@freelancing-gods.com>
To: thinking-sphinx@googlegroups.com
X-Mailer: Apple Mail (2.1244.3)

Okay, this is now fixed in the latest commits to both branches, if =
anyone wants to give it a spin.

--=20
Pat

On 31/08/2011, at 5:16 PM, Pat Allan wrote:

> Ah, I think you've got it - the bin_path setting hasn't come into play =
when ThinkingSphinx::Attribute is defined, and I'm pretty sure that's =
the problem.
>=20
> I'll try to get a fix out in the next 24 hours - but your workaround =
looks pretty good in the meantime.
>=20
> Thanks for the help Timo :)
>=20
> --=20
> Pat
>=20
> On 31/08/2011, at 4:22 PM, Timo Virkkala wrote:
>=20
>> Loading development environment (Rails 3.0.9)
>> irb(main):001:0> Riddle.loaded_version
>> =3D> "2.0.1"
>> irb(main):002:0> Riddle.loaded_version.to_i
>> =3D> 2
>>=20
>> 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?
>>=20
>> -Timo
>>=20
>> 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?
>>>=20
>>> --
>>> Pat
>>>=20
>>> On 30/08/2011, at 10:39 PM, Timo Virkkala wrote:
>>>=20
>>>> Hi,
>>>>=20
>>>> The problem persists with 2.0.7.
>>>>=20
>>>> I investigated further. The current monkey-patch I need to get =
things
>>>> working is:
>>>>=20
>>>> class ThinkingSphinx::Attribute
>>>> SphinxTypeMappings[:string] =3D :sql_attr_string
>>>> end
>>>>=20
>>>> 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.
>>>>=20
>>>> Could it be that Riddle.loaded_version fails at that point?
>>>>=20
>>>>=20
>>>> -Timo
>>>>=20
>>>>=20
>>>> 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
>>>>>=20
>>>>> --
>>>>> Pat
>>>>>=20
>>>>> On 30/08/2011, at 7:23 PM, Timo Virkkala wrote:
>>>>>=20
>>>>>> Hi,
>>>>>>=20
>>>>>> I'll try to create a minimal example and post that somewhere.
>>>>>> Meanwhile, some snippets from the current conf file:
>>>>>>=20
>>>>>> source brand_core_0
>>>>>> {
>>>>>> [...]
>>>>>> sql_query =3D SELECT [...] 3717453404 AS `class_crc`, =
IFNULL('Brand',
>>>>>> '') AS `sphinx_internal_class` [...]
>>>>>> [...]
>>>>>> sql_attr_uint =3D class_crc
>>>>>> sql_attr_str2ordinal =3D sphinx_internal_class
>>>>>> [...]
>>>>>> }
>>>>>>=20
>>>>>> Is that what you were looking for? That's from a table which does =
not
>>>>>> have STI. One STI table has the following:
>>>>>>=20
>>>>>> source party_core_0
>>>>>> {
>>>>>> [...]
>>>>>> sql_query =3D 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 =3D class_crc
>>>>>> sql_attr_str2ordinal =3D sphinx_internal_class
>>>>>> [...]
>>>>>> }
>>>>>>=20
>>>>>> -Timo
>>>>>>=20
>>>>>> On Tue, Aug 30, 2011 at 11:58, Pat Allan =
<p...@freelancing-gods.com> wrote:
>>>>>>> Hi Timo
>>>>>>>=20
>>>>>>> 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.
>>>>>>>=20
>>>>>>> --
>>>>>>> Pat
>>>>>>>=20
>>>>>>> On 29/08/2011, at 7:50 PM, Timo Virkkala wrote:
>>>>>>>=20
>>>>>>>> Hi Pat,
>>>>>>>>=20
>>>>>>>> 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'.
>>>>>>>>=20
>>>>>>>> -Timo
>>>>>>>>=20
>>>>>>>> --
>>>>>>>> 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=3Den.
>>>>>>>=20
>>>>>>> --
>>>>>>> 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=3Den.
>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>> --
>>>>>> 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=3Den.
>>>>>>=20
>>>>>=20
>>>>> --
>>>>> 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=3Den.
>>>>>=20
>>>>>=20
>>>>=20
>>>> --
>>>> 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=3Den.
>>>>=20
>>>=20
>>> --
>>> 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=3Den.
>>>=20
>>>=20
>>=20
>> --=20
>> 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=3Den.
>>=20
>=20
> --=20
> 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=3Den.
>=20