Home > Article > Operation and Maintenance > What is the role of solr in docker?
In docker, solr represents an open source search platform, used to build search applications; XML files in a certain format can be submitted to the search engine server through http requests to generate indexes, or searches can be made through the "Http Get" operation. Request and get the returned result in XML format.
The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.
Solr is an open source search platform used to build search applications. It is built on top of Lucene (full text search engine). Solr is enterprise-grade, fast and highly scalable. Applications built with Solr are highly complex and deliver high performance.
You can submit an XML file in a certain format to the search engine server through http requests to generate an index; you can also make a search request through Http Get operations and get the returned results in XML format.
Deploy Solr and install IKAnalyzer
Write yml file
version: '3.1' services: solr: build: ikanalyzer restart: always container_name: solr ports: - 8983:8983 volumes: - ./solrdata:/opt/solrdata
Dockerfile
FROM solr:7.1.0 # 创建 Core WORKDIR /opt/solr/server/solr RUN mkdir ik_core WORKDIR /opt/solr/server/solr/ik_core RUN echo 'name=ik_core' > core.properties RUN mkdir data RUN cp -r ../configsets/sample_techproducts_configs/conf/ . # 安装中文分词 WORKDIR /opt/solr/server/solr-webapp/webapp/WEB-INF/lib ADD ik-analyzer-solr5-5.x.jar . ADD solr-analyzer-ik-5.1.0.jar . WORKDIR /opt/solr/server/solr-webapp/webapp/WEB-INF ADD ext.dic . ADD stopword.dic . ADD IKAnalyzer.cfg.xml . # 增加分词配置 COPY managed-schema /opt/solr/server/solr/ik_core/conf WORKDIR /opt/solr
Solr is a high-performance, Java-developed, Lucene-based full-text search server. At the same time, it has been extended to provide a richer query language than Lucene. It is also configurable, scalable and optimized for query performance. It also provides a complete function management interface. It is a very excellent Full-text search engine
Documents are added to a search collection via HTTP using XML. Querying the collection is also achieved by receiving an XML/JSON response via http. Its main features include: efficient and flexible caching function, vertical search function, highlighting search results, improving usability through index replication, providing a set of powerful Data Schema to define fields, types and settings for text analysis, and providing Web-based Management interface, etc.
Recommended learning: "docker video tutorial"
The above is the detailed content of What is the role of solr in docker?. For more information, please follow other related articles on the PHP Chinese website!