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)