Questions tagged [searchlogic]

86 questions
0
votes
1 answer

RoR: Search Logic, How do I use OR with two different values on the same field?

I want to do something similar to : @search(some_condition or some_other_condition) this is how the internet says to use OR http://www.binarylogic.com/2009/08/26/using-searchlogic-to-combine-named-scopes-with-or/ unfortunately it only uses the same…
NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352
0
votes
1 answer

can not open 'rails console' after 'gem install searchlogic'

lhdgriver@lhdgriver-1015PW:~/prog/social$ bundle show searchlogic /home/lhdgriver/.rvm/gems/ruby-1.9.2-p180/gems/searchlogic-2.4.28 lhdgriver@lhdgriver-1015PW:~/prog/social$ rails…
lhdgriver
  • 315
  • 1
  • 3
  • 17
0
votes
2 answers

Searchlogic OR condition results in undefined method

I'm sure that I'm overlooking something since this is my first time using Searchlogic. Whenever I use a statement like Listing.city_like_or_state_like(params[:search]) in my controller, Rails returns an "Undefined Method" error. I'm trying to…
mdunkle
  • 1,715
  • 2
  • 14
  • 17
0
votes
1 answer

Can I do an 'in' search with searchlogic/metasearch in Rails 3 passing an array?

I am using the acts_as_network gem which allows me to get all the friends for a User through 'User.friends' I want to create a 'friend feed' showing all the recent events for all of the friends by searching through the Event records where Event: …
Satchel
  • 16,414
  • 23
  • 106
  • 192
0
votes
1 answer

Inspect MetaSearch columns

Regarding MetaSearch, I would like to extract "human" names from the search parameters. For example, when the params[:search] has non-blank values for the following: - title_contains - author_name_contains I would like to extract: - title -…
jrhicks
  • 14,759
  • 9
  • 42
  • 57
0
votes
1 answer

How to group conditions between parenthesis in Searchlogic?

Is there a way to create grouped conditions (between parenthesis in raw sql) in searchlogic? I've found this, but seems to be deprecated in Searchlogic 2.x (using 2.4.27)
empz
  • 11,509
  • 16
  • 65
  • 106
0
votes
2 answers

Chaining searching and sorting together in rails using serachlogic

My code is very similar to that in railscasts #240 The differences are that I am using rails 2.3.10 so I am not using 'where'. Instead I am using serachlogic and my model looks like this... //Model.rb def self.search(search) if search …
Rick Schmidt
  • 497
  • 2
  • 10
0
votes
1 answer

Finding the union of multiple LIKE searches with searchlogic or named_scopes?

Given a delimited string of unknown length e.g. 'peanut,banana' or 'bacon,eggs,toast,arugula', I want to use named_scope or searchlogic in my rails 2.3.9 app to end up with a SQL statement like SELECT * FROM foods WHERE (name LIKE 'peanut') OR (name…
Zeke
  • 1,448
  • 14
  • 30
0
votes
1 answer

Multiple LIKE matches with Arel & MetaWhere

I'm transitioning an application written in Rails-2.3 with SearchLogic to Rails-3.0 with Arel and MetaWhere, and I'm running into an operation that I don't know how the write. The old code was: if params[:city] && params[:city].respond_to?(:each) …
Adam Lassek
  • 35,156
  • 14
  • 91
  • 107
0
votes
3 answers

Searchlogic alternatives

Do any good ones exist? Nothing performance heavy...I just need to be able to search for records from my admin panel. Thanks.
user94154
  • 16,176
  • 20
  • 77
  • 116
0
votes
1 answer

How to have searchlogic initialize with no records

I'm using Searchlogic in a model with tens of thousands of records and don't want to initially display them all the first time the search page loads. How do I get an empty search object from searchlogic if there are no :search params? def…
0
votes
1 answer

How do I add an element that shows what was searched in Searchlogic?

I am using the gem Searchlogic for Rails. Everything is working great. The only question I have left is how to have an element display, after the query, that says something like: Search Results for "whatever" I can't find anything in the docs.…
bgadoci
  • 6,363
  • 17
  • 64
  • 91
0
votes
1 answer

Rails app with nested resources, need help with SearchLogic

I am trying to setup searchlogic on nested resources. I have Category has_many :products also Category has_many :brands through :products So structurally its Category/Brand/Product As a user navigates the site they click a category, which uses the…
TJ Sherrill
  • 2,465
  • 7
  • 50
  • 88
0
votes
1 answer

How do I use searchlogic to search on a belongs_to association?

Contact belongs_to status_contacts I only want those Contacts where no value has been assigned. I installed the searchlogic plugin. I tried: contacts = Contact.status_contact_null And got an error. How can I get a full sense of how to use…
Satchel
  • 16,414
  • 23
  • 106
  • 192
0
votes
1 answer

Weird SearchLogic error (Rails)

My search form is triggering this. undefined method `id_like_before_type_cast' for # Here's the line from the form: <%= f.text_field :id_like %>
user94154
  • 16,176
  • 20
  • 77
  • 116