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

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

      <bdo id='F14Mc'></bdo><ul id='F14Mc'></ul>

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

      <tfoot id='F14Mc'></tfoot>

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

    1. Lucene - 檢索文檔中多值字段的所有值

      Lucene - retrieve all values for a multi-valued field in a document(Lucene - 檢索文檔中多值字段的所有值)
      <i id='ET92g'><tr id='ET92g'><dt id='ET92g'><q id='ET92g'><span id='ET92g'><b id='ET92g'><form id='ET92g'><ins id='ET92g'></ins><ul id='ET92g'></ul><sub id='ET92g'></sub></form><legend id='ET92g'></legend><bdo id='ET92g'><pre id='ET92g'><center id='ET92g'></center></pre></bdo></b><th id='ET92g'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ET92g'><tfoot id='ET92g'></tfoot><dl id='ET92g'><fieldset id='ET92g'></fieldset></dl></div>
        <tbody id='ET92g'></tbody>
        • <bdo id='ET92g'></bdo><ul id='ET92g'></ul>
        • <legend id='ET92g'><style id='ET92g'><dir id='ET92g'><q id='ET92g'></q></dir></style></legend>

          • <tfoot id='ET92g'></tfoot>

              1. <small id='ET92g'></small><noframes id='ET92g'>

                本文介紹了Lucene - 檢索文檔中多值字段的所有值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我在 Lucene 中添加了一個多值字段:

                I added a field in Lucene which is multi-valued as such:

                String categoriesForItem = getCategories(); // returns "category1, category2, cat3" from a DB call
                
                String [] categoriesForItems = categoriesForItem.split(","; 
                for(String cat : categoriesForItems) {
                    doc.add(new StringField("categories", cat , Field.Store.YES)); // doc is a Document 
                }
                

                稍后當我在某個類別中搜索項目時,一切都按預期工作,但是當我得到一個文檔并執行以下操作時:

                later when I am searching for items in a category everything works as expected, but when I get a Document and do:

                String categories= doc.getField("categories").stringValue(); 
                

                我只獲取該文檔的最后插入值,而不是為該文檔添加的所有值.

                I only get the last inserted value for that document rather than all the values that were added for that document.

                如何獲取為該文檔添加的所有值?

                How can I get all the values which were added for that document?

                推薦答案

                你添加到文檔中的不是多值單字段,而是多個同名字段.最后,您只檢索一個字段.

                What you are adding to the document is not multi-valued single field, but multiple fields with the same name. At the end you are only retrieving one field.

                使用 public final ListDocument 的 getFields() 代替.

                Use public final List<IndexableField> getFields() of Document instead.

                這篇關于Lucene - 檢索文檔中多值字段的所有值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

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

                    1. <legend id='YBmEN'><style id='YBmEN'><dir id='YBmEN'><q id='YBmEN'></q></dir></style></legend>

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

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

                          主站蜘蛛池模板: 色婷婷国产精品综合在线观看 | 欧美日韩一二区 | av黄色在线观看 | 狠狠色狠狠色综合系列 | 99这里只有精品视频 | 谁有毛片 | 日韩爱爱网站 | 综合色久 | 手机av在线 | 在线视频第一页 | 国产一区二区精品自拍 | 中文字幕一二三区 | 国产精品免费一区二区 | 一区二区三区四区在线视频 | 亚洲国产精品一区二区第一页 | 亚洲第一中文字幕 | 日韩av免费看 | 一区二区三区高清 | 国产一区二区三区视频在线观看 | 国产小u女发育末成年 | 水蜜桃久久夜色精品一区 | 久久99精品久久久久久国产越南 | 天天草天天射 | 一级毛片视频在线 | 国产亚洲精品区 | 亚洲电影第三页 | 国产精品成av人在线视午夜片 | 99视频精品| 国产美女精品视频免费观看 | 国产一区二区三区四区在线观看 | 色999视频| 日朝毛片| a在线观看 | 亚洲欧洲在线观看视频 | 亚洲欧美激情精品一区二区 | 欧美激情一区 | 美女久久视频 | 国产精品一区在线观看你懂的 | 蜜桃av人人夜夜澡人人爽 | 国产精品不卡 | 欧美日韩高清 |