Hi Mark
This seems to be a bug in Sphinx as far as I can tell (happens with
the command line tool as well as Thinking Sphinx/Riddle). I'm not sure
if there's cleaner solutions out there, but something that I just
described for another email on this list is to add a manual field so
there's a word that appears in every result:
indexes "'sphinxisbuggy'", :as => :catch_all
# ...
Job.search "sphinxisbuggy", :conditions => {:location => '-"San
Francisco CA"'}
Sorry I can't be more helpful.
--
Pat
On 24/02/2009, at 7:11 AM, Mark wrote:
>
> I actually got this working with a negated query, but the strange this
> is that it only works if a search term is also specified. For
> example:
>
> Job.search 'keyword', :conditions => {:location => '-"San Francisco
> CA"'}
>
> This query correctly returns job entries that match "keyword" but are
> not in San Francisco.
>
> Job.search :conditions => {:location => '-"San Francisco CA"'}
>
> This query doesn't return anything, although I was hoping it would
> return all job entries not in San Francisco.
>
> Any ideas why that doesn't work, and what I can do then to execute an
> "all jobs not in San Francisco" query?
>
> Thanks
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---