Displaying 20 results from an estimated 56 matches for "ferret_index".
2007 Mar 21
4
Cannot delete for id of type Array
Hello list,
I have a little weird error when deleting documents from the index.
I''m using the following code.
ferret_index = Ferret::Index::Index.new(:path => FERRET_INDEX_PATH)
query = Ferret::Search::TermQuery.new(:fk_file_id, "#{_fk_file_id}")
ferret_index.search_each(query) do | id |
ferret_index.delete(id)
end
And I get the following error
Cannot delete for id of type Array
As I see it the only wa...
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 Sep 26
3
concurrency / #search_each problem / segfault
Hello everyone,
I was stress-testing my application (running on Rails via FastCGI) by
letting two concurrent users (not human .. an app called ''siege'')
a) save an Article and b) search for all Articles.
I am searching via
Article.ferret_index.search_each( ..) do |doc_id,score|
doc = index[doc_id]
..
end
and writing via
Article.ferret_index << self.to_doc
where Article.ferret_index is implemented as in ''act_as_ferret'':
@@ferret_index = nil
def Article::ferret_index
@@ferret_index ||= Ferr...
2006 Sep 03
9
using highlight from aaf
Hi,
I''m trying to use highlight ferret method with trunk aaf and 0.10.1
ferret.
In my search display I use:
Myindexedclass.ferret_index.searcher.highlight(@query, result_line.id,
:content)
* searcher is a protected method; how can I access to the searcher from
aaf ?
* is the doc id in aaf the same as my model id ?
* is the first param, query, the string query or the query object ?
Jean-Christophe Michel
--
symetrie.com
Better...
2007 Jun 16
2
more specific queries via IndexReader
We would like to show a list of "most recently added terms", meaning,
the results of this query:
Resource.aaf_index.ferret_index.reader.terms(:summary)
BUT, only returning terms from a certain set of documents (in our
case, we are going to filter by creation data).
Is this possible?
Thanks,
John
2007 Mar 09
5
higlighting problem
Hi,
I''ve been having a problem getting highlighting to work with aaf.
I have a class defined as follows such:
class Link < ActiveRecord::Base
acts_as_ferret :fields => { :description => { :store => :yes } }
end
I get back the correct results when I do Link.find_by_contents, however,
I''d like to highlight them.
If I do something like iterate through the list of
2006 Jun 30
4
Substantial problems with write locking (and other flux)
...for
ActiveRecord working.
First the get_field_names disappears (now back), then I am collectig
some major trouble with locking. Same thing here:
exception 6 not handled: Could not obtain write lock when trying to
write index
A snippet like this just deadlocks retrying endlessly:
begin
@ferret_index << doc
@ferret_index.flush()
@ferret_index.close()
rescue Exception => e # No, he couldn''t define a proper class for this
if e.to_s.include?(''Could not obtain write lock'')
reopen_index # opens the index again!
retry
else
rais...
2007 Oct 03
3
The ferret logs
...deployment issue, where an old instance of ferret
drb was running. I don''t understand the details quite yet, but the
result was the the old ferret was never shutdown during redeployment,
and attempts were made to start up a new one.
Anywho, I stumbled acroess the ferret_server.log and ferret_index.log,
is it correctly understood, that ferret_server.log is basically the drb
server output, while ferret_index.log is the index manager output?
A bonus question, what''s the best way to determine that your application
(using acts_as_ferret) is currently running against the drb server
r...
2007 Sep 24
2
ferret fuzzy matches
Hi guys,
Is there some way of getting ferret matches string, when i do a fuzzy
search?
The scenario is this:
1. The user search for ''show''
2. Nothing was found
3. So I do a fuzzy search, passing ''show~''
4. It gives me somes results, most of all was matched with ''showcase''
5. So I want to tell the user that: Nothing was found with
2007 Jun 07
5
Advise on slowness in bootstrapping?
I am looking at trying to use ferret/aaf to supplement my querying against a
medium and large table with lots of columns. Some facts first:
Ferret 0.11.4
AAF 0.4.0
Ruby 1.8.6
Rails 1.2.3
Medium table:
105,464 rows
168 columns (mostly varchar(20))
11 actual columns indexed in aaf plus
40 virtual columns indexed in aaf (virtual is concat of two physical columns.
e.g. cast_first_name_1 +
2006 Sep 20
3
Range searches some times they work, some times not...
...then
retrieve the associated x y coordinates in metres from the db. Then i
get two temp x''s and y''s and search for all results that are within the
box, see code below.
Problems start to occur when i search on big distances so for example
40 miles from "G1"
VoObject.ferret_index.search(" x:[206826 335573] AND y:[590526
719273]").total_hits
=> 165
300 miles
VoObject.ferret_index.search("y:[172098 1137702]").total_hits
Ferret::QueryParser::QueryParseException: Error occured in q_range.c:121
- range_new
Upper bound must be greater than lower...
2006 Jul 14
18
adding a custom filter to the query
Hi all,
I''m trying to figure out how to add a filter into a search. I''ve
created the filter, basically copying the location filter from
http://blog.tourb.us/archives/ferret-and-location-based-searches. But
when I try to call Index.search and pass the filter in a hash with the
key :filter, I get back that it is expecting type Data, and so I''m at
a loss to figure out
2007 May 30
3
A way to get all the words from an index?
Hi,
I am just wondering if there''s a way to get all the words from an
index. Basically, all the words that have been indexed (excluding the
stopwords if I''m using the stopwords analyzer, etc.)
The fields I''m putting in are not :stored in the index.
The idea is to implement a "did you mean?" mecanism, which is based
on the content of the index, not on a
2007 Mar 19
7
Many index files
I''m using acts_as_ferret and have indexed a model with acts_as_ferret
:fields => [:name, :ascii_name, :alt_names], :single_index => true.
Now in the index directory more than 95.000 files are generated! The
number of tuples I''m indexing is approx. 86.000.
I can''t remember this from earlier ferret/acts_as_ferret versions where
I''ve indexed millions of
2007 Jan 27
0
concurrency errors adding to a keyed index
...ls
web interface. This is in a dev environment with only 1 user (me) and
about 58000 docs.
The error I get is along the lines of the following, with a different
filename each time:
IO Error occured at <except.c>:79 in xraise
Error occured in fs_store.c:324 - fs_open_input
couldn''ferret_index/development/news_article_versions/_2ih.tix: <No such file or directory>
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.14/lib/ferret/index.rb:682:in `initialize''
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.14/lib/ferret/index.rb:682:in `ensure_reader_open''
/usr/lib/ruby/gems/1.8/gems/...
2006 Nov 28
4
Update/Create record only if field is true
I have a sellable flag in my database. I''m trying to have ferret only
add/update records where sellable == true. What is the best way to do
this? I''ve tried editing instance_methods.rb in the AAF, but I still
can''t get it to work.
Thanks for the help
--
Posted via http://www.ruby-forum.com/.
2007 Feb 06
2
Which method to use to get content from index with a_a_f?
Hi everybody,
After staring at the a_a_f API for quite sometime now, I decided it''s
time to ask...
Which method should I use to get content from the index without using
highlight? Consider the following controller action:
def preview
if params[:search].blank? # normal case
@text = @myfile. # which method do I use here to get the :text from
the index???
else # if we come from
2006 Sep 18
16
Dynamic fields and AAF
Hi,
I have a model which has properties, these are your standard name/value
pairs, but also have attributes that affect how I want to store them in
ferret. I was using 0.9.5 with 0.2 of aaf, which seemed fine, I just
copied and pasted (yes, I know, ick) the to_doc method and added code to
iterate though the properties that that model had, and add relavent
fields to the document.
It seems
2006 Jul 07
0
acts_as_ferret transactions
...alse
+ @defer_for_transaction = false
def ferret_before_update
@ferret_reindex = true
@@ -505,9 +506,13 @@
# add to index
def ferret_create
- logger.debug "ferret_create/update: #{self.class.name} :
#{self.id}"
- self.class.ferret_index << self.to_doc if @ferret_reindex
- @ferret_reindex = true
+ unless @defer_for_transaction
+ logger.debug "ferret_create/update: #{self.class.name} :
#{self.id}"
+ self.class.ferret_index << self.to_doc if @ferret_reindex
+ @...
2007 Apr 06
3
Double work at Model.rebuild_index
I''m noting that every time I run Model.rebuild_index its running twice
the rebuild_index. Also, on ferret_index.log there is only one small
difference from the first and second time, see:
First time it shows:
rebuild index: []
reindexing model User
After it finishes, it automatically starts the second time and shows;
rebuild index: [["User"]]
reindexing model User
The full log is bellow:
[921...