I have a rather simple question. The answer was not immediately obvious after
looking at the docs and a cursory search of the mailing list archives,
hence the question.
Solr provides some ways of querying for all documents in which a field
is present such as "field_name:[* TO *]", or for all documents such as the
"*:*" query.
What are the Sunspot practices and/or idioms for such queries?
Thank you.
Mildly unintuitive, perhaps, but just do:
without(:field_name, nil)
Mat
> --
> You received this message because you are subscribed to the Google Groups "Sunspot" group.
> To post to this group, send email to ruby-s...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-sunspot...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruby-sunspot?hl=en.
>
>
Hi Ed,
It's perhaps mildly unintuitive, but you can just do:
without(:field_name, nil)
Since Sunspot interprets nil in a filter as "has no indexed value".
Mat
Cheers,
Ed