Displaying 20 results from an estimated 100000 matches similar to: "Grouping results."
2007 Nov 20
5
Compound search / grouping
Hi,
Following problem:
We have a tree structure with children and a root element (recursivly)
stored in one table (imagine a threaded forum).
Each of the children has a title which should be indexed by ferret.
Now we want to make a search that returns only the root and searches all
items.
So if one node has "expensive" and nother node has "car" I want to enter
2006 Jan 27
2
Grouping results
I have a general question about using a Ferret/Lucene index for
grouping results. I am not sure how much of the heavy lifting the
index can do for me, so I would appreciate any input. I am using
ferret to index some objects that have the following properties:
url, image_url, price, tags (space separated tags), created_at
I would like search the index for any documents that match a specific
2006 Aug 02
4
Linking to the paginated items from search results.
Using Ferret for searching, I''ve got results that I need to link to.
Which is fine, except for that they''re displayed on paginated pages
using Rails paginate function - so it''s not like I can''t get it from the
database or anything else. Anyone have any ideas on how to go about
this? It''s not so much a coding problem as a theory problem, and I
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
I started using robotcoop''s CachedModel class in my project but have encountered problems when using it with the acts_as_ferret plugin. It seems it doesn''t index everything in my STI model, also if I do a search from my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information
2006 Jul 06
1
querying returned results
Hi I''m using the acts_as_ferret to index one table in my database. The
table contains formation about listed items and each of these items
belongs to a section and a category. On the results page I want to have
two drop down boxes whose contents are populated depeneding on the
returned results. So for example the section drop down should only show
sections that exist in the result set,
2007 Jan 02
4
Inconsistant Search Results
Hi,
I have this maddening strange bug using acts_as_ferret. If I search for
a given phrase (let''s say "xyz") I get one set of results (lets call
them set A). I search for xyz again and I get set A again. I search for
xyz a third time and I get a different set (set B).
I can keep executing the search query and my result sets continue to
cycle a-a-b-a-a-b-a-a-b.
It''s
2009 Mar 18
0
Acts_as_ferret: Slow ferret_update with associated models
Hi,
I am using some custom fields for ferret indexing to include fields from
associated models. When those child models are updated, I do
ferret_update
on the parent model. Unfortunately, that takes very long, depending on
the
number of associated child models. That is because every child model is
called to re-index the parent, instead of just the changed one.
What can I do to speed up
2006 Aug 01
0
persisting tree navigation
I have built a tree navigation for pages I have in a site, that loads
the content of each page into FCK editor. The parent nodes are shown at
the beginning, and the child nodes are in display:none hidden divs that
are toggled with scriptaculous bindup and binddown. If the user clicks
on one of the children, I want that div to remain visible on page
refresh. I''m pretty new with app
2006 Aug 25
7
disabling automatic indexing in acts_as_ferret
I''d like to be able to enable/disable the automatic indexing of
documents acts_as_ferret does. Something like MyModel.disable_indexing
MyModel.enable_indexing would be perfect. I need this because I do some
indexing that requires visiting the parents of the model objects and my
import method imports the children first, so the information isn''t there
yet. I''d like to
2007 May 02
1
MultiSearcher Results Question
If searching multiple indexes with a single searcher is there anyway to
identify which index a resulting doc is stored in?
i1 = Ferret::I.new
i2 = Ferret::I.new
i1 << {:id=>1,:text=>"random stuff"}
i1.commit
reader =
Ferret::Index::IndexReader.new([i1.options[:dir],i2.options[:dir]])
searcher = Ferret::Index::IndexSearcher.new(reader)
query =
2006 Oct 10
2
Ferret returning too many results
Hi, I just upgraded from acts_as_ferret 0.2/Ferret 0.9.x to
acts_as_ferret 0.3/ferret .10.9, and i''m getting a strange behavior:
searches are returning far too many results, most of them superflous.
i''ll paste in my code below, it''s pretty simple. i''m googling like mad,
and going through both the source and the forums, and having trouble
finding what could
2005 Dec 03
3
How to avoid duplicate search results
I seem to be getting the same document multiple times in my search
results. I''m wondering if this is because by default a document is
placed in the search results every time the word you''re looking for
shows up. Is that the way it works?
Thanks,
Carl
2006 Jun 25
3
Sorting results by column
I have the acts_as_ferret plugin installed. Everything searches great,
but I would like to limit the results (i.e. by ''end_date'') and sort them
(by ''end_date''). ''end_date'' is a valid column in my "posts" table.
Here''s the code I have already:
@posts = Post.find_by_contents(params[:query])
params[:query] comes from a
2006 Mar 09
1
Missing fields in search result
Hello ferret users,
I have a problem with ferret dropping stored fields in the index.
Not all fields I want to store get stored, so they can be searched, but
can''t be retrieved in a search.
Index creation:
INDEX = Index::Index.new(:path => ''/home/gregor/wisa/index'',
:analyzer => Analysis::WhiteSpaceAnalyzer.new)
SR =
2006 Jul 03
3
Ferret not returning the right results
I have ferret setup in my model with multiple fields, but when I do a
search on the value that might be stored in two fields, I get no
results.
Here''s an example:
"Jim 12333"
Where Jim is a name field, and 12333 is a zip code. I have this in my
model:
acts_as_ferret :fields => [ ''name'', ''zip'' ]
I''m not sure
2007 Jan 05
3
Confused about Search Results
Hi everyone,
I''m pretty new to Lucene and Ferret, so I feel that this is most likely
myself not completely understanding the correct way to do this. I haved
indexed ~2200 text files (of various sizes), and I am now running
searches on the index to get a feel for Lucene and Ferret.
In my first program, which is using Lucene I search for ''influenza'' and
get the
2007 Jul 19
1
Acts_As_Ferret only returns results when searching for "*"
Hey, I''m probably just missing something really obvious but I''ve been
stuck on this problem for a while now and I''m not getting anywhere.
I have installed the acts_as_ferret gem, as well as ferret according to
the tutorial on RailsEnvy. My model, controller, and environment.rb
files have all been modified as per that turotial. However any attempts
to use the
2006 Jun 13
4
When saving parent fails, children will still be updated
Hi all,
When submitting a master/detail form I first want to handle the children
before saving the parent.
There are has_many and belongs_to relations between the parent and the
children, so I can edit the children using (psuedo-)code like:
child.destroy for deleting, child.update_attributes for updating and
@parent.children.push(child) for adding child-records.
I update the parent by using:
2006 Sep 29
4
limit results to specific IDs
How would you go about searching only a specific set of IDs in
acts_as_ferret? Should I just create a huge "or" query or is there a
more stylish way?
Thanks,
Winton
--
Posted via http://www.ruby-forum.com/.
2006 Feb 23
3
has_many: inserting children when inserting parent
disclaimer: am in the midst of my first ruby/rails project
I have a situation where I want several child records to be created when
a new parent record is created. The following represents my first stab
at coding it, am I on the right track?
Here is the model:
parents
----------
id
name
children
----------
id
parent_id
name
class Parent < ActiveRecord::Base
has_many: children
end