Solr - ufal/clarin-dspace GitHub Wiki

What is Solr

Solr is a free, open-source search engine. It helps find information quickly within large amounts of text or data. Solr is often used on websites or applications to power search functionality. It works by creating an index, which acts like a map of the data, making search operations much faster. You send it a query (a search request), and Solr uses the index to find matching results. It supports features like filtering, sorting, faceted search, and suggestions. Solr uses a web-based API, making it easy to integrate with other systems and applications.

Local run

  • Solr is running locally at http://localhost:8983/solr, where four cores are defined: authority, oai, search, and statistics.

  • Each core has configuration files located in [dspace]/solr/. To run Solr locally, these files must be copied to [solr]/server/solr/configsets/search/conf/.

  • The cores are defined using schema.xml files, with each file tailored to the specific core's name.

  • Fields for the indexes are defined in files such as submission-forms.xml, which are referenced by schema.xml. The postfix of the index name (e.g., solr-author_ac) refers to the field name with the same postfix (e.g., *_ac).

  • You can start, stop, or restart Solr locally using the command: solr restart -p 8983.

Suggestion

For solr suggestions (like suggestions for authors when item is creating) are defined by SuggestionRestController - filter method. Solr returns all options for searching index (like sor-author) and based on filtered value and filtering only values contained this search values from solr result -processSolrSearchSerults. In fronthent there is ds-dynamic-autocomplete.component.ts.

##How to improve fast of build When some change is made in schema.xml, the build can be made as: 0. stop running tomcat

  1. stop solr
  2. copy your changes from schema.xml (code) to [dspace]/solr/[core]/conf/schema.xml and to [solr]/server/solr/configsets/search/conf/[core]/conf/schema.xml
  3. start solr
  4. restart database
  5. run in [dspace]/bin dspace index-discovery -b (if you made changes in field definition)
  6. start tomcat
⚠️ **GitHub.com Fallback** ⚠️