How to filter query in solr by date?

If you want to get last week publications you can do somehting like: &fq=published_date:[NOW-7DAY/DAY TO NOW] But if you want a concrete date you must do it in the SOLR date format: &fq=published_date:[2013-07-17T00:00:00Z TO NOW] Last but not least. use [ ] for inclusive ranges use { } for exclusive ranges you can mix them … Read more

Solr Collection vs Cores

From the SolrCloud Documentation Collection: A single search index. Shard: A logical section of a single collection (also called Slice). Sometimes people will talk about “Shard” in a physical sense (a manifestation of a logical shard) Replica: A physical manifestation of a logical Shard, implemented as a single Lucene index on a SolrCore Leader: One … Read more

Apache Solr string field or text field?

The fields as default defined in the solr schema are vastly different. String stores a word/sentence as an exact string without performing tokenization etc. Commonly useful for storing exact matches, e.g, for facetting. Text typically performs tokenization, and secondary processing (such as lower-casing etc.). Useful for all scenarios when we want to match part of … Read more

How do I find out version of currently running Solr?

On the Solr Admin page click on [INFO]. The next screen will have the version. (For me, the Solr admin page is located here: http://{host-name-or-ip}:{port}/solr/admin, I found I was dealing with an older version. Solr Specification Version: 1.4.0 Solr Implementation Version: 1.4.0 833479)

Deleting solr documents from Solr Admin

Use one of the queries below in the Document tab of Solr Admin UI: XML: <delete><query>*:*</query></delete> JSON: {‘delete’: {‘query’: ‘*:*’}} Make sure to select the Document Type drop down to Solr Command (raw XML or JSON).

Solr index vs stored

That is correct. Typically you will want your field to be either indexed or stored or both. If you set both to false, that field will not be available in your Solr docs (either for searching or for displaying). See Alexandre’s answer for the special cases when you will want to set both to false. … Read more

How to delete all data from solr and hbase

If you want to clean up Solr index – you can fire http url – http://host:port/solr/[core name]/update?stream.body=<delete><query>*:*</query></delete>&commit=true (replace [core name] with the name of the core you want to delete from). Or use this if posting data xml data: <delete><query>*:*</query></delete> Be sure you use commit=true to commit the changes Don’t have much idea with clearing … Read more