thinking-sphinx

    0熱度

    1回答

    我已經設置了思維獅身人面像的實時索引,它的工作非常好,並與地理主義搜索以及。但現在我想搜索多邊形內的記錄。 獅身人面像文檔解釋了它很好的Geo-distance searching 現在我想用用思維獅身人面像這一功能。 思維獅身人面像確實解釋了關於geodist搜索Here 但它沒有說明如何在多邊形內進行搜索。 任何人都可以幫助我這麼做嗎?

    0熱度

    1回答

    我試圖將ThinkingSphinx中基於增量的索引轉換爲實時索引。每文檔,我添加了這個回調: after_save ThinkingSphinx::RealTime.callback_for(:location) 這只是正常的添加和更新記錄,嗚。我的問題是刪除記錄,根據Rails文檔,不會觸發after_save回調。我已通過刪除一條記錄來證實這一點,該記錄並未從我的獅身人面像索引中刪除。 我試

    0熱度

    1回答

    當使用帶有從A到B的has_one關聯(使用B具有belongs_to語句)的Thinking Sphinx對A進行索引時,可以在索引中使用has_many關聯和join語句。當然,這會產生一個SphinxQL查詢,它在B的主鍵上進行分組。但是,當我嘗試使用與B上的索引相同的關聯時,我無法明顯使用belongs_to端的關聯。我的問題是,是否有可能使用belongs_to關聯,或者是否有解決方法?

    0熱度

    1回答

    我有一個Rails應用程序,我想在其中使用思維獅身人面像進行搜索。我有一個有很多雖然關係以下型號,Product有很多Type秒通過ProductType。 # Product.rb has_many :product_types has_many :types, through: :product_types # Type.rb has_many :product_types has

    0熱度

    1回答

    我有一個多態關聯一張紙條模型,就像下面 incident has one symptom -> (note model) incident has many comments -> (note model) 和 我願做中綴條件加綴和前綴索引嵌套模型索引與筆記型「症狀」的字條,並希望做前綴索引與類型的紀錄「註釋」 我試過在獅身人面像索引下面的代碼 ThinkingSphinx::Index.d

    0熱度

    1回答

    我想在我的Rails 5項目中使用ThinkingSphinx。我在http://freelancing-gods.com/thinking-sphinx/ 上讀取指令我需要在SQL支持索引上實現OR邏輯。 這裏是我的類: class Message < ApplicationRecord belongs_to :sender, class_name: 'User', :inverse_

    0熱度

    1回答

    定模式: create_table "letters", force: :cascade do |t| t.string "title", limit: 255 t.text "content", limit: 16777215 t.date "issue_date" t.datetime "created_at", null: false t.datetime "upda

    0熱度

    1回答

    我想在我的Rails 5項目中使用ThinkingSphinx(帶有SQL支持的索引)。 我需要一些動態運行時索引來搜索。 我有一個Message模型: class Message < ApplicationRecord belongs_to :sender, class_name: 'User', :inverse_of => :messages belongs_to :re

    1熱度

    1回答

    使用思維 - 獅身人面像3.2.0。 我有條件鏈接有條件,並希望在鏈定義後觸發「.search_for_ids」。因此,我想使用sphinx_scope來定義多個字段的條件。 sphinx_scope(:for_query) do |query| { conditions: { title: query, description: query } } end 這

    0熱度

    1回答

    是否可以像OR條件那樣做AND條件? 這是我簡單的獅身人面像的查詢只AND ... Job.search('', {with: {canonical_type: Zlib::crc32('SubCategory')}, conditions: { sub_category_ids: [4]}}) Sphinx Query (22.8ms) SELECT * FROM `job_core`, `