本文介绍了在SolR中以JSON格式获取分析结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在SolR中做了如下过滤:
I made a filter in SolR as following :
<fieldtype name="tokenization_stopwords" class="solr.TextField" positionIncrementGap="100">
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
</analyzer>
</fieldtype>
在分析"部分中使用此过滤器时,它可以工作.但是,我希望能够以获得此分析的结果作为JSON.有谁知道该怎么做?
When I'm using this filter in the "Analysis" section, it works. However, I'd like to be ableto get the result of this analysis as a JSON.Does anyone knows how to do this ?
推荐答案
为了获取该信息,您需要在solrconfig.xml中配置FieldAnalysisRequestHandler
并向他提问.
In order to get that you need to configure the FieldAnalysisRequestHandler
in your solrconfig.xml and ask him questions.
<requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler"/>
请求看起来像这样
有关更多信息,请查看在FieldAnalysisRequestHandler的javadoc中
For more information have a look in the javadoc of the FieldAnalysisRequestHandler
这篇关于在SolR中以JSON格式获取分析结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!