Displaying 12 results from an estimated 12 matches for "id_field".
2009 Apr 06
2
Converting Number into Integer in ruby
I am working with a legacy oracle database. The
primary key is not defined as an integer but as a number.
This results in a url with an id as a number, such as 1234.0 instead
of 1234. It works fine, but I would prefer 1234 to be displayed in
the url. I have attempted to redefine the model id method to
convert to an integer using to_i method, but no luck. Any ideas?
Thanks,
Vaibhav
--
Posted via
2006 Mar 19
3
Ferret 0.9.0-alpha (port of Apache Lucene to pure ruby)
...* changed order of args to Token.new. Now Term.new(text, start_offset,
end_offset, pos_inc=1, type="text"). NOTE: type does nothing.
* changed TermVectorOffsetInfo#start_offset to TermVectorOffsetInfo#start
* changed TermVectorOffsetInfo#end_offset to TermVectorOffsetInfo#end
* added :id_field option to Index::Index class.
2005 May 17
2
Noob - ActionView::Helpers::FormOptionsHelper::select
Hi,
I''m just starting with Rails and i''m trying to do something like this:
<%= start_form_tag :action => ''add_user'', :id => @social_event_group %>
<%= select ''user'', ''id'' , User.find_all.collect {|u| [ u.login, u.id ]
}%></p>
<%= submit_tag "Add User" %>
<%= end_form_tag %>
2007 Mar 12
5
index.rb:384 [BUG]
...le.ferret_index
=> #<Ferret::Index::Index:0x2b686dc76860 @writer=nil,
@default_input_field=:id, @qp=nil,
@dir=#<Ferret::Store::FSDirectory:0x2b686dc76748>,
@mon_entering_queue=[], @default_field=["title"], @key=:id,
@mon_count=0, @auto_flush=true, @open=true, @close_dir=true,
@id_field=:id, @mon_owner=nil, @reader=nil, @searcher=nil,
@options={:lock_retry_time=>2,
:path=>"script/../config/../config/../index/development/article",
:create_if_missing=>true, :default_field=>["title"],
:analyzer=>#<Ferret::Analysis::StandardAnalyzer:0x2b686dc75f78...
2006 Oct 10
5
oddness when adding to index -
...r=>#<Ferret::Store::RAMDirectory:0xb77dc1b8>,
:analyzer=>#<Ferret::Analysis::StandardAnalyzer:0xb77dc0c8>,
:lock_retry_time=>2}, @mon_entering_queue=[], @qp=nil, @searcher=nil,
@mon_count=0, @default_field=:*, @close_dir=true, @auto_flush=false,
@open=true, @mon_owner=nil, @id_field=:id, @reader=nil,
@mon_waiting_queue=[], @writer=nil, @default_input_field=:id,
@dir=#<Ferret::Store::RAMDirectory:0xb77dc1b8>>
*** Now let''s add 3 strings to the index ***
irb(main):005:0> ["While you were out pet care", "Eastside dog walker",
"To...
2004 Oct 04
1
Making a FXListBox open up
How would I programatically make a FXListBox pop open? I have searched
through the Fox mailing list archive, but did not find anything.
Thanks.
Jamey
Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified
2007 Jan 27
0
concurrency errors adding to a keyed index
...s to occur roughly once per batch, and usually towards the end of
the batch. I''m not using aaf. I create my keyed index like this:
@@ferret_index = Index::Index.new(:path => "#{RAILS_ROOT}/ferret_index/#{RAILS_ENV}/news_article_versions",
:field_infos => field_infos,
:id_field => :id,
:key => :id,
:default_input_field => :text)
Unkeyed, I just drop the :key option (duh). :id is just the
ActiveRecord id, from an auto_increment field in MySQL.
As a note, when concurrently searching on the keyed index, the number of
hits returned increases throughout the in...
2006 Aug 28
1
stop words and /''s
Hi new version of ferret and acts as ferret have sorted out the scary
glibc *** linked list pointer errors, thank god! New version are good
but some searches are still not working. It is mostly the stop words
ones. For example the "For Sale/Free/Swap" fails but works when "for" is
stripped out. I have read all the recent posts regarding this issue and
failed to get it to
2006 Jun 15
3
best updating method
Hi All,
I have a Ferret index containing some cached RSS feeds.
I have a nightly cron script to cache the feeds, and I''d like to update
the index with the latest feeds.
I see the Index class has an update method, but I can''t work out how to
get the id of the relevant document to pass in.
Lets say I have a file called "google_news.xml"
I want to go:
2007 Mar 04
2
Need clarification of documentation
Hi, I have question about the delete() method docs.
I am re-indexing data on the fly so I would like to delete any existing
indexed data for a particular resource before re-indexing it using
index.delete(id).
The delete() method api doc says:
"Delete the document referenced by the document number id if id is an
integer or all of the documents which have the term id if id is a term..
id:
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
2007 May 10
5
Segmentation fault on large index
...t;Ferret::Store::FSDirectory:0xb7b23308>,
:path=>"/tmp/myindex", :lock_retry_time=>2,
:analyzer=>#<Ferret::Analysis::StandardAnalyzer:0xb7b23268>,
:default_field=>:*}, @mon_owner=nil, @auto_flush=false, @open=true,
@dir=#<Ferret::Store::FSDirectory:0xb7b23308>, @id_field=:id,
@searcher=nil, @mon_waiting_queue=[], @reader=nil, @key=nil,
@close_dir=true>
irb(main):004:0> index.search_each("*:foo") {|id, score| doc =
index[id].load; puts doc.inspect}
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:411:
[BUG] Segmentation fault
ruby...