I have movie data indexed already in Solr. The basic queries are working as expected but when I fire a filter query for facets along with aq, the result is different.
The query /select?q=facetGenre:Drama&wt=xml
returns results
Whereas the query /select?q=*.*&fq=facetGenre:Drama&wt=xml
does not return any result.
What could the reason for this ? please help.
Since there are "\\" in Genre field eg "Action\\Adventure", it is of a custom field type "facetStringwithSlash. The details as below
<fieldType name="facetStringwithSlash" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.PatternTokenizerFactory" pattern="[/,]\s*"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="0" preserveOriginal="1" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0" stemEnglishPossessive="1"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PatternTokenizerFactory" pattern="[/,]\s*"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" preserveOriginal="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0" stemEnglishPossessive="1"/>
<filter class="solr.ASCIIFoldingFilterFactory"/></analyzer></fieldType>
</analyzer>
</fieldType>
As @joeln pointed out, you should use :
in your query.
select?q=*:*
would mean match any value in any field.
In case of select?q=*.*
, since no field is specified in query, so it would search in default field, and match for any text that have .
in it. Maybe that's the reason that you are not getting any hits in response.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.