Configuring SOLR Source in Eclipse

Source: Internet
Author: User
Tags solr

Transfer from http://hongweiyi.com/2013/03/configurate-solr-src-in-eclipse/

1. Download SOLR's SRC package and unzip

2. after extracting, execute ant eclipse in the extracted root directory, that is, build the project file required by eclipse

Open Eclipse,file > Import > Existing Projects into Workspace

Select the root directory you just unzipped, and the Java build path has been set.

3. Open Type (ctrl+shift+t) Find Startsolrjetty This class, modify the Setport parameter inside the main method is the default 8983, and Contextpath,war

The war is "solr/webapp/web/"

The final code should look like this:

1 Server server = newServer();
2 SocketConnector connector = newSocketConnector();
3 // Set some timeout options to make debugging easier.
4 connector.setMaxIdleTime(10006060);
5 connector.setSoLingerTime(-1);
6 connector.setPort(8983); // HWY: MODI
7 server.setConnectors(newConnector[] { connector });
8 WebAppContext bb = newWebAppContext();
9 bb.setServer(server);
10 bb.setContextPath("/solr"); // HWY: MODI
11 bb.setWar("solr/webapp/web"); // HWY: MODI

4. set Solr.solr.home, and run

Write in Arguments > VM arguments in Run configure

-dsolr.solr.home=your/path/of/example/solr

can also be modified in the code,

System.setproperty ("Solr.solr.home", "YOUR/PATH/OF/EXAMPLE/SOLR");

Use a example that comes with SOLR as the root of the sold configuration, or you can set up additional SOLR configuration directories. You can also run Solr,debug by clicking Run.

5. Browser input HTTP://LOCALHOST:8983/SOLR view SOLR Admin.

Configuring SOLR Source in Eclipse

Related Article

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.