<dataConfig> <dataSourcetype="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/blog" user="blog" password="12345678"/> <document> <entityname="post"pk="ID" query="select ID,post_title,post_content from wp_posts where post_status='publish'" deltaImportQuery="select ID,post_title,post_content from wp_posts where ID='${dih.delta.ID}'" deltaQuery="select ID from wp_posts where post_status='publish' and post_modified_gmt > '${dih.last_index_time}'"> <fieldcolumn="ID"name="id"/> <fieldcolumn="post_title"name="title"/> <fieldcolumn="post_content"name="content"/> </entity> </document> </dataConfig>
在solrconfig.xml增加 <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />,这样就不会报solr.Dataimport Class not found error.
#Written by CorePropertiesLocator #Wed Mar 2310:55:00 UTC 2016 numShards=1 collection.configName=blog #name=blog_shard1_replica1 shard=shard1 collection=blog coreNodeName=core_node1
在Django后台添加markdown编辑器中说过如何在Django后台添加markdown编辑器,后来发现这里添加的pagedown有一个问题,也就是换行问题。在markdown中,单个换行会用空格代替,但pagedown中并没有这么做。经过跟踪,发现问题是在pagedown-extra中,解决的办法是在pagedown/Markdown.Converter.js的_FormParagraphs函数1168行//if this is an HTML marker, copy it前添加str = str.replace(/\n/g, " ");即可.
public synchronized void start() { /** * Thismethodisnot invoked for the main method thread or"system" * group threads created/set up by the VM. Any new functionality added * to this methodin the future may have to also be added to the VM. * * A zero status value corresponds to state "NEW". */ if (threadStatus != 0) throw new IllegalThreadStateException();
/* Notify the group that this thread is about to be started * so that it can be added to the group's list of threads * and the group's unstarted count can be decremented. */ group.add(this);
boolean started = false; try { start0(); started = true; } finally { try { if (!started) { group.threadStartFailed(this); } } catch (Throwable ignore) { /* do nothing. If start0 threw a Throwable then it will be passed up the call stack */ } } }