Using SOLR to build the--multicore of enterprise search platform

Source: Internet
Author: User
Tags solr


SOLR multicore is a new feature of SOLR 1.3. It is a SOLR instance and can have multiple search applications.

Here's a start to run out of a example given by SOLR. This article is based on the "Use SOLR to build enterprise search platform-run SOLR", do not understand see http://lianj-lee.javaeye.com/blog/424383

  1, find the example folder in SOLR download package, under it there is a multicore folder, copy all the contents under this folder to C:/SOLR-TOMCAT/SOLR below.

Note: There is a solr.xml (this is just the default file, and of course you can specify other files), such as:

    <SOLRPersistent= "false">       <coresAdminPath= "/admin/cores">       <Corename= "Core0"Instancedir= "Core0"   />       <Corename= "Core1"Instancedir= "Core1"   />      </cores>     </SOLR>   

This file is telling SOLR which core,cores should be loaded with core0,core1. CORE0 (can be analogous to the previous solr.home)/conf directory has schema.xml and solrconfig.xml, you can put the actual application
Copy it over. Now the example is official.

  2, launch Tomcat, access to the application, you can see the admin core0 and admin core1

  3, using the above default Solr.xml, the index file will be stored in the same directory, here will be stored in C:/solr-tomcat/solr/data, if you want to change the directory, or two applications in different directories, see the following XML.

< Core name = "Core0" Instancedir = "Core0" > <  Property name = "DataDir" value = "/data/core0" /> </ Core >      

Add a child element to the core Property,property two properties don't say it, you can see it!

Solr.core.name-The core ' s name as defined in Solr.xml

Solr.core.instanceDir-The core ' s instance directory (i.e. the directory under which that core ' s Conf/and data/directo Ry is located)

Solr.core.dataDir-The core ' s data directory (i.e. the directory under which that core's index directory is located)

Solr.core.configName-the name of the core S config file (solrconfig.xml by default)

Solr.core.schemaName-the name of the core ' s schema file (Schema.xml by default)

  4, solr.xml specific meaning:

1) SOLR

The <solr> tag accepts attributes:

Persistent-by default, should runtime core manipulation be saved in solr.xml so it's available after a restart.

Sharedlib-path to a directory containing. jar files is added to the classpath of every core. The path is relative to Solr.home (where Solr.xml sits)

2) Cores

The <cores> tag accepts attribute:

Adminpath-relative path to access the Coreadminhandler for dynamic core manipulation. For example, adminpath= "/admin/cores" configures access via Http://localhost:8983/solr/admin/cores. If This attribute are not specified, the dynamic manipulation is unavailable.

3) Core

The <core> tag accepts attributes:

Name-the registered core name. This'll be the what's the core is accessed.

Instancedir-the Solr.home directory for a given core.

Datadir-the Data directory for a given core. The default is <instancedir>/data.  It can take an absolute path or a relative path w.r.t instancedir. Solr1.4

4) Property

The <property> tag accepts attributes:

Name-the Name of the property

Value-the value of the property

Using SOLR to build the--multicore of enterprise search platform

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.