View raw Solr tokens for a single field on a single document

喜你入骨 提交于 2019-12-01 02:12:56

问题


I'm debugging my Solr schema and I'd like to see the results of tokenizing a specific field.

For a simplified example, if I have:

<fieldType name="text" class="solr.TextField" omitNorms="false">
    <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.PorterStemFilterFactory"/>
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front"/>
    </analyzer>
</fieldType>

and I indexed a field with the value "Hello, worlds!", I want to see something along the lines of:

hello world he el ll lo hel ell llo hell ello hello wo or rl ld wor orl rld worl orld

to ensure that everything is being tokenized as I envisage it is.

Is this in any way possible?


回答1:


Yes, Admin > Analysis is exactly what you want.

But there's another great tool that allows you to read index and see how exactly a field or document was indexed.

It's called Luke and it's invaluable when troubleshooting and tweaking your schema.




回答2:


yes, use the Analysis page in the Solr Admin section: here It has exactly that purpose



来源:https://stackoverflow.com/questions/10425371/view-raw-solr-tokens-for-a-single-field-on-a-single-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!