索引我的文件(docx,pdf,html)时,文件位于索引中,但无法在内容中搜索。 因此,搜索查询索引中的正确索引
http://localhost:8983/solr/gm_core/select?q=*:*&wt=json&indent=true
返回所有索引文件,但查询
http://localhost:8983/solr/gm_core/select?q=text:*&wt=json&indent=true
返回一个0匹配。
索引代码:
java -Dauto -Dc=gm_core -Drecursive -jar post.jar "{Path-to-a-file}"
我schema.xml中的有关部分:
<field name="text_general" type="text_general" indexed="true" stored="false" multiValued="true" />
<field name="text_de" type="text_de" indexed="true" stored="false" multiValued="true" />
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
<copyfield source="*" dest="text" />
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" />
<filter class="solr.GermanNormalizationFilterFactory"/>
<filter class="solr.GermanLightStemFilterFactory"/>
</analyzer>
</fieldType>
你能提供查询网址吗? – YoungHobbit
显示您的索引代码。 –
添加索引代码 – Alex