我与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