Apache Solr interview questions

by Rupa.R, on Sep 9, 2022 5:31:43 PM

Interview Questions (49)

Q1. What is Apache Solr?

Ans: It is a standalone full text search server which applications communicate with using XML and HTTP to index documents, or execute searches. It is used to support a rich schema specification that is used to allow for a wide range of flexibility in dealing with different document fields, and has an extensive search plugin API for developing custom search behavior.

Q2. Which file contains configuration for data directory?

Ans: solrconfig.xml file contains configuration for data directory.

Q3. Which 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.

Q4. What are the features of Apache Solr?

Ans: The features of apache solr are:

  • Near real-time indexing
  • Standards-based open interfaces like XML, JSON and HTTP
  • Flexible and adaptable, with XML configuration
  • Advanced full-text search
  • Linearly scalable, auto index replication, auto failover and recovery
  • Comprehensive HTML administration interfaces

Q5. What is Apache lucene?

Ans: Apache lucene is a full featured, High performance text search engine library which is written in java.

Q6. What is request handler?

Ans: When a user runs a search in solr, the search query is processed by a request handler. It is a solr plugin that defines the logic to be used when solr processes a request.

Q7. What is the advantage of standard query parser?

Ans: The advantage of standard query parser is that it is used to enable users to specify very precise queries.

Q8. Explain Faceting?

Ans: It is the arrangement of search results into categories based on indexed terms.

Q9. What is the use of field type?

Ans: Field type defines how solr should interpret data in a field and how the field can be queried.

Q10. Which information is included in filed type?

Ans: A field type includes four types of information:

  1. The name of field type
  2. Field attributes
  3. An implementation class name
  4. If the field type is TextField , a description of the field analysis for the field type.

Q11. Define Dynamic Field?

Ans: It is used to allow solr to index fields that you did not explicitly define in the schema.

Q12. What is analyzer?

Ans: An Analyzer is used to examine text of fields and generates a token stream.

Q13. What is the use of tokenizer?

Ans: It is used to break up a stream of text into tokens, where each token is a sub sequence of characters in the text.

Q14. What is phonetic filter?

Ans: This filter is used to create tokens using one of the phonetic encoding algorithms in the org.apache.commons.codec.language package.

Q15. What is SolrCloud?

Ans: Apache solr includes the ability to set up a cluster of solr servers that combines fault tolerance high availability called SolrCloud.

Q16. What is copying field?

Ans: It is used to describe how to populate fields with data copied from another field.

Q17. What is Highlighting?

Ans: It is used to give the detailed information about Solr’s highlighting utilities.

Q18. Give the name of different types of highlighters?

Ans: There are 3 highlighters:

  1. FastVector Highlighter
  2. Standard Highlighter
  3. Postings Highlighter

Q19. What is the use of stats.field?

Ans: It is used to generate statistics over the results of arbitrary numeric functions.

Q20. To see how to use the bin/solr script which command is used?

Ans: Execute $ bin/solr –helpto see how to use the bin/solr script.

Q21.Which syntax is used to stop solr?

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

Q22. Which command is used to start solr in foreground?

Ans: $ bin/solr start –f is used to start solr in foreground.

Q23. To Check if Solr is running which syntax is used?

Ans: $ bin/solr status is used to check solr running status.

Q24. To start the server which syntax is used?

Ans: $ bin/solr start is used to start the server.

Q25. How to shut down apache solr?

Ans: To shut down Solr from the terminal where you launched Solr,then click  Ctrl+C.

Q26. What data is specified by Schema?

Ans: Schema declares:

  • How to index and search each field
  • What kinds of fields there are
  • Which fields are required
  • Which field should be used as the unique/primary key

Q27. Give the name of basic Field types in Solr?

Ans: Basic field type in solr is:

  • date
  • long
  • double
  • text
  • float

Q28. How to install solr?

Ans: It has 3 steps:

  1. Server-related files, e.g. Tomcat or start.jar (Jetty)
  2. Solr webapp as a .war
  3. Solr Home which comprises the data directory and configuration files.

Q29. What are the important configuration files of solr?

Ans: There are 2 most important configuration files of solr:

  1. solrconfig.xml
  2.  schema.xml

Q30. 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    
Topics:Interview Questions with Answers

Comments

Subscribe