Displaying 20 results from an estimated 21 matches for "full_text_search".
2007 Mar 31
3
Sorting issues, can anyone help me?
...return self.blog.rank_links.to_i
rescue
return nil
end
end
def posted_at_sort
begin
return self.posted_at.to_i
rescue
return nil
end
end
end
But when I try to sort by :rank_sort or :posted_at_sort it didn''t work,
see:
>> h,r = Post.full_text_search("voltamos", {:sort => Ferret::Search::SortField.new(:rank_sort, :reverse => false)} )[1].first.posted_at_sort
=> [1146857920]
>> h,r = Post.full_text_search("voltamos", {:sort => Ferret::Search::SortField.new(:rank_sort, :reverse => false)} )[1].last.posted_...
2007 Jul 18
5
Strange search result with conditions in find_by_contents
...Range].nil? && params[:dateRange] != ""
@conditions += " and creationDate >= " + params[:dateRange]
end
if !params[:forumID].nil? && params[:forumID] != ""
@conditions += " and forum_id = " + params[:forumID]
end
# @total, @topics = Topic.full_text_search(params[:searchTerms], :page
=> (params[:page]||1))
@total, @topics = Topic.full_text_search(params[:searchTerms], {:page =>
(params[:page]||1)}, {:conditions => @conditions})
@pages = pages_for(@total)
end
end
end
in my model Topic:
def self.full_text_search(q, options = {}, find_options =...
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
...Topic:
acts_as_ferret({ :fields => {:username => {:store => :yes, :boost =>
30}, :subject => {:store => :yes, :boost => 20}, :body => {:store =>
:yes, :boost => 10}}, :remote => true }, { :analyzer =>
Ferret::Analysis::RegExpAnalyzer.new(/./, false) })
def self.full_text_search(q, options = {}, find_options = {})
return nil if q.nil? or q==""
default_options = {:limit => 10, :page => 1}
options = default_options.merge options
# get the offset based on what page we''re on
options[:offset] = options[:limit] * (options.delete(:page).to...
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 04
2
problems after gem update
...ontents''
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/class_methods.rb:128:in
`find_records_lazy_or_not''
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.0/lib/class_methods.rb:54:in
`find_by_contents''
#{RAILS_ROOT}/app/models/book.rb:100:in `full_text_search''
#{RAILS_ROOT}/app/controllers/search_controller.rb:12:in `search''
Help very much appreciated)
--
Posted via http://www.ruby-forum.com/.
2007 Mar 03
6
Problem with ferret :(
hi, i''m trying ferret and acts_as_ferret, it''s good, but i''ve a little
problem. i''ve a model book which has a title and a quantity, how can i
search using act_as_ferret all books which quantity is > 0 ? and howand
with a search like "book", how can i found also title like "books" ? and
the last, if i search "bok", is it possible
2019 Dec 15
1
Solr commit and optimize: which user?
...ith dovecot, and need to do the commit and
optimize recommended here:
https://wiki.dovecot.org/Plugins/FTS/Solr
Should this run as root, or as each mail user. The documentation above
implies, but doesn't state,
that it is root. The docs here are similar:
http://grimore.org/networking/dovecot/full_text_search
But the docs here say it has to be done for each user:
http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/
I don't know Solr well enough to answer. Which is correct?
Thanks
John
2007 Apr 10
3
MultiSearch and ActionView Questions
...Question #1:
How should I be setting up my form helper?
>> Jens'' Response:
>> There''s nothing special to do here - just use a normal text_field.
>> I usually have a separate Search model class to back my search
forms.
Question #2:
Rather than defining self.full_text_search on each of my 12 models, I
am hoping for a cleaner solution, perhaps a module that I can mixin
somehow. Also I am pondering the idea of having a separate
SearchController so that my search methods are in one place as well.
Do you have any guides/suggestions for handling multiple models in a...
2007 Mar 06
9
bug or "feature"?
...itle => {},
:category_id => {},
:bought_at_int => {:index =>
:untokenized_omit_norms, :term_vector => :no},
:gift => {:index =>
:untokenized_omit_norms, :term_vector => :no}}
def self.full_text_search(query, category_id)
return nil if query.nil? or (query == '''')
query += " +category_id:{category_id}
+bought_at_int:>#{Time.now.to_i} +gift:false"
sort = Ferret::Search::SortField.new(:bought_at_int, :type =>
:byte, :reverse => false)
self.fin...
2007 Jan 13
5
Problems using acts_as_ferret
Hi all,
I''m trying to use acts_as_ferret and have run into a brick wall.
My model is Page
My controller is Pages_controller.
When in console, I can search for contents, and find results. For
example, when I search for "spam" it "finds" 7 results.
=> #<FerretMixin::Acts::ARFerret::SearchResults:0x2693934
@total_hits=7, @results=[]>
you can do a
2006 Nov 20
22
Index only partially built
I have an application which I''m running using Mongrel and Apache as
described here http://www.napcs.com/howto/rails/deploy/.
I have a model Person which I am attempting to use acts_as_ferret with.
When I first try to do a search the index begins to get built but it its
fails halfway through with the following error in the browser:
===
Proxy Error
The proxy server received an invalid
2007 Feb 04
10
[AAF] remote indexing via DRb with acts_as_ferret
Hi!
Aaf trunk has undergone several major refactorings the last days, with
the result that you can now transparently switch your app from local
to remote indexing and back :-)
If you plan to scale your app to more than one physical machine, or
if you have problems with corrupted indexes and the like under high
load, you really should give this a try.
I wrote some documentation to get you
2007 May 11
1
Memory leak Windows XP SP2 related to search involving 'ä'
...ret-0.11.4
Right now I am still running everything in WEBrick
I set up my system according to this:
http://www.dockblog.de/2007/04/01/rubyrails-setup-in-unicode-utf8-with-ferret-search-mysql-under-debian-etch-with-apache2/
(as far as I could since I am not running Linux and Apache2)
When doing a full_text_search that involves a word with an ''?'', the
ruby.exe process goes nuts and keeps eating up memory until the system
crashes (or I kill the process). Interestingly, this does not happen for
any other Umlaut.
I am guessing that the problem may have something to do with the locale
of Windo...
2007 Apr 09
0
Search Results
I just started using acts_as_ferret and so far things are looking pretty
sweet.
I''m trying to write the view code for my results page. My controller
methods looks like this
def search
@query=params[:query]
@total, @terms = Term.full_text_search(@query, :page =>
(params[:page]||1))
@pages = pages_for(@total)
end
Not sure how to proceed. Any ideas?
--
Posted via http://www.ruby-forum.com/.
2007 Mar 21
2
store_class_name for Comatose:Page model
.../plugins/acts_as_ferret/lib/class_methods.rb:457:in
`id_multi_search''
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:437:in
`multi_search''
#{RAILS_ROOT}/app/controllers/application.rb:44:in `run_search''
#{RAILS_ROOT}/app/controllers/application.rb:68:in `full_text_search''
#{RAILS_ROOT}/app/controllers/search_controller.rb:16:in `index''
-e:4:in `load''
-e:4
The ferret index files include the name Comatose::Page and are put in
index/developement/comatose/page directory.
Any idea why I might get that error?
I dont get it with results = Coma...
2006 Dec 28
13
Sorting/Ordering Search Results
...om April
regarding this same issue (http://www.ruby-forum.com/topic/62993#66934)
where the issue was claimed to be resolved - so I figure I''m doing
something wrong - but I just can''t figure it out. Any help anyone can
give would be appreciated. Thanks!
Member.rb (model)
def self.full_text_search(q, options = {}, find_options = {})
return nil if q.nil? or q == ""
default_options = {:limit => 10, :page => 1}
options = default_options.merge options
options[:offset] = options[:limit] * (options.delete(:page).to_i-1)
results = Member.find_by_contents(q, options, find...
2007 Apr 18
1
stack level too deep for method missing when using drb
...s_methods.rb:134:in
`ar_find_by_contents''
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:128:in
`find_records_lazy_or_not''
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:54:in
`find_by_contents''
#{RAILS_ROOT}/app/models/video.rb:257:in `full_text_search''
I''m using AAF from
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret
and the ferret 0.11.4 gem. Rails 1.2.3. Any ideas?
Pat
--
Posted via http://www.ruby-forum.com/.
2007 Apr 12
19
Multiple Model Search
[from out-of-band communication with steven, just for the record]
Hi!
On Wed, Apr 11, 2007 at 01:47:49PM +0200, Steven Garcia wrote:
> Hey Jens,
>
[..]
>
> 1. Is the Search model just an Active Record object or do I need to
> set up a database for it as well (if so then with what columns)?
No, that search model is just a plain class that backs your search form.
If you want to
2006 Dec 01
2
Ferret on Apache Installation
....10.13/lib/ferret/index.rb:366:in
`search_each''
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:384:in
`find_id_by_contents''
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:248:in
`find_by_contents''
#{RAILS_ROOT}/app/models/event.rb:6:in `full_text_search''
#{RAILS_ROOT}/app/controllers/page_controller.rb:140:in `search''
This error occured while loading the following files:
ferret/index/lock_error.rb
--
Posted via http://www.ruby-forum.com/.
2007 Sep 07
4
Ferret DRB - can add/edit index, but can''t search
...s/acts_as_ferret/lib/class_methods.rb:176:in
`ar_find_by_contents''
/vendor/plugins/acts_as_ferret/lib/class_methods.rb:170:in
`find_records_lazy_or_not''
/vendor/plugins/acts_as_ferret/lib/class_methods.rb:86:in
`find_by_contents''
/app/models/article.rb:104:in `full_text_search''
/app/controllers/search_controller.rb:93:in `index''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in
`perform_action_without_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in
`cal...