SOLR 4 Study Notes (Part1)

Source: Internet
Author: User
Tags solr

Installation:

Jetty:

Modify SOLR. xml

<? XML version = "1.0"?>

<! Doctypeconfigure public "-// jetty // configurer // en" http://www.eclipse.org/jetty/configure.dtd>

<Configure class = "org. Eclipse. Jetty. webapp. webappcontext">

<Set name = "contextpath">/SOLR </set>

<Setname = "war"> <systemproperty name = "Jetty. Home"/>/webapps/SOLR. War </set>

<Setname = "defaultsdescriptor"> <systemproperty name = "Jetty. Home"/>/etc/webdefault. xml </set>

<Setname = "tempdirectory"> <property name = "Jetty. Home" default = "."/>/temp </set>

</Configure>

Copy SOLR. XML to <jettyinstallation>/Context

 

Copy Jetty. XML, webdefault. XML, logging. properties from <solrdistribution>/etc to <jetty installation>/etc

 

Copy schema. XML, solrconfig. XML, SOLR. XML etc to <SOLR. Home> directory

 

For multi-core Configuration

In SOLR. xml:

<SOLR persistent = "true">

<Cores adminpath = "/admin/cores" defaultcorename = "collection1">

<Core name = "collection1" instancedir = "collection1"/>

</Cores>

</SOLR>

Copy schema. XML, solrconfig. XML to <SOLR. Home>/<collectiondir>/Conf

 

Modify/etc/default/jetty file, add-dsolr. SOLR. Home = xxx

 

Tomcat:

Change Tomcat server. xml: Connector's URL encoding toUTF-8

<Connector Port = "8080" protocol = "HTTP/1.1" connectiontimeout = "20000" redirectport = "8443" uriencoding = "UTF-8"/>

 

Create SOLR. XML in $ tomcat_home/CONF/Catalina/localhost

<Context Path = "/SOLR" docbase = "/usr/share/tomcat/webapps/SOLR. War" DEBUG = "0" crosscontext = "true">

<Environment name = "SOLR/home" type = "Java. Lang. String" value = "USR/share/SOLR" override = "true"/>

</Context>

 

Copy schema. XML, solrconfig. XML, SOLR. XML etc to <SOLR. Home> directory

 

For multi-core Configuration

In SOLR. xml:

<SOLR persistent = "true">

<Cores adminpath = "/admin/cores" defaultcorename = "collection1">

<Core name = "collection1" instancedir = "collection1"/>

</Cores>

</SOLR>

Copy schema. XML, solrconfig. XML to <SOLR. Home>/<collectiondir>/Conf

 

SOLR cloud requirement:

_ Version _ Field

<Field name = "_ version _" type = "long" indexed = "true" stored = "true" multivalued = "false"/>

 

SOLR. replicationhandler

<Requesthandler name = "/replication" class = "SOLR. replicationhandler"/>

 

SOLR. realtimegethandler

<Requesthandler name = "/get" class = "SOLR. realtimegethandler">

<Lstname = "defaults">

<STR name = "omitheader"> true </STR>

</Lst>

</Requesthandler>

<Updatelog>

<Strname = "dir" >$ {SOLR. Data. dir:} </STR>

</Updatelog>

 

SOLR. xml

<SOLR persistent = "true">

<Cores adminpath = "/admin/cores... Host = "localhost" hostport = "xxx" zkclienttimeout = "XXXX">

</SOLR>

 

Directory implementation:

<Directoryfactory name = "directoryfactoryclass =" xxxxxxx "/>

SOLR. standarddirectoryfactory

SOLR make demo-on underlining implementation

SOLR. simplefsdirectoryfactory

Does not scale well with high number of threads

SOLR. niofsdirectoryfactory

Scale well with other threads, but does not work well on Windows

SOLR. mmapdirectoryfactory

Good for 64 bit Linux system if near realtime searching is not needed

SOLR. nrtcachingdirectoryfactory

Good for near real-time indexing and searching

SOLR. ramdirectoryfactory

Entirely in memory and not support replication

Used for auto-completion or unit testing

 

 

 


SOLR 4 Study Notes (Part1)

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.