Solr Search Interview Questions: Solr is open-source, highly reliable, scalable, providing distributed indexing for search, written in Java.
1. What is Apache Solr Search?
Ans: Solr Search is the very first question asked in Solr Search Interview Questions. Solr is the well known, blazing fast open source enterprise search platform from the Apache Lucene project. Its significant elements incorporate intense full-content search, hit highlighting, faceted search, dynamic clustering, database integration, rich record (e.g., Word, PDF) taking care of, and geospatial inquiry. Apache Solr Search is highly scalable, giving distributed search and index replication, and it controls the search and navigation features of huge numbers of the world’s biggest internet sites.
2. What file contains configuration for data directory?
Ans: Solrconfig.xml file contains configuration for data directory.
3. What file contains definition of the field types and fields of documents?
Ans: schema.xml file contains definition of the field types and fields of documents.
4. What are the features of Apache Solr Search?
  1. Allows Scalable, high performance indexing Near real-time indexing
  2. Advanced Full-Text Search Capabilities
  3. Optimized for High Volume Traffic
  4. Standards Based Open Interfaces - XML, JSON and HTTP
  5. Comprehensive Administration Interfaces
  6. Easy Monitoring
  7. Highly Scalable and Fault Tolerant
  8. Flexible and Adaptable with easy configuration
  9. Near Real-Time Indexing
  10. Extensible Plugin Architecture
5. What is Apache Lucene?
Ans: Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. Lucence facilitates full-featured searching, highlighting, indexing and spellchecking of documents in various formats like MS Office docs, HTML, PDF, text docs and others.
6. What is request handler?
Ans: When a user runs a search in Solr, the search query is processed by a request handler. All RequestHandlers for your SOLR Installation are configured in the solrconf.xml. RequestHandlers have a certain name and a class assigned that is responsible for handling the request. If the name starts with a "/" you can reach the request handler by calling the correct path.
7. What are the advantages and disadvantages of Standard Query Parser?
Ans: Also known as Lucence Parser, the Solr standard query parser enables users to specify precise queries through a robust syntax. However, the parser’s syntax is vulnerable to many syntax errors unlike other error-free query parsers like DisMax parser.
8. What is the use of field type?
Ans: Field type defines how Solr would interpret data in a field and how that field can be queried.
9. What all information is specified in field type?
Ans: A field type includes four types of information: Name of field type Field attributes An implementation class name If the field type is Text Field, a description of the field analysis for the field type.
10. Explain Faceting in Apache Solr Search?
Ans: Faceting is the arrangement of search results into categories based on indexed terms. Searchers are presented with the indexed terms, along with numerical counts of how many matching documents were found were each term. Faceting makes it easy for users to explore search results, narrowing in on exactly the results they are looking for.
11. What is Field Analyzer?
Ans: Working with textual data in Solr, Field Analyzer reviews and checks the filed text and generates a token stream. The pre-process of analyzing of the input text is performed at the time of searching or indexing and at query time. Most Solr applications use Custom Analyzers defined by users. Remember, each Analyzer has only one Tokenizer. You can define an analyzer in the application using the below syntax:
12. What is SolrCloud?
Ans: Apache Solr facilitates fault-tolerant, high-scalable searching capabilities that enable users to set up a highly-available cluster of Solr servers. These capabilities are well revered as SolrCloud.
13. What is copying field?
Ans: It is used to describe how to populate fields with data copied from another field.
14. Name different types of highlighters?
Ans: There are 3 highlighters in Solr:
  1. Standard Highlighter: provides precise matches even for advanced query parsers.
  2. Fast Vector Highlighter: Though less advanced than Standard Highlighter, it works better for more languages and supports Unicode break iterators.
  3. Postings Highlighter: Much more precise, efficient and compact than the above vector one but inappropriate for a more number of query terms
15. What is the use of stats.field?
Ans: It is used to generate statistics over the results of arbitrary numeric functions.
16. What command is used to see how to use the bin/Solr script?
Ans: Execute # bin/Solr –help to see how to use the bin/Solr script.
17. Which syntax is used to start & stop Solr?
Linux $ bin/solr start Windows bin\solr.cmd start
This will start Solr in the background, listening on port 8983. Script Help To see how to use the bin/solr script, execute:
$ bin/solr -help For specific usage instructions for the start command, do: $ bin/solr start -help
Start Solr in the Foreground Since Solr is a server, it is more common to run it in the background, especially on Unix/Linux. However, to start Solr in the foreground, simply do:
$ bin/solr start -f If you are running Windows, you can run: bin\solr.cmd start -f

Start Solr with a Different Port

To change the port Solr listens on, you can use the -p parameter when starting, such as:
$ bin/solr start -p 8984

Stop Solr

When running Solr in the foreground (using -f), then you can stop it using Ctrl-c. However, when running in the background, you should use the stop command, such as:
$ bin/solr stop -p 8983
The stop command requires you to specify the port Solr is listening on or you can use the -all parameter to stop all running Solr instances.

Check if Solr is Running

If you're not sure if Solr is running locally, you can use the status command:
$ bin/solr status
18. Which command is used to start Solr in foreground?
Ans: # bin/solr start –f is used to start Solr in foreground.
19. What syntax is used to check whether Solr is currently running or not?
Ans: # bin/solr status is used to check Solr running status.
20. Give the syntax to start the server.
Ans: # bin/solr start is used to start the server.
21. How to shut down Apache Solr?
Ans: Solr is shut down from the same terminal where it was launched. Click Ctrl+C to shut it down.
22. What data is specified by Schema?
Ans: Schema declares:
  1. How to index and search each field
  2. What kinds of fields are available
  3. What fields are required
  4. What field should be used as the unique/primary key
23. Name the basic Field types in Solr ?
  1. text
  2. long
  3. double
  4. date
  5. float
  6. string
  7. int
  8. boolean
  9. location
  10. payloads
24. What are the important configuration files of Solr?
Ans: Solr supports two important configuration files
  1. solrconfig.xml
  2. schema.xml
25. What are the most common elements in solrconfig.xml?
Ans: The most common elements in solrconfig.xml are:
  1. Search components
  2. Cache parameters
  3. Data directory location
  4. Request handlers
  Download link: