0
我solrconfiguration情況如下:Solr的過濾查詢參數
'
<lst name="defaults">
<str name="defType">dismax</str>
<str name="q.alt">*:*</str>
<str name="qf">
city^10.0 name^10.0 city_l10n_value^10.0 name_l10n_value^10.0 state^5.0 country^2.0
</str>
<str name="sort">hotel_count desc,query({!v="type:(airport OR train_station)"}) desc ,score desc</str>
<str name="tie">0.1</str>
<str name="echoParams">explicit</str>
<int name="rows">100</int>
</lst>
`
的架構,我用的是:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="German2" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="100"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="German2" />
</analyzer>
</fieldType>
<field name="type" type="text_general" indexed="true" stored="true"/>
......
索引完成後,現在搜索結果如下所示:
<result name="response" numFound="114" start="0">
<doc><str name="type">airport</str></doc>
<doc><str name="type">train_station</str></doc>
<doc><str name="type">tourist_feature</str></doc>
<doc><str name="type">company_location</str></doc>
<doc><str name="type">company_location</str></doc>
<doc><str name="type">company_location</str></doc>
<doc><str name="type">company_location</str></doc>
<doc><str name="type">company_location</str></doc>
不幸的是,如果我運行查詢的查詢,
http://localhost:8983/solr/maincore/select/?fq=type:company_location,
它不返回任何東西。
http://localhost:8983/solr/maincore/select/?fq=type:tourist_feature
不會返回一些比賽。
這是什麼,我做錯了?