Spring data SOLR uses an inline SOLR server (single core)

Source: Internet
Author: User
Tags solr

1. How to configure the spring DATASOLR in the development environment to use the embedded SOLR Server

According to the official Case Project (Spring-data-book), find the class with embedded, that is, the use of embedded solrserver, the advantage: You can learn to use spring data SOLR without having to configure the environment yourself, Note: In this class, within the function that is @after annotated, contains the delete data and closes Embeddedsolrserver.


2. Create an embedded Solrserver

Very simple, first on the official web download Source: Spring-data-solr-master, just find the test source package inside the small Demo:abstractitestwithembedde Dsolrserver.java, and analysis, you can get a set of independent operation of the source files, respectively, including the Red Line part:




Note: inline solrserver are typically used only for testing, because inline solrserver need to be closed manually, and can be closed in junit @after in the test


Spring data SOLR uses an inline SOLR server (single core)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.