Questions tagged [searchlogic]
86 questions
1
vote
1 answer
Search Logic removing records with no association from results when ordering by that association
I'm using search logic to filter and order my results but it removes records from my results when I order by a association and when that association is not always present for all records.
For example say I have a user model which can have one…

tee
- 725
- 2
- 8
- 15
1
vote
2 answers
case insensitive in searchlogic
Can Searchlogic search with case insensitivity?

jaycode
- 2,926
- 5
- 35
- 71
1
vote
1 answer
Combining Searchlogic named scopes with OR
Is something like this possible?
Product.price_greater_than(10000).or_tags_name_equals('luxury')
The wiki doesn't help much on this...
I saw in the wiki:
User.id_or_age_lt_or_username_or_first_name_begins_with(10)
=> "id < 10 OR age < 10 OR…

jaycode
- 2,926
- 5
- 35
- 71
1
vote
4 answers
Mysql question: is there something like IN ALL query?
For example this query:
SELECT `variants`.*
FROM `variants` INNER JOIN `variant_attributes`
ON variant_attributes.variant_id = variants.id
WHERE (variant_attributes.id IN ('2','5'))
And variant has_many variant_attributes
What I actually…

jaycode
- 2,926
- 5
- 35
- 71
1
vote
1 answer
Rails and Searchlogic: finding products that matching all given product categories by using searchlogic condition
I have a model Publication and a model Category in my Rails app. Both are connected with a has_and_belongs_to_many association.
Now I would like to search publications that match one or more categories. If more than one category is given they have…

Roland
- 43
- 1
- 4
1
vote
1 answer
Trouble getting basic searchlogic plugin code to work in Rails App
My rails app is throwing this error:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
I am trying to make a basic form that will allow a user to search for a "match" by "country". It is just a…

dbaugh
- 746
- 7
- 17
1
vote
2 answers
Date conditions using Search logic
The Rails plugin - Searchlogic, from binary logic - offers the ability to filter by date. I have my form set up like so...
<% form_for @search do |f| %>
<%= f.label :start %> <%= f.select :due_at_after, [[['','']],['November',…

Mark Swardstrom
- 17,217
- 6
- 62
- 70
1
vote
0 answers
Searchlogic: find records between dates with time
I am using Searchlogic Plugin, but I need find records between two Time's.
created_at_after("02-01-2012 00:00:00")
created_at_before("02-01-2012 23:59:59")
no return nothing, but
created_at_after("01-01-2012 00:00:00")
…

Luiz Carvalho
- 1,549
- 1
- 23
- 46
0
votes
1 answer
Searchlogic - searching for exact match
I am using Searchlogic to perform searches on my 'report' index page.
<% form_for @search do |f| %>
Search:
<%= f.text_field :report_id_like, :size=> 50 %>
<%= f.submit "Search" %>
<% end %>
Currently, if I search for a report with report id…

Kim
- 2,070
- 5
- 33
- 46
0
votes
1 answer
searchlogic - searching for attr_accessor
I have a table symbols which contains columns: id and symbol_name, where id is the primary key of that table
In my Symbol model, I have
class Symbol < ActiveRecord::Base
def symbol_id
"EMI:#{self.id}"
end
end
On my index.html.erb page, users can…

Kim
- 2,070
- 5
- 33
- 46
0
votes
1 answer
Searchlogic gem install -> installs gems that aren't searchlogic (and then doesn't install searchlogic)
% gem install searchlogic -v2.4.28
Fetching: arel-2.2.1.gem (100%)
Fetching: tzinfo-0.3.31.gem (100%)
Successfully installed activemodel-3.1.3
Successfully installed arel-2.2.1
Successfully installed tzinfo-0.3.31
3 gems installed
Installing ri…

NullVoxPopuli
- 61,906
- 73
- 206
- 352
0
votes
1 answer
Rails, how to use searchlogic to reorder returned objects
So I have had various forms of this working in the last while, but never all working together.
for reference I have categories / Brands / Products, with the right relationships working: the site is http://emeraldcityguitars.com to see it in…

TJ Sherrill
- 2,465
- 7
- 50
- 88
0
votes
4 answers
How do you do this in mysql or rails
Say you have a posts table and a tags table, and both are related by a post_tags table.
so
posts has id/subject/body columns
tags has id/name
post_tags has id/post_id/tag_id
in rails terminology, I have a Post Model that has many Tags through…

concept47
- 30,257
- 12
- 52
- 74
0
votes
1 answer
backpack laravel - searchLogic not working for select_multiple
SearchLogic for select_multiple isn't working, I can't change the type of the column so, I have to make it searchable. any workaround?
thanks in advance
I tried to make it to different type as well but getting datatables popup error…

Paritosh Mehra
- 1
- 1
0
votes
1 answer
RoR: Search Logic: How do I do a left join, instead of the default left inner join?
I'm doing sorting based on a field that references another table (and sorting on that other table's 'name' field). The issue is that when my first set of objects has some entries that don't have a reference to the other, that entry is excluded from…

NullVoxPopuli
- 61,906
- 73
- 206
- 352