Questions tagged [searchlogic]

86 questions
0
votes
1 answer

Association with Searchlogic

Hi I have a post model that :has_many :reply, when using searchlogic, doing Post.reply_content_like("search"), returns a result for every reply under that post, I only want it to return once. Anyone know a way to solve this
fivetwentysix
  • 7,379
  • 9
  • 40
  • 58
0
votes
2 answers

Passing arguments to scope_procedure in searchlogic

I'd like to use searchlogic's scope_procedure feature like so class MyModelObject < ActiveRecord::Base scope_procedure :my_scope_proc, lambda { |p1, p2| { :conditions => "p1 >= #{p1} AND p2 < #{p2}" }} end Then, I am doing the search: scope =…
GregK
  • 1,653
  • 2
  • 15
  • 19
0
votes
1 answer

How do I set default search conditions with Searchlogic?

I've got a search form on this page: http://staging-checkpointtracker.aptanacloud.com/events If you select a State from the dropdown you get zero results because you didn't select one or more Event Division (checkboxes). What I want is to default…
Danger Angell
  • 349
  • 2
  • 15
0
votes
1 answer

Searchlogic cannot sort search result

Imagine a code: search = Project.search( :title_or_description_or_child_name_or_child_age_or_inspiration_or_decorating_style_or_favorite_item_or_others_like_any => keys, :galleries_id_like_any => @g, :styles_id_like_any => @st, …
jaycode
  • 2,926
  • 5
  • 35
  • 71
0
votes
1 answer

Searchlogic doesn't convert the time properly for datetime conditions

The author of Searchlogic says that it is delegated to A::R converter, but at least in our case this didn't cover the usual cases. Local time was 'interpreted' as UTC and therefore was moved by one hour (CET). How can I do that properly? I add our…
reto
  • 16,189
  • 7
  • 53
  • 67
0
votes
1 answer

Using Searchlogic with multiple models from one controller

How exactly do I use Searchlogic with multiple models? I have a dashboard that pulls data from 3 models and displays them in a grid (table) - I want to allow sorting and searching for all three of these, but Searchlogic seems to demand that I use…
Wayne Molina
  • 19,158
  • 26
  • 98
  • 163
0
votes
3 answers

Single query for all records having no key in a join table and those having a matching key

I have a trip that has many residencies. I need a single query that returns all trips where no residency information has been specified. And all trips that match a specified residency. I can get the first from this query: SELECT * FROM `trips`…
Gavin
  • 4,273
  • 3
  • 27
  • 39
0
votes
1 answer

searchlogic with checkboxes

I am using searchlogic to peform searches on my resultset. Below is my search form which contains checkboxes. <% form_for @search do |f| %>
Kim
  • 2,070
  • 5
  • 33
  • 46
0
votes
1 answer

SearchLogic + STI

Trying to implement a search logic search that uses associations with STI but I’m having a problem where it is not select the STI records as the subclass but the parent. Example: class Users end class Artist < User has many :agents, :through =>…
Gordon Isnor
  • 2,065
  • 1
  • 19
  • 32
0
votes
2 answers

searchlogic - array error

I have the following controller method def app_used_by_Lab per_id = params[:id] @search1 = Apparatus.used_by_specific_lab(per_id).search(params[:search]) # both 'used_by_specific_lab' & 'lab_created' are named_scopes which return results…
Kim
  • 2,070
  • 5
  • 33
  • 46
0
votes
3 answers

Rails/AR find where habtm does not include

I have a Rails app with Users, and each user HABTM Roles. I want to select Users without a specific role. I have searchlogic at my disposal, and I'm lost. I've tried using a combination of conditions and joins and includes and what not, but I can't…
Daniel Huckstep
  • 5,368
  • 10
  • 40
  • 56
1 2 3 4 5
6