thinking-sphinx

Thinking-Sphinx not returning any results in console or via web app

試著忘記壹切 提交于 2019-12-25 05:18:11
问题 Similar to these: sphinx-not-indexing, thinking-sphinx returning empty results in console, similar here The problem description is this: I can't get any results with any parameters from Sphinx. I have a hdd scaffold, and when I try and perform a search in rails console with sphinx I get [], and that's even when I know that there are items in the database. If I do Hdd.search() I should get the same as Hdd.all, but instead I get []. I saw a post about doing Hdd.search().to_a, but that doesn't

Thinking Sphinx and searching multiple models

旧城冷巷雨未停 提交于 2019-12-25 02:22:32
问题 I'm looking for a way to perform a search against multiple models (see this post), and got a couple of answers saying that Thinking Sphinx would be a good match for this kind of thing. Indeed, it looks sweet, and it seems the application-wide search capability ( ThinkingSphinx.search ) is close to what I want. But the docs state this will return various kinds of model objects, depending on where a match was found. I have a models somewhat like this: Employee Company Municipality County Where

Enabling stemming from sphinx.yml in Thinking Sphinx

谁都会走 提交于 2019-12-24 01:03:33
问题 I created a config/sphinx.yml file with the line: morphology: stem_en After running rake ts:config, it doesn't seem to have changed development.sphinx.conf, and following a rebuild, searching for "dawg" doesn't match "dawgs". How can I get this to work? 回答1: If I recall correctly the morphology line should fall under a "development" header like so: development: morphology: stem_en Not sure if you've done so already, but if not give it a try. 来源: https://stackoverflow.com/questions/1173777

How to index boolean column in thinking sphinx using Ruby 1.8.7

让人想犯罪 __ 提交于 2019-12-23 15:19:36
问题 I am new to ROR. i am using thinking sphinx. I need to index with one boolean field. that is, i list out records which are active is true. define_index do indexes car.name, :as => :car indexes car_model.car_make.name, :as => :car_make indexes city_name.city , :as=> :city_name indexes car_active, :as=>:is_active, :type=>:boolean, :default=>true end I need to list out car details which are belong to active is true. can you help me? 回答1: If you want to filter on a boolean, then it's much better

Rails paginate existing array of ActiveRecord results

我与影子孤独终老i 提交于 2019-12-23 09:37:30
问题 I generally use will_paginate for the pagination in my app, but have hit a stumbler on my search feature. I'm using Thinking Sphinx for doing my full-text search, which returns results paginated. The problem I'm having is that after I've received the results from Thinking Sphinx, I need to merge them with some other results and re-order them. Once I've finished processing them I have an Array of results that is very different from the original from TS. As there could be 1000+ results in this

Thinking Sphinx Rake aborted, searchd is running while rebuilding or start/stop ts. Index works fine

牧云@^-^@ 提交于 2019-12-23 09:29:42
问题 When I invoke rake ts:rebuild RAILS_ENV=production , I get the following: (in /var/www/abc.com/public/abc/releases/20101008073517) ** Erubis 2.6.6 Stopped search daemon (pid 22531). Generating Configuration to /var/www/abc.com/public/abc/releases/20101008073517/config/production.sphinx.conf Sphinx 1.10-beta (r2420) Copyright (c) 2001-2010, Andrew Aksyonoff Copyright (c) 2008-2010, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/var/www/abc.com/public/abc/releases

thinking sphinx error when rake thinking_sphinx:start

筅森魡賤 提交于 2019-12-23 04:17:15
问题 I am using gem 'thinking-sphinx', '2.0.10' for search functionality.I am following http://railscasts.com/episodes/120-thinking-sphinx tutorial for this. script/plugin install git://github.com/freelancing-god/thinking-sphinx.git rake thinking_sphinx:index These 2 steps executed without any problem,but when i did rake thinking_sphinx:start it was giving following error : Failed to start searchd daemon. Check /home/user/newsvn/alumnicell/log/searchd.log. Failed to start searchd daemon. Check

thinking sphinx ordering by mixing capitals and lower case

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 02:06:47
问题 I have a rails application that is using thinking_sphinx for the searching. My problem is that the result returned is sorted with capitals first and lower case after it at the bottom. I'd like to mix them so that both 'A' and 'a' comes before 'B'. This is the method I'm using: Company.search(query, :star => true, :page => params[:page], :per_page => 20, :order => :name, :sort_mode => :asc) 回答1: Maurício's answer is almost on the right track - but that's for transforming the text that Sphinx

Using crc32 tweak on has_many relations in Thinking Sphinx

北城余情 提交于 2019-12-22 18:06:44
问题 It's weird actually. I have two models that have has_many relation each other, here are my models #model city class City < ActiveRecord::Base belong_to :state end #model state class State < ActiveRecord::Base has_many :city end and I have state index ThinkingSphinx::Index.define 'state', :with => :active_record do indexes state_name, :sortable => true #here is the problem has "CRC32(cities.city_name)", :as => :city_name, :type => :integer end I want to use city_name as a filter. My code above

Sphinx with metaphone and wildcard search

怎甘沉沦 提交于 2019-12-22 11:35:47
问题 we are an anatomy platform and use sphinx for our search. We want to make our search more fuzzier and started to use metaphone to correct spelling mistakes. It finds for example phalanges even though the search word is falanges . That's good but we want more. We want that the user could type in falange or even falang and we still find phalanges . Any ideas how to accomplish this? If you are interested you can checkout our sphinx config file here. Thanks! 回答1: Well you can enable both