1. Day 2 –
Solr Hands On
Core Tech @Trend Micro
吳奕慶YI-CHING WU
1
2. Preparation
NB/PC or VM
Install JRE
Install Tomcat on Windows / Linux
Download Solr 4.6
Download JDBC : sqljdbc4.jar
Un-Zip Solr 4.6
2
3. Install Solr on Windows
3
install java runtime
download Tomcat windows service and install it to d:Tomcat
test Tomcat site http://localhost:8080
stop Tomcat
download Solr and Unzip to d:tempsolr
copy d:tempsolrdistsolr-x.x.x.war to d:tomcat
rename d:tomcatsolr-x.x.x.war to d:tomcatsolr.war
copy d:tempsolrexamplesolr to d:websolr
add Java Options -Dsolr.solr.home=d:websolr
add Java Options -Dsolr.velocity.enabled=false
copy d:tempsolrexamplelibext to d:tomcatwebappssolrWEB-INFlib
created:tomcatwebappssolrWEB-INFclasses
copy d:tempsolrexampleresourcelog4j.properties to d:tomcatwebappsso
lrWEB-INFclasses
start Tomcat
visit http://localhost:8080/solr/
query="SELECT [SolutionId],[Locale],[Title],[Problems],[PublicContent],[Modified] FROM [uvw_KBSolution]“
deltaImportQuery="SELECT [SolutionId],[Locale],[Title],[Problems],[PublicContent],[Modified] FROM [uvw_KBSolution] where SolutionId='${dih.delta.SolutionId}'“
deltaQuery="select SolutionId from [uvw_KBSolution] where Modified > '${dih.last_index_time}'"
#Tue Jul 21 12:10:50 CEST 2010
metadataObject.last_index_time=2010-09-20 11\:12\:47
last_index_time=2010-09-20 11\:12\:47
# to sync or not to sync
# 1 - active; anything else - inactive
syncEnabled=1
# which cores to schedule
# in a multi-core environment you can decide which cores you want syncronized
# leave empty or comment it out if using single-core deployment
syncCores=esupport,lithium
# solr server name or IP address
# [defaults to localhost if empty]
server=localhost
# solr server port
# [defaults to 80 if empty]
port=8080
# application name/context
# [defaults to current ServletContextListener's context (app) name]
webapp=solr
# URL params [mandatory]
# remainder of URL
params=/select?qt=/dataimport&command=delta-import&clean=false&commit=true
# schedule interval
# number of minutes between two runs
# [defaults to 30 if empty]
interval=10