search for: add_fields

Displaying 20 results from an estimated 37 matches for "add_fields".

Did you mean: add_field
2007 Jan 01
2
Possible Bug when Creating Indexes
I''m running: ferret (0.10.9) ruby 1.8.5 (2006-08-25) [i386-mswin32] on Windows XP(SP2) When I create an index as follows: field_infos = FieldInfos.new(:store => :yes, :term_vector => :no, :index => :yes) field_infos.add_field(:id, :index => :untokenized) field_infos.add_field(:subject) field_infos.add_field(:author) field_infos.add_field(:tags, :store => :no) index =
2006 Dec 09
1
manipulate headers?
Hi... Here''s a working Perl script that I want to be able to do in Ruby: use WWW::Mechanize; my $url = "http://host/tt?name=chris"; my $mech = WWW::Mechanize->new(); $mech->add_header( Referer => "http://chrismcmahonsblog.blogspot.com" ); $mech->add_header( Cookie => "messageid=170118; memberid=1007"); $mech->get($url) so the header
2006 Sep 09
3
Per field analyzer
Is there a way to add per-field analyzer? I can''t seem to find a way to do that. Thanks -- Kent --- http://www.datanoise.com
2006 Sep 25
0
Odd indexing issue
Hey Dave, I just contributed $100 to the ferret donation box. My project is earning no money yet (but hopefully will), for now I hope this helps you out and covers me for asking stupid questions ;). To get a distance sorted output, I am passing an array of the id field from a ferret search through to mysql in a custom select statement. SELECT ... id IN (#{ids.join(",")}) This has
2006 Nov 23
0
Two repeatable crash bugs in Ferret proper
Hi guys! Been reading this list for a while. I have two repeatable Ferret crash bugs, both seg faults. 1. The first bug appears to seg fault Ferret when you use quotes in a search argument (eg ''file_name:"file name"'') 2. The second bug appears to seg fault Ferret when you attempt to index text with very long tokens (above 256 chars). It may have something to do with
2006 Nov 02
5
Adding fields to a form
Is there a decent way to add a field to a form before posting it? I haven''t tried using HPricot manipulations just yet, since I can''t ever find really solid docs on hpricot.... Form#[]= doesn''t work because it first searches only pre-existing fields. I''m investigating how to write a patch now. But I thought maybe someone here might have an idea.
2007 Jul 11
4
Query scoring - WTF?
Hi! I thought I understood Ferret''s query scoring and how to tweak results using boost values. What I currently experience however, leaves me completely baffled. Perhaps someone can shed some light on the scoring algorithm, because asking Ferret to "explain" the score for a particular document isn''t as informative as I thought. Actually, it confuses me even
2005 Dec 15
2
field update not happneing
Hi, I''m having some scriptaculous weirdness, hoping this is an easy fix. I have a js function defined in my header: function flash(msg){ $(''flash_msg'').value = msg; alert(msg); // for debugging ... } This is being called like so: <%= form_remote_tag( :update => ''admins'', :url => { :action =>
2006 Aug 23
4
Ferret 0.10 and Fields
Hey ... I just tried to convert my code to 0.10 .. But i''m currently not sure how to use fields.. i really like some of the new api.. its leaner and i like the fact that these strange consts are gone (like Ferret::Search::BooleanClause::Occur::MUST) .. I see that you''re now having Ferret::Index::FieldInfo to describe the fields of the index.. thats good.. and i now see that
2010 Feb 19
8
Weird gsub behaviour
ruby 1.8.6 (2007-09-24 patchlevel 111) str = ''\&123'' puts "abc".gsub("b", str) puts "abc".gsub("b", "#{str}") puts "abc".gsub("b", str.to_s) puts "abc".gsub("b", ''\&123'') puts "abc".gsub("b", "\&123") >ruby test.rb ab123c
2006 May 26
8
Comparing two documents in the index
I want to compare two documents in the index (i.e. retrieve the cosine similarity/score between two documents term-vector''s). Is this possible using the standard Ferret functionality? Thanks in advance, Jeroen Bulters -- Posted via http://www.ruby-forum.com/.
2007 Jun 12
5
index browser inconsistent with IndexReader
Hi, We have an index of around 1M web pages as part of our web app. The app uses ferret by way of RDig to perform searches. We have noticed anecdotally that some searches don''t work the way we thought they should, as if documents were missing from the index. Yesterday we came upon a concrete instance of this. Our documents have several fields, one of which is called :keywords and
2008 Jul 10
1
custom http headers in form.submit / upload without original form
Heyas :) I''m wondering how do I do to send my custom HTTP headers when posting a form. agent.set_headers is a private method and I don''t know how to get a reference to HTTPHeaders to use add_field and such. Since my request is a form, I''m sending it using agent.submit(form). Any hints? Bonus question: I would like to upload a file to a REST webservice, but I
2006 Jun 07
0
using inline insert_html to generate uniquely named elements
Hello all, I?m using some inline rjs to add content with a unique id like so: In the <head>: function add_fields() { html = ''<div id="'' + new Date().getTime() + ''">''; html += "<%= escape_javascript(render :partial => ''field_set'') -%></div>"; new Insertion.After("whatever", html); } In the body: <%= lin...
2007 Aug 03
2
can''t search for OR (as in the state)
I''m trying to search a Model by the state field using Acts As Ferret. The query for this is ''+state:NY'' (substitute state abbreviation for NY). This works find however ''+state:OR'' returns nothing, though just ''portland'' will pull up matches within that state. I''m pretty sure it''s reading OR as an or conditional
2006 Sep 22
2
Searching untokenized fields
Hi .. I tried to exclude certain objects from my search, by adding appropriate term queries .. i = Ferret::Index::Index.new i.field_infos.add_field(:type, :index => :untokenized, :term_vector => :no) i << {:type => "Movie", :name => "Indiana" } i << {:type => "Movie", :name => "Forrest" } i << {:type =>
2007 Jun 08
13
Errror on update after Model.rebuild_index
Hi I use Ferret 0.11.4 and the latest stabel version of the acts_as_ferret plugin. To the issue. if I do Model.rebuild_index and after that try to update one of my objects of that Model I get: File Not Found Error occured at <except.c>:117 in xpop_context Error occured in fs_store.c:329 - fs_open_input tried to open
2006 Sep 09
2
search_each segmentation fault and parser anomoly
The included test script turned up the following anomolies (run against Ferret 0.10.3, but had same problems with 0.10.2): 1. When the content word is not in the index the inclusion of a wildcard file term causes search_each to throw a segmentation fault. $ ./test.rb zzz file:*.txt query: +content:zzz +file:*.txt ./test.rb:28: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24)
2019 Mar 08
1
syslog / logstah problem with timestamp
Hallo, I try to send my centos 7 logfiles to an logstsah server. Can anyone give me an hint how to fix this problem? Thanks Ralf > {"index"=>{"_index"=>"%{[@metadata][comline]}-%{[@metadata][version]}", > "_type"=>"doc", "_id"=>"U1XLXGkBpfl5FoHeY4J8", "status"=>400, >
2007 Feb 16
8
term vector blues
I have a lot of crashes when I try to use term vectors. Here''s an example, which crashes pretty consistently. This problem seems to be somewhat sensitive to platform... people on other OS''s and ruby versions have reported no error. I have seen this with ferret 0.10.13 and 0.10.14 on debian stable using ruby 1.8.2, but I have observed the same problem on various other systems as