Hi Pat,


At the moment I'm filtering a sphinx search using a string attribute (using 
to_crc32), but I still don't know if this is the correct pattern if I just 
want a subset of a sphinx search.
The string attribute with I'm filtering is usually something like a closed 
set of states, conditions and/or types that the objects might have.

I'll try to investigate and learn a little bit more about sphinx (because 
at the moment my sphinx knowledge is still a bit shaky) and perhaps I'll 
come up with a different solution to my problem.

Thank you for your reply and for all the help.
Keep up the good work on Thinking Sphinx!

Cheers,

On Tuesday, 7 January 2014 22:02:43 UTC, Pat Allan wrote:
>
> Hi Pedro
>
> One thing that helps is that Sphinx v2 (which is required for TS v3) now 
> has proper string attributes, so they’re useful for storing values like 
> class names - which is the main thing TS v1/2 used CRC32 for, to figure out 
> what class to instantiate for each record.
>
> String attributes can’t be used for filtering though, so I also add a 
> field with the class name, and add clear conditions for that when searching 
> across multiple classes.
>
> Beyond string attributes and filtering on fields instead of attributes… 
> well, it depends what you’re trying to do. Is there something in particular 
> where CRC32 was being used that you’d now like to change?
>
> — 
> Pat
>
> On 8 Jan 2014, at 4:55 am, Pedro Carriço <[email protected]<javascript:>> 
> wrote:
>
> Hi Pat,
>
> What other ways have you found to avoid it and what do you recommend for 
> users migrating from v2 to v3?
>
> Thanks,
>
> On Saturday, 14 December 2013 00:14:49 UTC, Pat Allan wrote:
>>
>> Hi Onno
>>
>> That documentation is for v1/v2 of Thinking Sphinx, which added the 
>> to_crc32 method to the String class. The implementation of that method uses 
>> zlib from Ruby’s standard library:
>>
>> https://github.com/pat/thinking-sphinx/blob/v2/lib/thinking_sphinx/core/string.rb
>>
>> Those older versions of the gem made heavy use of the CRC32 function (in 
>> Ruby and in MySQL/PostgreSQL), but with v3 I’ve found ways to avoid it 
>> completely (and as a bonus, doesn’t add any methods to the String class). 
>> Of course, if you wish to use it, the old implementation should give you 
>> some ideas on how to do that.
>>
>> Cheers
>>
>> — 
>> Pat
>>
>> On 14 Dec 2013, at 12:47 am, Onno van der Straaten <
>> [email protected]> wrote:
>>
>> Hi,
>> I was wondering about the to_crc32 method. Mentoined 
>> http://pat.github.io/thinking-sphinx/facets.html. Where does it come 
>> from? When I try to use this method it just reports that it doesn't exist.
>> Cheers,
>> Onno
>>
>>
>> -- 
>> 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 http://groups.google.com/group/thinking-sphinx.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
> -- 
> 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] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to