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`, `