我與Solr5.2.1工作,並希望我的指標變量(鏈接)分成兩個不同的值(原始鏈接,核心環節)Solr的索引網頁鏈接
例如,如果有一個輸入http://wiki.apache.org/solr/然後,原來的鏈接是http://wiki.apache.org/solr/本身,核心鏈接是wiki.apache.org
我目前的Solr索引核心鏈接,但不是原始鏈接。 請幫我解決我的solr配置與索引原始鏈接
在我的schema.xml中,鏈接定義如下,並使用「text_general」。
<field name="link" type="text_general" indexed="true" stored="true" required="false" />
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
要得到原始鏈接,我應該使用multiValued =「true」嗎?
就像你提到的那樣,我將Standard Tokenizer Factory改爲Keyword Tokenizer。之後,它只給出原始鏈接。我如何索引原始鏈接和核心鏈接? –
如果你還想索引核心鏈接,那麼在schema.xml中創建一個單獨的字段'url_core',並創建一個fieldType作爲'text_url_core'並定義一個正則表達式標記器,如圖所示, ' <字段類型名稱= 」text_url_core「 類= 」solr.TextField「 positionIncrementGap = 」100「> ' –
hp36