Top Apache Solr frequently asked interview questions.
Q: What is Apache Lucene?
A: Supported by Apache Software Foundation, Apache Lucene is a free, open-source, high-performance text search engine library written in Java by Doug Cutting. Lucence facilitates full-featured searching, highlighting, indexing and spellchecking of documents in various formats like MS Office docs, HTML, PDF, text docs and others. Solr is built on top of lucene.
A: Apache Solr is a standalone full-text search platform to perform searches on multiple websites and index documents using XML and HTTP. Built on a Java Library called Lucence, Solr supports a rich schema specification for a wide range and offers flexibility in dealing with different document fields. It also consists of an extensive search plugin API for developing custom search behavior.
Q: What file contains configuration for data directory?
A: solrconfig.xml file contains configuration for data directory.
Q: What file contains definition of the field types and fields of documents?
A: schema.xml file contains definition of the field types and fields of documents.
A: SolrJ is an API that makes it easy for Java applications to talk to Solr. SolrJ hides a lot of the details of connecting to Solr and allows your application to interact with Solr with simple high-level methods.
Q: What are the features of Apache Solr?
A: The features are as follows-
- Allows Scalable, high performance indexing Near real-time indexing
- Standards-based open interfaces like XML, JSON and HTTP
- Flexible and adaptable faceting
- Advanced and Accurate full-text search
- Linearly scalable, auto index replication, auto failover and recovery
- Allows concurrent searching and updating
- Comprehensive HTML administration interfaces
Q: What is a Request Handler in Apache Solr?
A: In Solr, a RequestHandler is essentially a plugin (module of logic) that handles incoming requests in a particular way. When a user runs a search in Solr, the search query is processed by a request handler. SolrRequestHandler is a Solr Plugin, which illustrates the logic to be executed for any request.
Q: Can you compare the features of Apache Solr vs Elasticsearch?
A: Both Solr and Elasticsearch are popular open source search engines built on top of Lucene. Both have vibrant communities and are well documented. The difference is in the way each builds a wrapper and implements features on top of Lucene.
Apache Solr vs Elasticsearch
A: SolrCloud is the name of a set of new distributed capabilities in Solr. Passing parameters to enable these capabilities will enable you to set up a highly available, fault tolerant cluster of Solr servers. Use SolrCloud when you want high scale, fault tolerant, distributed indexing and search capabilities.