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

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

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

        Lucene 搜索結(jié)果按自定義訂單列表排序(每個(gè)用戶唯

        Lucene search results sort by custom order list (unique to each user)(Lucene 搜索結(jié)果按自定義訂單列表排序(每個(gè)用戶唯一))
        <i id='MC5hp'><tr id='MC5hp'><dt id='MC5hp'><q id='MC5hp'><span id='MC5hp'><b id='MC5hp'><form id='MC5hp'><ins id='MC5hp'></ins><ul id='MC5hp'></ul><sub id='MC5hp'></sub></form><legend id='MC5hp'></legend><bdo id='MC5hp'><pre id='MC5hp'><center id='MC5hp'></center></pre></bdo></b><th id='MC5hp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MC5hp'><tfoot id='MC5hp'></tfoot><dl id='MC5hp'><fieldset id='MC5hp'></fieldset></dl></div>
              <tbody id='MC5hp'></tbody>

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

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

                • 本文介紹了Lucene 搜索結(jié)果按自定義訂單列表排序(每個(gè)用戶唯一)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我的應(yīng)用程序中有經(jīng)過身份驗(yàn)證的用戶可以訪問包含多達(dá) 500,000 個(gè)項(xiàng)目的共享數(shù)據(jù)庫(kù).每個(gè)用戶都有自己的面向公眾的網(wǎng)站,并且需要能夠優(yōu)先考慮在他們自己的網(wǎng)站上展示的項(xiàng)目(想想贊成).

                  I have authenticated users in my application who have access to a shared database of up to 500,000 items. Each of the users has their own public facing web site and needs the ability to prioritize the items on display (think upvote) on their own site.

                  在 500,000 個(gè)項(xiàng)目中,他們最多可能只有 200 個(gè)優(yōu)先項(xiàng)目,其余項(xiàng)目的順序不太重要.

                  out of the 500,000 items they may only have up to 200 prioritized items, the order of the rest of the items is of less importance.

                  每個(gè)用戶對(duì)項(xiàng)目的優(yōu)先級(jí)不同.

                  Each of the users will prioritize the items differently.

                  我最初在這里問了一個(gè)類似的 mysql 問題 Mysql 結(jié)果按每個(gè)用戶唯一的列表排序 并得到了很好的答案,但我相信更好的選擇可能是選擇非 sql 索引解決方案.

                  I initially asked a similar mysql question here Mysql results sorted by list which is unique for each user and got a good answer but i believe a better option may be to opt for a non sql indexed solution.

                  這可以在 Lucene 中完成嗎?是否有另一種搜索技術(shù)會(huì)更好.

                  Can this be done in Lucene?, is there another search technology which would be better for this.

                  ps.Google 對(duì)其搜索結(jié)果實(shí)施了類似的類型設(shè)置,如果您已登錄,您可以在其中優(yōu)先考慮和排除您自己的搜索結(jié)果.

                  ps. Google implements a similar type setup with their search results where you can prioritize and exclude your own search results if you are logged in.

                  更新:在我閱讀文檔時(shí)重新標(biāo)記為 sphinx,我相信它可能能夠通過存儲(chǔ)在內(nèi)存中的每個(gè)文檔屬性值"來完成我正在尋找的事情 - 有興趣聽到對(duì)此的任何反饋來自斯芬克斯大師

                  Update: re-tagged with sphinx as i have been reading the documentation and i believe it may be able to do what i am looking for with "per-document attribute values" stored in memory - interested to hear any feedback on this from sphinx gurus

                  推薦答案

                  在構(gòu)建索引時(shí),您肯定希望將 item 的 id 存儲(chǔ)在每個(gè)文檔對(duì)象中.有幾種方法可以進(jìn)行下一步,但一種簡(jiǎn)單的方法是獲取優(yōu)先項(xiàng)并將它們添加到您的搜索查詢中,對(duì)于每個(gè)特殊項(xiàng)如下所示:

                  You'll definitely want to store the id of item in each document object when building your index. There's a few ways to do the next step, but an easy one would be take the prioritized items and add them to your search query, something like this for each special item:

                  "OR item_id=%d+X"
                  

                  其中 X 是您想要使用的提升量.您可能需要根據(jù)經(jīng)驗(yàn)調(diào)整此數(shù)字,以確保僅被點(diǎn)贊"不會(huì)將其置于搜索完全不相關(guān)內(nèi)容的列表的頂部.

                  where X is the amount of boost you'd like to use. You'll probably need to empirically tweak this number to make sure that just being "upvoted" doesn't put it to the top of a list searching for something totally unrelated.

                  這樣做至少可以避免很多煩人的后處理步驟,這些步驟需要您遍歷整個(gè)結(jié)果集——希望從查詢索引開始就可以進(jìn)行正確的排序.

                  Doing it this way will at least prevent you from a lot of annoying postprocessing steps that would require you to iterate over the whole result set -- hopefully the proper sorting will be there right from querying the index.

                  這篇關(guān)于Lucene 搜索結(jié)果按自定義訂單列表排序(每個(gè)用戶唯一)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語(yǔ)句之前的局部變量,這有關(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)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 int?)

                    1. <small id='3dsjQ'></small><noframes id='3dsjQ'>

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

                            <tbody id='3dsjQ'></tbody>

                            <bdo id='3dsjQ'></bdo><ul id='3dsjQ'></ul>
                            主站蜘蛛池模板: 日韩精品1区2区3区 国产精品国产成人国产三级 | www.久久久| 九九色九九 | 中文字幕免费在线 | 91精品国产乱码久久久久久久久 | 美女拍拍拍网站 | 日屁视频 | 精品人伦一区二区三区蜜桃网站 | 亚洲一区二区久久久 | 一级特黄色毛片 | 激情欧美一区二区三区中文字幕 | 亚洲国产看片 | 欧美成人h版在线观看 | 天天在线操 | 91麻豆精品国产91久久久久久 | 久久久久国色av免费观看性色 | 四虎影院在线观看av | 一级做a毛片 | 国产高清毛片 | 欧美极品在线观看 | 午夜影院在线观看 | 免费久草 | 欧美5区| 福利社午夜影院 | 午夜久草 | 日本视频免费观看 | 亚洲一区二区久久 | 99精品欧美一区二区蜜桃免费 | 精久久 | 欧美日韩在线精品 | 日韩成人在线播放 | 欧洲一区二区视频 | 国产欧美一区二区三区日本久久久 | 久久久久久国产精品 | 久久国产精品一区二区三区 | 在线视频h | 亚洲精品白浆高清久久久久久 | 中文字幕一区二区不卡 | 一本在线| 欧美日韩亚洲三区 | 99久久精品一区二区毛片吞精 |