There may be occasions where you need to search a specific field in Solr where the field has non-null values, equivalent to:
SELECT field_name FROM my_table WHERE field_name IS NOT NULL;
FieldName:['' TO *]
You can also do the same for numeric ranges:
SELECT field_value FROM my_table WHERE field_value > 0;
FieldValue:[1 TO *]
As always, it's best to try these types of queries via the admin interface before adding to code that actually constructs the Solr query.
A friend linked me the following article; http://www.lucidimagination.com/blog/2010/01/21/the-seven-deadly-sins-of-solr/.
It’s a great write-up discussing several pitfalls most dev-shops encounter when implementing or maintaining solr for the first time. For example, we are preparing to launch a large project based on Solr and designed the queries to use the standard request handler, but according to the article it’s much better to use the dismax request handler instead. Given that the author’s of the article know what they are talking about, we are going to research the dismax request handler and implement it before launch.