similar to: adding a custom filter to the query

Displaying 20 results from an estimated 800 matches similar to: "adding a custom filter to the query"

2006 Jul 10
11
Category Number Results returned
I am looking to have a number of categories populated from my results of a search. For example, searching on "sport" would display all results for sport. I want to also have a number of categories to refine the documents down. So by clicking on the "Fishing" category or the "Shooting" category, I would only see the results on sport around that category. Now for
2006 Sep 07
7
counting occurences of words in the result set
Hello, I need to be able to count the occurences of certain terms in the reults. Currently my setup is Ferret 0.10.1 aaf bleeding edge. results = VoObject.find_by_contents(query,:offset=>page, :limit=> 20,:sort => sort_fields) I use results.total_hits for pagination. This all works really nicely. However i need to be able to know how many occurences of certain predefined terms occur
2006 Sep 05
4
Ferret 0.10.2 - Index#search_each() and :num_docs
Hi, I seem to be having trouble getting more than 10 hits from Index#search_each since upgrading to 0.10.2 (ie, this was working in 0.9.4). Maybe a bug, as the #search_each doesn''t seem to use the options parameter any more ? Thanks, Neville =========================================== require ''rubygems'' require ''ferret'' p Ferret::VERSION idx =
2007 Mar 21
4
Cannot delete for id of type Array
Hello list, I have a little weird error when deleting documents from the index. I''m using the following code. ferret_index = Ferret::Index::Index.new(:path => FERRET_INDEX_PATH) query = Ferret::Search::TermQuery.new(:fk_file_id, "#{_fk_file_id}") ferret_index.search_each(query) do | id | ferret_index.delete(id) end And I get the following error Cannot delete for id of
2005 Nov 26
3
Get number of found documents
Hi David again. I would say that Ferret works great with Rails. And now I am trying to create pagination. Because site could have millions of documents I need to create on page link something like "Page #100". Rather usual situation. But to create this links I need to know how many documents Ferret found in index. For now I am doing it with following code index =
2006 Sep 26
3
concurrency / #search_each problem / segfault
Hello everyone, I was stress-testing my application (running on Rails via FastCGI) by letting two concurrent users (not human .. an app called ''siege'') a) save an Article and b) search for all Articles. I am searching via Article.ferret_index.search_each( ..) do |doc_id,score| doc = index[doc_id] .. end and writing via Article.ferret_index <<
2006 May 01
12
pagination in acts_as_ferret
I''m just wondering where I would put the pagination for search results when using "acts_as_ferret". At the moment my search code is.. def search @query = params[:query] || '''' unless @query.blank? @results = Tutorial.find_by_contents @query end end Cheers SchmakO -- Posted via http://www.ruby-forum.com/.
2006 Jun 22
3
Partition results based on field
Hello all I''m using Ferret for a site wide search where I have several kinds of (similar) objects in a central index (using a "type" field containing the class name). This works great, and I can search all objects with one query. What I''d like to do now is to limit the results so that there will be a maximum of 10 (or 5 or whatever) results for each type.. I
2005 Dec 02
4
How to get the count of matching documents
I''m trying to generate a rails pagination helper for some ferret search results, and I need to know how many total matches there are to my search query. I don''t see an obvious way of finding this. Any help would be appreciated. Thanks, Carl Youngblood
2007 Apr 13
5
undefined method `ferret_index'' for xxx:Class
Hi I am trying to use ferret; the regular search works; but when I use the find_storage_by_contents to highlight the results, I am getting the above error. Please help thanks -- Posted via http://www.ruby-forum.com/.
2006 Mar 01
2
Sorting the Result
The document describes search(query, options) sort: An array of SortFields describing how to sort the results. I have created index with two fields: ''file'' and ''content'' When I give SortField name as ''file'' while searching, it results into error. The exact command given by me: index.search_each("sleepless AND dreams", :num_docs
2006 Sep 03
9
using highlight from aaf
Hi, I''m trying to use highlight ferret method with trunk aaf and 0.10.1 ferret. In my search display I use: Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id, :content) * searcher is a protected method; how can I access to the searcher from aaf ? * is the doc id in aaf the same as my model id ? * is the first param, query, the string query or the query object ?
2006 May 26
1
Could not get all matched docs
Hi, I used Ferret to build an index and try to search here. But it looks like it always return only 10 matches results, event the return number of search_each is more than 10. Did I do something wrong? ------------------ n = index.search_each("ruby") do |doc, score| puts index[doc][''file''] end print n ------------------ I can only see 10 lines'' output.
2006 Jan 10
1
search_each returns partial results?
Hi, I''m having some trouble with ferret search_each. I''m posting rails'' script/console output, so I guess you can decrypt it: >> res = [] => [] >> index.search_each(''name: a*'') do |doc, score| ?> res << doc >> end => 50 >> res.size => 10 >> I''m guessing the ''=>50''
2006 Jul 12
5
Reverse sorting
I am getting strange results when I reverse sort a query. I am sorting by date, but it doesn''t seem to be related to dates (I have tried just integers). I also paginate the results. Items in the result set are sometimes duplicated and the not ordered at all. When I try a non-reverse sort I don''t see duplicates and the ordering is correct. Any ideas what is going on? Thanks
2006 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an instance of SearchResults, but I see this error when I try to use the results. undefined method `total_hits'' for []:Array Here is the link to the documentation: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010 But here is the actual code: result =
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks, I''ve working and playing with acts_as_ferret and follow this fantastic tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial When I try to implement the field storage tip, it crash. So, I try to make it via script/console: 1. I have a simple model called Articles: class Article < ActiveRecord::Base acts_as_ferret :fields =>
2006 Apr 21
3
Sorting Search results
I tried sorting the search results in Ferret::Index::Index#search and what I found was that the sort is applied not to the whole search but to the returned results. Suppose I have these results: Text - Num foo - 2 bar - 3 far - 4 boo - 1 If I limit the search to the first two and sort by num I get: foo - 2 bar - 3 while I think the natural behaviour would be: boo - 1 foo - 2 Is this
2006 Aug 04
1
incorrect checksum for freed object?
I''m using ferret (0.9.4) in rails, but outside of the "acts_as_ferret" plugin. Whenever I use a QueryFilter (even a very simple one), the server will crash after one, two, or three reloads of a page (same page, same query, same filter). It''s very non-deterministic and I can''t seem to reproduce it outside of my application environment (I can''t get it
2007 Jul 03
4
problems with acts_as_ferret
Hi, I have i am trying to add a search feature to a ruby on rails blog, so ive decided to use ferret. So far i have had quite a few problems with it, from following a few tutorials i didnt really understand... i am at the point where i can make a search and it returns the score of the result. I want it to also show the title of the post and i think i have implemented it correctly but it