我是Apache Solr的新手,嘗試使用搜索條件對稱爲「normalizedContents」和類型「text」的字段進行查詢。不一致的Apache Solr查詢結果
所有搜索條件必須存在於該字段中。問題是,我收到了不一致的結果。
例如,solr的索引具有與值normalizedContents字段= 「EDOUARD SERGE威爾弗裏德EDOS0004 UNE提COMPLEMENTAIRE」
我在Solr的Web界面試圖這些查詢只有一個文檔:
- normalizedContents: (愛德華和UNE)返回結果
- normalizedContents:(edouar *和UNE)返回結果
- normalizedContents:(EDOUAR *和UNE)不返回任何東西 個
- normalizedContents:(edouar和UNE)不返回任何
- normalizedContents:(edouar *和聯合國)返回結果(雖然沒有 「UN」 字樣)
- normalizedContents:(edouar *和聯聯)返回結果(雖然沒有「聯聯」字)
這裏的normalizedContents的schema.xml中聲明:
<field name="normalizedContents" type="text" indexed="true" stored="true" multiValued="false"/>
因此,通配符和AND運算不按預期的行爲。我究竟做錯了什麼 ?
謝謝。
你有任何標記過濾器應用於normalizedContents?第三行可以用LowerCase過濾器解決,最後兩行用WS過濾器(空白)解決。 –