Questions tagged [searchlogic]
86 questions
2
votes
3 answers
rails trim whitespace from searchlogic text field
This works:
Baseline Controller
@search = Baseline.search(params[:search])
@baselines = @search.paginate :page => params[:page], :per_page => params[:per_page]
baseline index view
<% form_for @search do |f| %>
<%= f.text_field…

nictrix
- 1,483
- 1
- 17
- 34
2
votes
1 answer
Searchlogic and :has_many, :through =>
I'm using Searchlogic to search on many fields in a database. One of those fields is a :has_may, :through => relationship, and I can't get it to work.
Here are the relevant parts of the models:
Source.rb:
class Source < ActiveRecord::Base
…

Gwendydd
- 21
- 2
2
votes
0 answers
rails 3 searchlogic & fckeditor gems
I used searchlogic and fckedtior plugin rails 2x application currently i am converting that rails 2x application into rails 3x application this two gem not working in rails 3x can any one tell me any other related gem which support rails 3x or how…

Siva KB
- 357
- 1
- 6
- 19
2
votes
1 answer
searchlogic with globalize2?
Given there is a model:
class MenuItem < ActiveRecord::Base
translates :title
end
and searchlogic is plugged in, I'd expect the following to work:
>> MenuItem.search(:title_like => 'tea')
Sadly, it…

artemave
- 6,786
- 7
- 47
- 71
2
votes
1 answer
Using searchlogic with will_paginate
EDIT Looks like I figured it out - I had to call paginate after the call to all from Searchlogic.
I'm trying to use both of these tools to enable users to search contacts and return a paginated list (or the entire paginated list if they don't enter…

Wayne Molina
- 19,158
- 26
- 98
- 163
2
votes
1 answer
How to change alias of table for Active::Record include option( default alias : table_name)
I am facing a similar issue: https://github.com/binarylogic/searchlogic/issues/30 when I use include in my query which is returned by searchlogic. This issue was there since 3 years. I hope someone might have know the fix. And also I didn't find…

Rahul Tapali
- 9,887
- 7
- 31
- 44
1
vote
1 answer
Best way to implement simple sorting / searching in Rails
What's the best way to implement an interface that looks like this in rails?
Currently I'm using Searchlogic, and it's a tad painful. Problems include:
Making sure certain operations remain orthogonal -- for example, if you select "Short Posts"…

Tom Lehman
- 85,973
- 71
- 200
- 272
1
vote
1 answer
Searchlogic: how do I define a namedscope so that I can use OR on an associated model?
So, I found this: Searchlogic OR condition results in undefined method
But that only works for fields on the model your are searching on directly.
I have a suscription model, but I want to search over the different subscriptions' account names OR…

NullVoxPopuli
- 61,906
- 73
- 206
- 352
1
vote
2 answers
Ruby on Rails: 2.3.8: How do I get searchlogic to work with bundler?
Currently, I get this error: NameError: undefined methodmerge_joins' for class Class'
i'm just doing
gem "searchlogic"
and bundler says that it is using version 2.4.28
So... what in the right searchlogic version to use with rails 2.3.8?…

NullVoxPopuli
- 61,906
- 73
- 206
- 352
1
vote
1 answer
How to add a GROUP_BY clause in a Searchlogic query?
I'm using Searchlogic with Rails 2.3.5 and I need to do add a GROUP_BY clause with 2 columns to my query. I tried:
User.search.group = "column1, column2" # Undefined method 'group'
User.search(:group => "column1, column2") #…

Vitor Baptista
- 2,016
- 1
- 23
- 28
1
vote
2 answers
How can I search through a has_many association in Rails 3 (meta_where or railslogic?)
I have a model called UserHasMessages where:
belongs_to :message
belongs_to :user
And User.rb model is:
has_many :messages, :through => :user_has_messages
I want to find Users where the associated UserHasMessages has a Message_id of @message.id
I…

Satchel
- 16,414
- 23
- 106
- 192
1
vote
2 answers
Searchlogic: Strange behaviour when combining scopes with OR
I'm currently implementing a search form in our users database. I would like to search by id , by login or by email.
Naturally, I think that the best aproach is to combine scopes and simplify the form. So I added a text_field for…

Dorian
- 2,571
- 23
- 33
1
vote
1 answer
SearchLogic problems due to caching of method calls
I am trying to use the searchlogic gem to perform searches over a couple tables Post has_many assets. I need it to perform left outer joins rather than inner joins in the event of a non-existant asset.
From what I have below the query is generated…

chris
- 4,332
- 5
- 41
- 61
1
vote
3 answers
Rails - Searchlogic to search condition as an array of value
I have two models Employee & Unit. Unit has many Employees. I am using SearchLogic to search employee model. What is the equivalent of below SQL in Searchlogic
employees.unit_id IN (1,2,3)
I have tried both
unit_id_equals_all[]…

eabhvee
- 159
- 1
- 1
- 9
1
vote
0 answers
Searchlogic Results Duplicating with Each Association
When I chain searchlogix conditions that associate different tables, the results duplicate.
When I chain searchlogix conditions querying fields from a single table, the results work perfectly.
Below is an example of chaining conditions across…

John H
- 31
- 4