Apache Solr Interview Questions

Share It!

1. What is Apache Solr?

Ans: 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. Solr is higly 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?

  • Allows Scalable, high performance indexing Near real-time indexing
  • Advanced Full-Text Search Capabilities
  • Optimized for High Volume Traffic
  • Standards Based Open Interfaces - XML, JSON and HTTP
  • Comprehensive Administration Interfaces
  • Easy Monitoring
  • Highly Scalable and Fault Tolerant
  • Flexible and Adaptable with easy configuration
  • Near Real-Time Indexing
  • Extensible Plugin Architecture
  • 5. What is Apache Lucene?

    Ans: Apache LuceneTM 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 Solr.

    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 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:
  • Standard Highlighter: provides precise matches even for advanced queryparsers.
  • FastVector Highlighter: Though less advanced than Standard Highlighter, it works better for more languages and supports Unicode breakiterators.
  • 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 stop Solr?

    Ans: # bin/solr stop -p 8983 is used to stop Solr.

    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 –
  • How to index and search each field
  • What kinds of fields are available
  • What fields are required
  • What field should be used as the unique/primary key
  • 23. Name the basic Field types in Solr.

  • date
  • long
  • double
  • text
  • float
  • 24. What are the important configuration files of Solr?

    Ans: Solr supports two important configuration files
  • solrconfig.xml
  • schema.xml
  • 25. What are the most common elements in solrconfig.xml?

    Ans: The most common elements in solrconfig.xml are:
  • Search components
  • Cache parameters
  • Data directory location
  • Request handlers
  • Enjoy it!

    Leave a Reply

    Your email address will not be published.