标签:XML mic schema bsp tor factory json 指定 查询
该field的名字。前后都有下划线的name是系统保留的名字,比方“_version_”
告诉solr怎样处理某些单词、怎样分词,比方要不要去掉“a”。要不要所有变成小写……
<?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>
假设依照上面的配置。我们想要的缺省搜索info_text,所以须要在solrconfig.xml中改动:
标签:XML mic schema bsp tor factory json 指定 查询
原文地址:http://www.cnblogs.com/gavanwanggw/p/6959234.html