There is a huge market for NoSQL databases, each having its own strength and weakness. Several factors need consideration during the selection of a NoSQL database, namely performance, scalability, security, and ease of development. RDBMS is good but has limitations in terms of scaling to billions of records. Horizontal scaling is a challenge in most RDBMSs.
Search, which was earlier a complex process, is now easy to use and scale. With horizontal scalability, search has also become affordable. NoSQL databases can be key-value, column oriented, document oriented and graph database. The key factors that are used to make a decision regarding the NoSQL database are as follows:
Each NoSQL database needs a search option. MongoDB, Redis, CouchDB, Riak, and other NoSQL databases provide search options, though the search is not as effectively implemented in these databases. Ideally, we need to come down to using Lucene, Solr, or Elasticsearch.
Therefore, instead of adding the search feature to the database, we can add the database to the search function. This means that we can store data inside the Solr index and retrieve it during search. Solr is a document-oriented data store, which is closer to the MongoDB data model. With the latest version of Solr and near real-time functionalities, we obtain the following features:
This brings Solr closer to being a NoSQL database. Talking about the schema less - Solr is effectively 'schemaless'. We need not run a lengthy alter command to add new fields to the schema. The schema can be altered and new fields indexed in the new schema without affecting the documents that are already present in the index. Altering the schema of existing fields can cause problems. In that case, those fields would need to be re-indexed. However, adding new fields to the index does not affect the existing documents in any way. Any search on those fields would simply ignore the documents in which the fields do not exist.
SolrCloud takes this further by providing horizontal scalability to the Solr database. Solr is 'eventually consistent'.
Eventual consistency is a consistency model used in distributed computing that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value.
Source: .
The duration of the presence of inconsistency is known as the inconsistency window. SolrCloud has a very small inconsistency window that depends on the size of the data, the command to be executed, and the network.
This effectively means that Solr can be used as a NoSQL database to store, search, and retrieve data.