similar to: Ferret 0.10.2 - Index#search_each() and :num_docs

Displaying 20 results from an estimated 1000 matches similar to: "Ferret 0.10.2 - Index#search_each() and :num_docs"

2006 Aug 28
12
Help with Multiple Readers, 1 Writer scenario
Hi, I''m building a web server application using Ferret [thanks so much Dave], Mongrel and Camping which works fine servicing one request at a time, but serialises searches if more than one request arrives, so I''d like some advice please about the best way to use multiple readers and one writer. Some background ... query requests which in my case are always read only, arrive via
2006 Sep 04
7
0.10.2 release with win32 gem
Hey all, I''ve just released Ferret version 0.10.2. It is mostly just a bug fix release. The only change is that a highlight method has been added to Ferret::Index::Index. Please try it out and let me know what you think. The big news for this release is that there is also a binary win32 gem included. This is the first time I''ve build a gem like this so please let me know if
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 =
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
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 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 Jul 14
18
adding a custom filter to the query
Hi all, I''m trying to figure out how to add a filter into a search. I''ve created the filter, basically copying the location filter from http://blog.tourb.us/archives/ferret-and-location-based-searches. But when I try to call Index.search and pass the filter in a hash with the key :filter, I get back that it is expecting type Data, and so I''m at a loss to figure out
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
2006 Sep 14
2
Possiible Bug ? indexWriter#doc_count countsdeleted docs after #commit
Hi David, > Deleted documents don''t get deleted until commit is called Ok, but FYI, my experiments show that #commit doesn''t affect #doc_count, even across ruby sessions. On a different note, I''d like to request a variation of #add_document which returns the doc_id of the document added, as opposed to self. I''m trying to track down an issue with a large
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 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 Jun 15
10
Finding out all terms from search results. How?
Hi everybody, I need to find out all terms (field values) from one of the fields from a set of documents returned by search. In other words, I have indexed documents with two fields. I do search on one field and then want to know all other field''s values from fount documents. How? -- Sergei Serdyuk Red Leaf Software LLC web: http://redleafsoft.com -- Posted via
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 Sep 14
1
Possiible Bug ? indexWriter#doc_count counts deleted docs after #commit
I''m playing with "updating" docs in my index, and I think I''ve found bug with IndexWriter counting deleted docs. Script and output follow: ===== require ''rubygems'' require ''ferret'' p Ferret::VERSION @doc = {:id => ''44'', :name => ''fred'', :email => ''abc at
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 =
2006 Aug 24
4
[0.10.0] Index#search_each options ignored
Hi Dave, The options hash is not used in search_each() method. -- Posted via http://www.ruby-forum.com/.
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 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 <<
2004 Nov 16
2
Please add secure NNTP to action.AllowNNTP
Hi, I just noticed that the file action.AllowNNTP only supports normal NNTP sessions (port 119). Could you please add support for secure NNTP (port 563), analogous to the file action.AllowIMAP? The extra line should look like this: ACCEPT - - tcp 563 I''m running Shorewall-2.0.4 by the way. Thanks, Toon. -- "Debugging is twice as hard as writing