Hi Pat,

Thanks for the assistance!  It worked perfectly.

s.park

On Dec 5, 2008, at 11:05 PM, Pat Allan wrote:

>
> Hi sparky
>
> You've almost got it right - the issue is that you're creating a field
> instead of an attribute. Try the following instead:
>
> has "expire_at is null or expire_at < NOW()", :as
> => :active_asset, :type => boolean
>
> And for searching:
>
> ThinkingSphinx::Search.search('some term', :with => {:active_asset =>
> true})
>
> Cheers
>
> --  
> Pat
>
> On 06/12/2008, at 8:03 AM, sparky wrote:
>
>>
>> Hi there, I've looked through the archives and have tried several of
>> their work arounds but am not able to resolve my own issue with
>> indexing a sql fragment.
>>
>> basically, i have something called an asset with an expire_at  
>> datetime
>> attribute.  I want to index unexpired assets as follows:
>>
>> indexes "expire_at is null or expire_at < NOW()", :as
>> => :active_asset, :type => boolean
>>
>> it looks like it indexes correctly, but the search result
>>
>> ThinkingSphinx::Search.search('some term', :conditions =>
>> {:active_asset => true}) always return an empty set.  the same thing
>> happens when i set :active_asset => false so something is wrong here.
>>
>> Anyone have any ideas on my syntax or how I could examine the index  
>> to
>> see what the indexer is actually doing in terms of indexing that sql
>> fragment?
>>
>> Thanks in advance for any help
>>
>> s.park
>>
>>>
>
>
> >


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