遇到的问题
body字段存储网站的body,会查询body字段中的某段文件,body字段定义如下
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
查询的时候查询body:"/remote/login",应该是经过index分词,查询出来的内容不是完全是/remote/login的,有的是包含remotelogin
需求
需要支持常规的分词查询,如remote、remotelogin,但是那种双引号查询的,能查询出包含完整/remote/login的词,而不是有的一些是body满足有remote、login的词