Hi all,
I've always passed my fields and attributes to search with the
conditions option, like this:
Model.search(:conditions => {:string => 'foo', :attribute => 1})
I now need to do some "or" searches, and it appears that the way to do
this is by converting this to a query string. This works fine when
dealing exclusively with a string field:
Model.search("(@string foo | @string bar)")
But it appears that I can't pass attributes in the same way. For
example, these searches will always return no results:
Model.search("@attribute 1")
Model.search("@string foo @attribute 1)")
Model.search("(@string foo | @string bar) @attribute 1")
These search examples could be handled by passing the attribute
using :conditions or :with. But what I'm still stuck on is how to
accomplish this:
Model.search("(@string foo | @attribute 1)")
As far as I can tell, this isn't possible. Any chance someone has
found a solution for this?
Thanks,
- Josh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---