similar to: How to get the count of matching documents

Displaying 20 results from an estimated 1000 matches similar to: "How to get the count of matching documents"

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 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 =
2006 Sep 06
9
Which analyzer to use
Lucene''s standard analyzer splits words separater with underscores. Ferret doesn''t do this. For example, if I create an index with only document ''test_case'' and search for ''case'' it doesn''t find anything. Lucene on the other hand finds it. The same story goes for words separated by colons. Which analyzer should I use to emulate
2006 Jan 02
11
aligning Ferret''s IndexSearcher.search API with Lucene''s
Recently I''ve been revisiting some of my search code. With a greater understanding of how Java Lucene implements its search methods, I realized that one level of abstraction is not present in the Ferret classes/methods. Here are the relevant method signatures: Ferret''s search methods: in Ferret::Index::Index: search(query, options = {}) -> returns a TopDocs
2006 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current trunk), so I decided to test with the current version of ferret to see if I encountered the same problem. I did. Here are the details: installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret'' (btw, same results on OSX) opened up an irb session: irb(main):001:0> require
2007 May 03
1
Numeric Range or comparision doesn''t work
Hi, it looks like Ferret still compares numeric fields by lexical ordering, not numerical ordering. I am using Ferret 0.11.4(I tried in both linux and windows, the results are the same). index = Ferret::Index::Index.new() docs = [ {:num => 1, :data => "yes"}, {:num => 1, :data => "no"}, {:num => 10, :data => "yes"}, {:num => 10, :data
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 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 Apr 28
6
Determine how many documents a term occurs in
Is there a fast way to determine how many documents a term occurs in, besides iterating through every document with TermDocEnum? -- Best regards, Stian Gryt?yr
2006 Sep 23
8
svn problems
I can consistently segfault the 0.10.4 gem, so I''m trying to get the subversion version working with hopes towards tracking the problem down. I have a fresh SVN checkout but: a) the version (in ferret.rb) claims to be 0.9.6; and b) Ferret::Index::FieldInfos and a couple other classes are missing at run time. It looks like this is because they''re not exported in the C
2005 Dec 14
5
Query question
I have an index in which I want different records to be accessible to different users. I think I can do this by adding a "users" field to each record in the index and narrow down my queries to only those records matching the current user''s userid. I have the userids separated by commas. What would be the right way to query for a certain user? I have to make sure that I
2005 Dec 02
8
Ferret 0.3.0 released
Hi folks, This latest release of Ferret has a lot of improvements. There have been substantial improvements to performance. Try it for yourself to see. I won''t be publishing any numbers just yet. I will say though that it''s still about 2-4 times slower than Lucene with the extension installed. There is also some performance improvements in the pure Ruby version if you
2008 Jan 09
5
Parallel indexing doesn''t work?
Hi, I''m trying to get parallelized ferret indexing working for my AAF indices, based on the example in the O''Reilly Ferret shortcut. However, the resulting indices after merging seem to have no actual documents. I went and made minimal changes to the example in the Ferret shortcut pdf, and indeed can''t get that to work either. I''d appreciate any help
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 05
15
ferret finds ''tests'' but not ''test''
Hello all, Quick question (possibly!) - I''ve got a few records indexed and doing a search for ''test'' reports in no hits even though I know the word ''tests'' exists in the indexed field. Doing a search for ''tests'' produces a result. I would have thought that ''test'' would match ''tests'' but no such
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
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 Nov 25
5
Metaphone analysis
Not sure how much this will interest people but I don''t have a blog so I''m posting something I threw together today cause I think it might be useful. In what little free time I have I''ve been wanting to put together a Rails/Ferret based restful dictionary. So I finally got a chance to get started today so the first thing I wanted to do was implement a metaphone
2005 Dec 14
4
Is it possible to highlight search keywords in results?
I''m wondering if ferret has any built-in search/replace mechanism that I might be able to use to highlight the query data in each search result. The reason I think this would be a good idea is that I could end up having to practically duplicate the ferret query parser just to interpret the query so that I can figure out how to highlight the keywords in the search results. Just in case
2005 Dec 14
2
undefined method `add'' for Ferret::Search::BooleanQuery
Up to now in my ferret development I have been using simple single-word strings as my search queries. I just now am trying to increase the complexity of my queries. When I was passing a single word with no spaces in my index searches, like so: count = index.search_each(''testing'') do |d, s| ... end everything worked fine. But now when I do something like this: count =