I'm using RoR + acts_as_solr to query a Solr database.
I'm used to using "*" to select all, thanks to MySQL, but that command fires an exception in Solr. Are they other wildcards I can use? Suggestions? Thanks!
I'm using RoR + acts_as_solr to query a Solr database.
I'm used to using "*" to select all, thanks to MySQL, but that command fires an exception in Solr. Are they other wildcards I can use? Suggestions? Thanks!
You can't query for "all" in lucene. The typical way to do it is to add a field with the same value for all documents and query for that value.
In Solr you can get all documents by querying *:*
(except for pagination, that's another topic)
I prefer [* TO *] when I have used acts_as_solr. *:*
seemed to perform much slower.
It depends what you need to select all data for. By emulating a select * I assume you want all fields back from the document; this would happen naturally from your search terms as you just limit the documents returned.
select * from index where id = 'Burrito'
would be the same as just searching for
id:Burrito
You would not have to do
*:* AND id:Burrito
If you want to see all the documents then use : as already suggested.