Displaying 20 results from an estimated 7000 matches similar to: "hello, is there a way to exclude duplicates of a field?"
2006 Dec 11
6
easy question, how would i search a grandparent???!
hi,
i have this in my code
Article.find_by_contents("#{searchstring} +city:#{passedincity}")
well that returns to me only articles that belong to whatever the user
selected in city.
now is it possible to search the grandparent?
for example
class country
has_many states
class states
has_many cities
belongs_to country
class city
belongs_to states
......
i would like to search
2007 Jul 31
5
Group by clause
Hi
Does acts_as_ferret support a :group clause?
For e.g any rails options like :select or :group etc? or is it that it
supports only few of such options?Like it supports :include
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070731/a74fb666/attachment.html
2007 Jul 02
8
Strange intermittent no search results problem
Hello,
First the specs:
ruby 1.8.6, rails 1.2.3, ferret 0.11.4, mongrel 1.0.1, mongrel_cluster 0.2.1
And the model''s aaf config:
# Ferret search engine
acts_as_ferret({:fields => {:name => {:boost => 10},
:summary => {:boost => 2},
:body => {:boost => 1, :store =>
:no},
2007 Jul 13
8
More sorting problems with untokenized index
I''m having problems sorting on untokenized fields. I have one field that
sorts fine, but there are others that seem to sort on a different field.
Here''s the index description:
acts_as_ferret
:remote=>true,:fields=>{:name=>{:boost=>2},:name_for_sort=>{:index =>
:untokenized},
:city=>{:boost=>2}, :city_for_sort=>{:index=>:untokenized},
2007 Feb 22
5
Combine ferret with database
Hello list,
I wonder if someone has some tips on joining a ferret search with a
database.
I have a rails project using a postgresql backend and I would like to
utilize the superb performance of ferret for fulltext searching.
The problem is that I have to joined the result with the database as
I have some user access rights to different documents to take into
account.
Does anyone have
2006 Apr 05
5
duplicate search results
i''m using Ferret 0.9.0 with acts_as_ferret (the one from svn.jkraemer.net), and
i''m getting duplicate results, as described in this thread:
http://rubyforge.org/pipermail/ferret-talk/2005-December/000048.html
is there a way to configure the indexes created by acts_as_ferret to use :key =>
:id, as described in that thread? i''ve poked around in the code, and had
2006 Dec 07
5
Search Multiple Models
Hello folks,
I have four models, each with their own separate index.
Models = Articles, Blogs, MusicTracks, and MediaFiles
I have individual searches within each section of the site working just
fine, but I want to have a gloabl search that searches across all of
them at the same time and returns the results ordered by score.
Here''s how far I am now...
def search
query =
2007 May 16
7
bilingual site: exclude fields set from query
Hi all,
Is there a way to have searches no use some indexed fields, when
processing a query?
context:
I have a model Foo that holds some information in two languages :
- text1_nl, text2_nl, text3_nl
and
- text1_en, text2_en, text3_en
Some other fields are common to both languages and indexed as well
- first_name, last_name
Depending on the visitor language choice I need to exclude the
2006 Aug 10
1
Indexing weirdness
Hi,
I''m having some problems with acts_as_ferret and indexing. I''ve got a
simple 5 column table, and a corresponding Ruby model. I loaded 9 rows
directly into the table using mysql (for live it''ll be about .5mil rows)
and configured a Rails search page along the exact same lines as
ferret_demo.
Unfortunately, search wouldn''t return any results; following
2006 Oct 10
3
Dynamic fields and inheritance
I have a model that allows subclasses to dynamically define fields.
The following code is a short test case that illustrates the problem I''m
having:
class Product < ActiveRecord::Base
acts_as_ferret :fields => [:name]
serialize :data
def self.data_properties (*properties)
properties.each do |property|
define_method(property) {self.get_property(property)}
2006 Nov 06
1
NameError uninitialized constant Ferret::Index::FieldInfos
Hi Everyone,
I''ve a RoR application. I am trying to build full text search capability
into it. I installed Ferret. After that I installed the act_as_ferret
plugin. I''ve also put the acts_as_ferret inside the <model>.rb file .
I''m using the find_by_contents to get the search results.
I''m getting the following error. I''ve no clue and I
2007 Mar 28
7
Newbie problem on production server
Hi,
I just installed ferret for the first time and integrated it with my
app. On my dev machine it''s fine but on my production server I get this
when I call find_by_contents():
Processing LinksController#results (for 24.185.105.59 at 2007-03-28
05:28:36) [POST]
Session ID: 3f2dc7c17147c0e52178ba697a119833
Parameters: {"commit"=>"Search",
2007 Apr 01
2
strange behavior after switching to DRb server
After switching to the DRb server, I am experiencing strange behavior
when sorting on score. My app was working as expected before the switch.
Both before and after the switch, my app sorts properly on other
fields, such as date.
For sorting on score, I am using the following option
find_by_contents option:
:sort => Ferret::Search::SortField::SCORE
Before switching to DRb, this worked
2007 Apr 30
1
Can''t search fields with space
Hi,
I have a user model that has a city field which is searchable using
acts_as_ferret.
But I can''t get it to return any result whether I use
:city => {:store => :no, :index => :untokenized},
or
:city => {:store => :no} in my User model''s acts_as_ferret option
>>> User.find_by_contents("city:(cal poly)")
=>
2007 Jul 04
2
problems after gem update
Hi, I had ferret working wonderfully but i am regretting doing a gem
update today.
I had alot of trouble first installing it and was really happy to have
it working. The upgrade was from 0.3.1 to 0.4.0.
The problem is;
in the rails console,
>> @results = Book.find_by_contents("peter pan")
=> #<ActsAsFerret::SearchResults:0x487040c @total_hits=0, @results=[]>
Its indexing
2006 Nov 27
2
find_conditions in acts_as_ferret find_by_contents
Hi all,
Every time I try to add options for the find_conditions argument of
find_by_contents I get the following:
a = AnnotatedLink.find_by_contents(''test'', {}, {:conditions =>
''category_id IS NOT NULL''})
>> NoMethodError: You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while
2007 Jun 15
2
indexed ''text'' (not string) column not used when searching, unless explicitely specified!!
Hi all,
I''ve included a mysql ''text'' column in my index, and aaf/Ferret
doesn''t use it when I search, UNLESS I specify it as a restrictor, and
then it only searches in that field!
For example:
=> 0 results are returned by a standard (__all__ fields ?) search
>> Entity.find_by_contents "zixi"
Query: zixi
total hits: 0, results
2007 Feb 10
2
Ferret and Paginating Find
Hey all,
I''ve been really happy with ferret thus far and all my search on my site
is based on it. One of the recent challenges I ran into is changing some
of my pagination within my site. Until now, I just used the tutorials
out there that talk about how to get pagination working with
acts_as_ferret.
Recently, I decided to change my pagination to begin using the
"Paginating
2007 May 25
1
how to update index with acts_as_ferret?
Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents("title:bob") it does return a movie
2006 Aug 25
4
using conditions
Hello guys,
I''m pretty new to using AAF and am having a slight problem with using a
condition. I have the following code
@results = SupplierProduct.find_by_contents(params[:search], :conditions
=> [''area_id = ?'', @area])
and it seems the condition isn''t being applied. Does anyone have any
pointers?
Cheers,
Alastair
--
Posted via