网上一搜设置时区全是修改配置:solr_home/bin/solr.in.sh。但是我是在windows下修改这个配置文件无效。(我是通过修改端口8983测试出来的)
正确的配置文件是solr_home/bin/solr.in.cmd。
- 然而根据所有人说的把SOLR_TIMEZONE=”UTC” 中的UTC改成UTC+8或UTC+08:00都不起作用。
- 然后在一个专门查时区的网站发现另一个表示法GMT,试了一下终于成功了。
- 正确方法为将
REM set SOLR_TIMEZONE=UTC
修改为set SOLR_TIMEZONE=GMT+08:00
。 - 重启solr
Backing up D:\DevelopDocument\solr-5.5.2\server\logs\solr.log
移动了 1 个文件。
Backing up D:\DevelopDocument\solr-5.5.2\server\logs\solr_gc.log
移动了 1 个文件。
Waiting up to 30 to see Solr running on port 8983
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: chars loaded time=35ms, line=12638, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\chars.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: chars loaded time=43ms, line=12638, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\chars.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=146ms, line=149853, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\words.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=0ms, line=18, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-administrative.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=136ms, line=149853, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\words.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=0ms, line=18, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-administrative.dic
七月 08, 2016 4:55:07 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=8ms, line=6998, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-china.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=1ms, line=183, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-festival.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=3ms, line=6998, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-china.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=1ms, line=183, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-festival.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=259ms, line=280154, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-main2016.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=262ms, line=280154, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-main2016.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=0ms, line=15, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-org-foreign.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=0ms, line=15, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-org-foreign.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=0ms, line=316, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic\words-quantifier.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=1ms, line=316, on file=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic\words-quantifier.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: load all dic use time=552ms
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: load all dic use time=554ms
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadUnit
信息: unit loaded time=0ms, line=22, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\units.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadUnit
信息: unit loaded time=0ms, line=22, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\units.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gisdic
Started Solr server on port 8983. Happy searching!
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: chars loaded time=12ms, line=12638, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\chars.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: chars loaded time=11ms, line=12638, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\chars.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=130ms, line=149853, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\words.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: load all dic use time=149ms
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadUnit
信息: unit loaded time=0ms, line=22, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\units.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadWord
信息: words loaded time=129ms, line=149853, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\words.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core0\dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadDic
信息: load all dic use time=160ms
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary loadUnit
信息: unit loaded time=0ms, line=22, on file=file:\D:\DevelopDocument\solr-5.5.2\server\solr-webapp\webapp\WEB-INF\lib\mmseg4j-core-1.10.0.jar!\data\units.dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gisdic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic
七月 08, 2016 4:55:08 下午 com.chenlb.mmseg4j.Dictionary getInstance
信息: try to load dir=D:\DevelopDocument\solr-5.5.2\server\solr\core_gis\dic
可以看到时间和发博客的时间吻合了,在使用增量索引的时候`${dataimporter.last_index_time}`的时间也终于正常了。