<small id='T2DlJ'></small><noframes id='T2DlJ'>

      <i id='T2DlJ'><tr id='T2DlJ'><dt id='T2DlJ'><q id='T2DlJ'><span id='T2DlJ'><b id='T2DlJ'><form id='T2DlJ'><ins id='T2DlJ'></ins><ul id='T2DlJ'></ul><sub id='T2DlJ'></sub></form><legend id='T2DlJ'></legend><bdo id='T2DlJ'><pre id='T2DlJ'><center id='T2DlJ'></center></pre></bdo></b><th id='T2DlJ'></th></span></q></dt></tr></i><div id='T2DlJ'><tfoot id='T2DlJ'></tfoot><dl id='T2DlJ'><fieldset id='T2DlJ'></fieldset></dl></div>

        <bdo id='T2DlJ'></bdo><ul id='T2DlJ'></ul>
      <tfoot id='T2DlJ'></tfoot>
        <legend id='T2DlJ'><style id='T2DlJ'><dir id='T2DlJ'><q id='T2DlJ'></q></dir></style></legend>

        显示来自 Lucene 搜索结果的示例文本

        Displaying sample text from the Lucene Search Results(显示来自 Lucene 搜索结果的示例文本)
                <tbody id='Xa1Ah'></tbody>
            • <small id='Xa1Ah'></small><noframes id='Xa1Ah'>

                <bdo id='Xa1Ah'></bdo><ul id='Xa1Ah'></ul>
                <legend id='Xa1Ah'><style id='Xa1Ah'><dir id='Xa1Ah'><q id='Xa1Ah'></q></dir></style></legend>
                <tfoot id='Xa1Ah'></tfoot>

                1. <i id='Xa1Ah'><tr id='Xa1Ah'><dt id='Xa1Ah'><q id='Xa1Ah'><span id='Xa1Ah'><b id='Xa1Ah'><form id='Xa1Ah'><ins id='Xa1Ah'></ins><ul id='Xa1Ah'></ul><sub id='Xa1Ah'></sub></form><legend id='Xa1Ah'></legend><bdo id='Xa1Ah'><pre id='Xa1Ah'><center id='Xa1Ah'></center></pre></bdo></b><th id='Xa1Ah'></th></span></q></dt></tr></i><div id='Xa1Ah'><tfoot id='Xa1Ah'></tfoot><dl id='Xa1Ah'><fieldset id='Xa1Ah'></fieldset></dl></div>
                  本文介绍了显示来自 Lucene 搜索结果的示例文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  目前,我正在使用 Lucene 版本 3.0.2 创建一个类似于字典的搜索应用程序.我要显示的对象之一是一种示例",Lucene 会在其中查找书中的一个单词,然后显示使用这些单词的句子.

                  Currently, I am using Lucene version 3.0.2 to create a search application that is similar to a dictionary. One of the objects that I want to display is a sort of "example", where Lucene would look for a word in a book and then the sentences where the words were used are displayed.

                  我一直在阅读 Lucene in Action 这本书,其中提到了类似的内容,但通过它我找不到其他提及.这是你可以用 Lucene 做的事情吗?如果是,你是怎么做到的?

                  I've been reading the Lucene in Action book and it mentions something like this, but looking through it I can't find other mentions. Is this something you can do with Lucene? If it is, how is can you do it?

                  推荐答案

                  我相信您正在寻找的是荧光笔.

                  I believe what you are looking for is a Highlighter.

                  一种可能性是使用 lucene.search.highlight 包,特别是 荧光笔.

                  One possibility is to use the lucene.search.highlight package, specifically the Highlighter.

                  另一种选择是使用 lucene.search.vectorhighlight 包,特别是 FastVectorHighlighter.

                  Another option is to use the lucene.search.vectorhighlight package, specifically the FastVectorHighlighter.

                  这两个类都搜索文本文档,选择相关的片段并显示它们,并突出显示匹配的术语.我只使用了第一个,它适用于我的用例.如果您可以将图书预先分成较短的部分,那么突出显示的速度会更快.

                  Both classes search a text document, choose relevant snippets and display them with the matching terms highlighted. I have only used the first one, which worked fine for my use-case. If you can pre-divide the book into shorter parts, it would make highlighting faster.

                  这篇关于显示来自 Lucene 搜索结果的示例文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                  How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                  KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                  How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                  How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                  Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)
                  <legend id='RtHk9'><style id='RtHk9'><dir id='RtHk9'><q id='RtHk9'></q></dir></style></legend>
                    • <small id='RtHk9'></small><noframes id='RtHk9'>

                        <bdo id='RtHk9'></bdo><ul id='RtHk9'></ul>
                          <tbody id='RtHk9'></tbody>
                        <i id='RtHk9'><tr id='RtHk9'><dt id='RtHk9'><q id='RtHk9'><span id='RtHk9'><b id='RtHk9'><form id='RtHk9'><ins id='RtHk9'></ins><ul id='RtHk9'></ul><sub id='RtHk9'></sub></form><legend id='RtHk9'></legend><bdo id='RtHk9'><pre id='RtHk9'><center id='RtHk9'></center></pre></bdo></b><th id='RtHk9'></th></span></q></dt></tr></i><div id='RtHk9'><tfoot id='RtHk9'></tfoot><dl id='RtHk9'><fieldset id='RtHk9'></fieldset></dl></div>

                        1. <tfoot id='RtHk9'></tfoot>