在单个文档上查看单个字段的原始Solr标记

tri*_*anm 6 solr sunspot sunspot-rails sunspot-solr

我正在调试我的Solr架构,我希望看到标记特定字段的结果.

举一个简单的例子,如果我有:

<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>
Run Code Online (Sandbox Code Playgroud)

我用一个值索引了一个字段"Hello, worlds!",我希望看到以下内容:

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

确保所有内容都按照我的设想进行标记化.

这有可能吗?

Mar*_*aci 6

是的,管理员>分析正是您想要的.

但是还有另一个很棒的工具,它允许您读取索引并查看字段或文档的索引编写方式.

它被称为Luke,它在排除和调整架构时非常有用.