Hi David

This is certainly trickier - is there a reason why you can't store the code as 
a float attribute and filter on it instead?

Otherwise, you can tell Sphinx to index full stops (using the charset_table 
setting), but that can't be done on a per-field basis - so everything within 
the index will include full stops. Not ideal, really.

You could try the following instead - not sure if it'll work, but worth a shot:

  :conditions => {:code => '("43 320" | "43 330")'}

Cheers

-- 
Pat

On 12/08/2011, at 5:32 AM, David Krmpotic wrote:

> Pat,
> 
> Actually the real example I'm working with is this:
> 
> :conditions => {:code => "43.320 | 43.330"}
> 
> I discovered that the DOT is the problem. I simplified the example
> before, but perhaps I shouldn't have.
> 
> I don't know what to do about the dot now. Do you know?
> 
> Thank you!
> david
> 
> 
> On Aug 11, 3:28 pm, Pat Allan <[email protected]> wrote:
>> Hi David
>> 
>> Not sure why this isn't returning the right records - perhaps wrap the 
>> colour values in parentheses?
>> 
>>   :conditions => {:color => "(red | blue)"}
>> 
>> Also - if you're using conditions, you don't need to specify match_mode to 
>> be extended - it's done for you (no other way to match on particular fields.
>> 
>> Cheers
>> 
>> --
>> Pat
>> 
>> On 11/08/2011, at 11:00 PM, David Krmpotic wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Hello,
>> 
>>> I'd like to search on a field, but include a boolean expression, for
>>> example:
>> 
>>> {:match_mode=>:extended, :conditions=>{:color=>"red |
>>> blue"}, :retry_stale=>true, :page=>1, :per_page=>10}
>> 
>>> Let's say that I have 15 red records and 10 blue records.
>> 
>>> This should return 25 records, but it doesn't. The way it works for me
>>> is that it only takes into account the first specified value (red in
>>> this case) and only 15 red records are returned.
>> 
>>> How to make this work?
>> 
>>> Thank you!
>>> david
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Thinking Sphinx" group.> To post to this group, send email 
>>> [email protected].> To unsubscribe from this group, send 
>>> email [email protected].
>>> For more options, visit this group 
>>> athttp://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.
> 

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