Displaying 10 results from an estimated 10 matches for "additional_field".
Did you mean:
additional_fields
2006 Nov 17
3
acts_as_ferret + :tag_list, how to use it?
hello,
i am currently using acts_as_ferret in one of my applications and now
would like to also incorproate tags. i came across somesones blog that
had this:
//////
Having Ferret index method results (like :tag_list) worked
out-of-the-box for me with acts_as_ferret. I specified attributes (table
columns) as strings and methods as symbols, like so:
acts_as_ferret :fields => [?title?,
2006 Nov 06
21
acts_as_ferret and associations
I have the following models:
class Book < ActiveRecord::Base
acts_as_ferret
belongs_to :author
end
class Author < ActiveRecord::Base
has_many :books
end
and in the controller:
def search
if params[:query]
@query = params[:query]
@total, @books = Book.full_text_search(@query, :page =>
(params[:page]||1))
@pages =
2006 Nov 21
14
Starting from scratch
I have the following models:
===
class Person < ActiveRecord::Base
has_many :person_organisations, :dependent => true
has_many :organisations, :through => :person_organisations
has_many :person_categories, :dependent => true
has_many :categories, :through => :person_categories
end
class Category < ActiveRecord::Base
has_many :person_categories, :dependent => true
2007 Feb 01
4
Automatically Indexing Associated Models
...ot ferretable. The desired behavior
is that when a comment is added to a blog, that the comment be
ferretable.
CURRENT SETUP
Blog (id, title, body, user_id)
BlogComment (id, blog_id, comment)
class Blog < ActiveRecord::Base
has_many :blog_comments, :dependent => :destroy
acts_as_ferret :additional_fields => [:blog_comments]
def blog_comments
self.blog_comments.collect {|comment| comment.body }
end
end
class BlogComment < ActiveRecord::Base
belongs_to :blog
end
CONTROLLER
[..]
if @blog.blog_comments << comment
do_something
else
do_something
end
Can someone recommend...
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
2023 Jan 11
0
New CRAN package announcement: azlogr
...ared-key>")
library(azlogr)
# Optionally, add additional meta-data, `country` and `id`, to be collected
# while logging, on top of the default fields - 'level', 'time', 'msg'.
set_log_config(
log_fields = c("level", "time", "msg"),
additional_fields = list(country = "in", id = 123)
)
# Use logger_* functions with appropriate logging level to log.
# If POST is successful, then it will be available in custom log table on
# Azure Log Analytics, by default table name will be `log_from_r`_CL (_CL is
# added by Azure for any custom log t...
2023 Jan 11
0
New CRAN package announcement: azlogr
...ared-key>")
library(azlogr)
# Optionally, add additional meta-data, `country` and `id`, to be collected
# while logging, on top of the default fields - 'level', 'time', 'msg'.
set_log_config(
log_fields = c("level", "time", "msg"),
additional_fields = list(country = "in", id = 123)
)
# Use logger_* functions with appropriate logging level to log.
# If POST is successful, then it will be available in custom log table on
# Azure Log Analytics, by default table name will be `log_from_r`_CL (_CL is
# added by Azure for any custom log t...
2006 Nov 01
8
aaf and stop words; query parser
I''ve been trying to implement acts_as_ferret in my latest project and ran into a snag. If I do a search for ''auditor state'' then the search works perfectly. If I include a stop word, as in ''auditor of state'', then I get no results. I''d prefer not to set stop words to nil and index everything.
The solution, that I have yet to attempt, is to use
2006 Nov 28
17
Index not being updated
My index is not being updated when I add new records or amend existing
ones.
Can anyone point me in the direction of where I should be looking for
what is going wrong?
I''m running this in the production environment.
--
Posted via http://www.ruby-forum.com/.
2006 Nov 28
8
how to update index from a script
Hello all,
I''m using AAF right now to index my ~3million db records. However, any
additions to these records are added to the database through an external
script so the aaf activerecord hooks will not catch any updates. Since
new records are only added rarely, I figured I could just add the new
records manually in ferret from some type of script. I''ve been looking
at the