久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='4VEvU'><tr id='4VEvU'><dt id='4VEvU'><q id='4VEvU'><span id='4VEvU'><b id='4VEvU'><form id='4VEvU'><ins id='4VEvU'></ins><ul id='4VEvU'></ul><sub id='4VEvU'></sub></form><legend id='4VEvU'></legend><bdo id='4VEvU'><pre id='4VEvU'><center id='4VEvU'></center></pre></bdo></b><th id='4VEvU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4VEvU'><tfoot id='4VEvU'></tfoot><dl id='4VEvU'><fieldset id='4VEvU'></fieldset></dl></div>
    <tfoot id='4VEvU'></tfoot>
    • <bdo id='4VEvU'></bdo><ul id='4VEvU'></ul>

      1. <small id='4VEvU'></small><noframes id='4VEvU'>

      2. <legend id='4VEvU'><style id='4VEvU'><dir id='4VEvU'><q id='4VEvU'></q></dir></style></legend>
      3. lucene 中的高光性能非常慢

        very slow highlight performance in lucene(lucene 中的高光性能非常慢)
      4. <legend id='a9uaj'><style id='a9uaj'><dir id='a9uaj'><q id='a9uaj'></q></dir></style></legend>
        <i id='a9uaj'><tr id='a9uaj'><dt id='a9uaj'><q id='a9uaj'><span id='a9uaj'><b id='a9uaj'><form id='a9uaj'><ins id='a9uaj'></ins><ul id='a9uaj'></ul><sub id='a9uaj'></sub></form><legend id='a9uaj'></legend><bdo id='a9uaj'><pre id='a9uaj'><center id='a9uaj'></center></pre></bdo></b><th id='a9uaj'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='a9uaj'><tfoot id='a9uaj'></tfoot><dl id='a9uaj'><fieldset id='a9uaj'></fieldset></dl></div>

              <tbody id='a9uaj'></tbody>
            • <bdo id='a9uaj'></bdo><ul id='a9uaj'></ul>

              • <small id='a9uaj'></small><noframes id='a9uaj'>

                  <tfoot id='a9uaj'></tfoot>
                  本文介紹了lucene 中的高光性能非常慢的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  Lucene (4.6) 熒光筆在搜索常用詞時性能非常慢.搜索速度很快(100 毫秒),但突出顯示可能需要一個多小時(!).

                  Lucene (4.6) highlighter has very slow performance, when a frequent term is searched. Search is fast (100ms), but highlight may take more than an hour(!).

                  詳細(xì)信息: 使用了很棒的文本語料庫(1.5GB 純文本).性能不取決于文本是否被分成更多的小塊.(也用 500MB 和 5MB 塊進(jìn)行了測試.)存儲位置和偏移量.如果搜索一個非常頻繁的術(shù)語或模式,TopDocs 檢索速度很快(100 毫秒),但每個searcher.doc(id)"調(diào)用都很昂貴(5-50 秒),getBestFragments() 非常昂貴(超過 1 小時).甚至它們也為此目的被存儲和索引.(硬件:core i7、8GM mem)

                  Details: great text corpus was used (1.5GB plain text). Performance doesn't depend if text is splitted into more small pieces or not. (Tested with 500MB and 5MB pieces as well.) Positions and offsets are stored. If a very frequent term or pattern is searched, TopDocs are retrieved fast (100ms), but each "searcher.doc(id)" calls are expensive (5-50s), and getBestFragments() are extremely expensive (more than 1 hour). Even they are stored and indexed for this purpose. (hardware: core i7, 8GM mem)

                  更大的背景:它將服務(wù)于語言分析研究.使用了一種特殊的詞干提取:它也存儲詞性信息.例如,如果 "adj adj adj adj noun" 被搜索,它會給出它在文本中出現(xiàn)的所有內(nèi)容.

                  Greater background: it would serve a language analysis research. A special stemming is used: it stores the part of speech info, too. For example if "adj adj adj adj noun" is searched, it gives all its occurrences in the text with context.

                  我可以調(diào)整它的性能,還是應(yīng)該選擇其他工具?

                  使用代碼:

                              //indexing
                              FieldType offsetsType = new FieldType(TextField.TYPE_STORED);
                              offsetsType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
                  
                              offsetsType.setStored(true);
                              offsetsType.setIndexed(true);
                              offsetsType.setStoreTermVectors(true);
                              offsetsType.setStoreTermVectorOffsets(true);
                              offsetsType.setStoreTermVectorPositions(true);
                              offsetsType.setStoreTermVectorPayloads(true);
                  
                  
                              doc.add(new Field("content", fileContent, offsetsType));
                  
                  
                              //quering
                              TopDocs results = searcher.search(query, limitStart+limit);
                  
                              int endPos = Math.min(results.scoreDocs.length, limitStart+limit);
                              int startPos = Math.min(results.scoreDocs.length, limitStart);
                  
                              for (int i = startPos; i < endPos; i++) {
                                  int id = results.scoreDocs[i].doc;
                  
                                  // bottleneck #1 (5-50s):
                                  Document doc = searcher.doc(id);
                  
                                  FastVectorHighlighter h = new FastVectorHighlighter();
                  
                                  // bottleneck #2 (more than 1 hour):   
                                  String[] hs = h.getBestFragments(h.getFieldQuery(query), m, id, "content", contextSize, 10000);
                  

                  相關(guān)(未回答)問題:https://stackoverflow.com/questions/19416804/very-slow-solr-performance-when-highlighting

                  推薦答案

                  BestFragments 依賴于您正在使用的分析器完成的標(biāo)記化.如果要分析這么大的文本,最好在索引時存儲詞向量WITH_POSITIONS_OFFSETS.

                  BestFragments relies on the tokenization done by the analyzer that you're using. If you have to analyse such a big text, you'd better to store term vector WITH_POSITIONS_OFFSETS at indexing time.

                  請閱讀這個和這本書

                  通過這樣做,您無需在運(yùn)行時分析所有文本,因?yàn)槟梢赃x擇一種方法來重用現(xiàn)有術(shù)語向量,這將減少突出顯示的時間.

                  By doing that, you won't need to analyze all the text at runtime as you can pick up a method to reuse the existing term vector and this will reduce the highlighting time.

                  這篇關(guān)于lucene 中的高光性能非常慢的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)
                  • <tfoot id='FflBF'></tfoot>
                    • <bdo id='FflBF'></bdo><ul id='FflBF'></ul>

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

                      <legend id='FflBF'><style id='FflBF'><dir id='FflBF'><q id='FflBF'></q></dir></style></legend>

                            <tbody id='FflBF'></tbody>
                          • <i id='FflBF'><tr id='FflBF'><dt id='FflBF'><q id='FflBF'><span id='FflBF'><b id='FflBF'><form id='FflBF'><ins id='FflBF'></ins><ul id='FflBF'></ul><sub id='FflBF'></sub></form><legend id='FflBF'></legend><bdo id='FflBF'><pre id='FflBF'><center id='FflBF'></center></pre></bdo></b><th id='FflBF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FflBF'><tfoot id='FflBF'></tfoot><dl id='FflBF'><fieldset id='FflBF'></fieldset></dl></div>
                            主站蜘蛛池模板: 亚洲不卡在线观看 | 国产欧美精品一区二区色综合朱莉 | 男女污网站 | 中文字幕 视频一区 | 欧美一区中文字幕 | 色综合99| 欧美日韩国产不卡 | 久久精品久久久久久 | 黄色免费网 | 免费成人高清在线视频 | 国产精品欧美一区喷水 | 亚洲成人一区二区 | 日日摸夜夜爽人人添av | aa级毛片毛片免费观看久 | 国产精品国产自产拍高清 | 欧美一区二区在线播放 | 综合久久av | 欧美另类视频在线 | 在线国产一区二区三区 | 日韩电影中文字幕 | 一级黄a视频 | 一二区成人影院电影网 | 国产成人综合一区二区三区 | 国产成人免费在线 | 亚洲成人一区 | 欧美综合在线视频 | 久久一区视频 | 国产精品久久久久免费 | 草久久久 | 成人精品久久久 | 久久久一| 久久久蜜桃 | 久久精品小视频 | av国产精品| 99久热在线精品视频观看 | 国产精品久久久久久久久久久新郎 | 久久久精品网站 | 欧美一级做性受免费大片免费 | av色在线 | 伊人免费观看视频 | 亚洲a视频|