标签:server step orm source tail lan osi 记录 get
<requestHandler name="/dataimport" class="solr.DataImportHandler"> <lst name="defaults"> <str name="config">db-data-config.xml</str> </lst> </requestHandler>
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
<dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" convertType="true" url="jdbc:mysql://127.0.0.1:3306/db_name" user="sa" password="123456"/> <document> <entity name="course_video" query="SELECT id, title, content, tags FROM ts_course_video" > </entity> </document> </dataConfig>
<?xml version="1.0" encoding="UTF-8" ?> <schema name="course_video" version="1.5"> <field name="id" type="int" indexed="true" stored="true" required="true" multiValued="false" /> <field name="_version_" type="long" indexed="true" stored="true"/> <field name="title" type="string" indexed="true" stored="true" required="true" multiValued="false" /> <field name="tags" type="string" indexed="true" stored="false" required="false" multiValued="false" /> <field name="content" type="string" indexed="true" stored="true" required="false" multiValued="false" /> <field name="info_text" type="text_general" indexed="true" stored="false" multiValued="true" /> <copyField source="title" dest="info_text" /> <copyField source="content" dest="info_text" /> <copyField source="tags" dest="info_text" /> <uniqueKey>id</uniqueKey> <fieldType name="string" class="solr.StrField" sortMissingLast="true" /> <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/> <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> </schema>
能够带上几个额外的參数:&clean=true&commit=true等等(和full_import同样)
请求会立即返回。后台有新线程运行重建索引的操作。
能够通过status操作查询状态。
额外參数:
debug模式,不会commit操作。
假设同一时候须要commit,得带上commit=true參数
标签:server step orm source tail lan osi 记录 get
原文地址:http://www.cnblogs.com/llguanli/p/7028974.html