简体   繁体   English

将Solr分析器结果存储在单独的字段中

[英]Store Solr analyzer result in separate field

I have a field type with multiple analyzers (Keepword, Synonym, ...). 我有一个带有多个分析器的字段类型(Keepword,同义词,...)。 How can I store the result of all the analyzers into a separate field ? 如何将所有分析仪的结果存储到单独的字段中?

Unfortunately, copyField is executed before the analyzers run... 不幸的是,copyField是在分析器运行之前执行的。

You can't. 你不能 The result of "all the analyzers" is the actual result stored in the field. “所有分析仪”的结果是存储在该字段中的实际结果。 You'll have to create separate fields that cut of the sequence of analyzers/filters earlier for each field type, then copyField into each field. 您必须创建单独的字段,这些字段前面会针对每种字段类型削减分析器/过滤器的顺序,然后将copyField到每个字段中。

If you just want to watch what each step in the analysis process does, use the Admin interface and select Analysis . 如果您只想查看分析过程中每个步骤的功能,请使用Admin界面,然后选择Analysis You can also access these results in a programmatic fashion through the end point that the Admin interface uses: 您还可以通过管理界面使用的端点以编程方式访问这些结果:

http://localhost:8983/solr/corename/analysis/field?wt=json&analysis.showmatch=true&analysis.fieldvalue=foo&analysis.query=foo&analysis.fieldname=fieldname

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM