tire

    0熱度

    1回答

    我試圖在彈性搜索查詢中複製下面的查詢邏輯,但是某些內容不正確。 基本上下面的查詢返回一個文檔。我想要應用第一個條件:"name": "iphone"或更復雜的第二個是:(username = 'gogadget' AND status_type = '1' AND created_time between 4532564 AND 64323238)。請注意,嵌套布爾必須應該會照顧更復雜的條件。如果

    0熱度

    1回答

    查詢嵌套索引我有一個Article型號: class Article < ActiveRecord::Base include Tire::Model::Search include Tire::Model::Callbacks settings default_options do mapping do indexes :id, index:

    0熱度

    1回答

    我有一個名爲offers的索引,我嘗試使用Elastic搜索執行全文搜索,使用gem Tire進行Im。 我的模型有一個描述字段,但是這一領域的投入是一個所見即所得的編輯器,所以當我檢查ElasticSearch索引的索引數據的description場已全部<p>的新生產線\n等衆多編碼字符像這樣: <h2>Qué hay en la caja:</h2>\r\n\r\n<ul>\r

    2熱度

    1回答

    我試圖使用tire寶石等值與elasticsearch-rails寶石的Item模型轉換的映射: tire do mapping( _parent: { type: 'player' }, _routing: { required: true, path: :user } ) do indexes :user, type: "string", index:

    1熱度

    1回答

    我試圖找出用elastic.co做多表搜索的最佳方法。 特別是,我想知道是否可以在此搜索方法中添加更多索引。 Chapter.rb def self.search(params) fields = [:title, :description, :content ] **tables** = [Chapter.index_name, Book.index_name]

    1熱度

    1回答

    我試圖將輪胎整合到我的網站,我有分頁困難。我已經嘗試對Tire的上下文進行分頁,will_paginate正在處理該數組。但是,當我在Tire的環境中嘗試will_paginate時,我遇到了一個大問題。 Will_Paginate將顯示正確的頁面數,考慮:per​​_page,但是當我點擊該頁面時,結果不會被加載,而是它們與第一頁上的相同。頁碼在will_paginate導航中突出顯示。

    1熱度

    2回答

    我正嘗試使用Rails(3.2.8),Tire和ElasticSearch創建自定義映射。 我想「標題」和「說明」是唯一的搜索/索引的屬性...但是,我似乎無法使這項工作: 下面是我的模型: class BlogPost < ActiveRecord::Base attr_accessible :title, :description, :attachment, :attachment_

    2熱度

    1回答

    嘗試在Elasticsearch和Tire上部署heroku生產中的rails應用程序。 Heroku的盆景插件添加,但仍運行此命令 heroku run rake environment tire:import CLASS=Property FORCE=true 收到錯誤後: 400 : No handler found for uri [/properties] and method [POS

    0熱度

    1回答

    我正在使用Tire gem作爲elasticsearch客戶端。 我想知道是否有辦法知道索引中是否存在已知標識的文檔? 類似: Tire.exists? { index: 'myIndex', type: 'myType', id: 'myId' }

    1熱度

    1回答

    我想結合ids查詢與must_not子句。我正在使用(重新)輪胎寶石與rails應用程序。 我在做這樣的事情: query do ids ["foo", "bar", "test"] end 其中一期工程。但是,當我試圖將其與must_not子句結合使用時,出現錯誤 - must_not僅適用於boolean作用域,其中不包括ids查詢。有什麼辦法可以將這兩個查詢結合起來嗎?