found that there is no problem in searching in a specific field in the new version, my problem was in filtering. thanks
how to search in specific field in solr 4.3.0
题
In the previous version of Solr, we were able to search in specific field using this "fieldName:value" Now, it is not working any more in the updated version of Solr (4.3.0)
Would you please help.
Thanks.
Schema:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" protected="protwords.txt" generateWordParts="1" preserveOriginal="1" generateNumberParts="0" catenateWords="1" catenateNumbers="0" catenateAll="0" splitOnNumerics='0' splitOnCaseChange="1"/>
<filter class="solr.HyphenatedWordsFilterFactory"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.HyphenatedWordsFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ArabicNormalizationFilterFactory"/>
<filter class="solr.ArabicStemFilterFactory"/>
</analyzer>
</fieldType>
<fields>
<field name="Poet" type="text_general" stored="true" indexed="true" />
</fields>
I found that if I remove "solr.ArabicStemFilterFactory" from query analyzer, it works fine! so what is the link between them ?!
解决方案 2
其他提示
There is no change to this. You should be able to do fieldname:value. Check your schema.xml and make sure you have the field defined that you are looking for. Do a *:* search and look at the documents to see what you documents have to get an idea of your data, fields and their values.
不隶属于 StackOverflow