I see that items not having associated pictures don't have the field
"picture_ids", so maybe the easiest way was asking sphinx for that
field.... something like:

  Item.search(:conditions => { :picture_ids => !nil })

or something similar... does it exist any syntax for asking this?


Thanks again,

Iván

On Mar 25, 1:47 am, Iván Belmonte <[email protected]> wrote:
> Helllo there,
>
> I have a model like this:
>
> -------------
> define_index do
> indexes description
> indexes amount
> [...]
> indexes has_video   <----- this field is bool
> indexes pictures(:id), :as => :picture_ids
> [...]
> end
> --------------
>
> Then what i need to search is something like this:
>
> --------------
> Model.search("some keywords" (@has_video "1" | @picture_ids "*")
> --------------
>
> I mean, I need to match:
>   - "some keywords" AND
>   - "has_video" is set to "1" _OR_ Model has one or more Pictures
> associated.
>
> I didn't find any documentation about the second part... how can I do
> this?
>
> Thanks in advance!
>
> Ivan
--~--~---------~--~----~------------~-------~--~----~
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