2014年7月7日 星期一

Update Mysql table with another table’s data

 

update gmd.gmd_adnum_resource as a inner join (select uid,adnum,pbxid,e1Id,status,serverId from gmd.gmd_g9port_adnum_resource) as g on a.adnum=g.adnum and a.serverId=g.serverId and g.status='IN_USE' 
set a.pbxid=g.pbxid,a.e1Id=g.e1Id,a.g9PortREsourceId=g.uid,a.status='IN_USE'

2013年11月5日 星期二

Install Solr-4.5.1 on Tomcat 6.0

Here’s the steps

1. Get your Tomcat installed and TOMCAT_HOME system variable defined

2. Modify server.xml  from TOMCAT_HOME\conf\ as below

    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
      redirectPort="8443" URIEncoding="UTF-8" />

3. Add solr.xml into TOMCAT_HOME\conf\Catalina\localhost with content

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="D:/dev/apache/tomcat60/webapps/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="D:/dev/apache/solr/example/solr" override="true"/>
</Context>

4. Extract solr4.5.1.zip into D:/dev/apache/solr

5. Copy jars under D:\dev\apache\solr\example\lib\ext into TOMCAT_HOME\lib

6. Copy  D:\dev\apache\solr\example\resources\log4j.properties into TOMCAT_HOME\lib

7. Start the tomcat service

Exception:

if you get to see error message below, check the apache wiki for a solution  http://wiki.apache.org/solr/SolrLogging

SEVERE: Error filterStart