Displaying 10 results from an estimated 10 matches for "cortereal".
2006 Jul 31
16
Sorting performance
I''m using acts_as_ferret to index one of my rails models. Right after I
start the app the first request that orders by some ferret field will
take very long. Subsequent ones seem to be fast. I guess some caching is
going on. Any tips on solving this?
Pedro.
2006 May 05
3
Sorting by score
I''m trying to sort by score but it seems like SortField::SortType::SCORE
is 0 instead of a SortType. A test case is attached. Without the C
extensions the test passes, so I guess it''s a bug in them. Should I be
using it without the extensions? Because if that''s the case I have some
other bugs to report.
Greetings,
Pedro C?rte-Real
-------------- next part
2006 Apr 21
3
Sorting Search results
I tried sorting the search results in Ferret::Index::Index#search and
what I found was that the sort is applied not to the whole search but to
the returned results.
Suppose I have these results:
Text - Num
foo - 2
bar - 3
far - 4
boo - 1
If I limit the search to the first two and sort by num I get:
foo - 2
bar - 3
while I think the natural behaviour would be:
boo - 1
foo - 2
Is this
2006 Aug 01
8
Problem importing lots of records
I run a script that imports a few thousand records into the database.
The script runs once for each of several XML files. What it does is
parse the XML and for each element of a certain type creates a record in
a rails database that gets indexed with acts_as_ferret. This worked fine
before but today after a few files (70000 records) this started to
happen for any file I tried:
2006 Aug 18
1
Portuguese Stemming
Today while compiling ferret I noticed there was a Portuguese stemmer
being compiled. How do I enable it''s use for my index?
Pedro.
2006 May 09
1
Reverse sorts by score
The docs for Sort.new say:
reverse: pass true if you want the sort order to be reversed. Only works
if you pass the field names.
Does this mean it''s not possible to do a reverse sort by score? If it is
it seems to be broken as I don''t seem to be able to reverse the order of
the sort. I''ll write a test case if this is not a known problem.
Greetings,
Pedro.
2006 Apr 20
1
Creating my own analyzer
I created this analyzer:
class DescriptionAnalyzer < Ferret::Analysis::Analyzer
def token_stream(field, string)
if field == "code"
return CodeTokenStream.new(string)
else
return Ferret::Analysis::Analyzer.new.token_stream(field,string)
end
end
end
and created an IndexWriter with it:
Ferret::Index::IndexWriter.new(get_index_path,
2006 Apr 27
1
Ferret crashing Ruby
I''ve gotten several problems with C ferret crashing ruby. Here''s the
stack trace of my latest case:
#0 0x00000050 in ?? ()
#1 0xb74028ab in iw_close (iw=0x8685a40) at index_rw.c:947
#2 0xb7414359 in index_destroy (self=0x829ebc0) at ind.c:89
#3 0xb73f00bc in frt_ind_free (p=0x829ebc0) at r_search.c:1564
#4 0xb7f04dca in rb_gc_call_finalizer_at_exit ()
from
2006 Jun 01
1
Using acts_as_ferret outside rails
How do I use a model that has "acts_as_ferret" defined outside rails?
I''ve tried adding this to the top of my model:
require
"#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb"
and then defining RAILS_ROOT and RAILS_ENV in my app that uses the model
outside rails. That got me this exception:
2006 Aug 25
7
disabling automatic indexing in acts_as_ferret
I''d like to be able to enable/disable the automatic indexing of
documents acts_as_ferret does. Something like MyModel.disable_indexing
MyModel.enable_indexing would be perfect. I need this because I do some
indexing that requires visiting the parents of the model objects and my
import method imports the children first, so the information isn''t there
yet. I''d like to