Displaying 20 results from an estimated 2000 matches similar to: "using highlight from aaf"
2006 Aug 27
6
how to get the words of a query
Hi,
Using aaf to search pages, I wanted to present excerpts from the texts
even when more than one term was used in the search.
I came to some results, despite the difficulty caused by Unicode+ruby.
The last problem I''m faced is to get the query words, without the
logical articulation chars if any.
Is there a clean way to get them ?
--
Jean-Christophe Michel
2007 Jul 29
7
RDig and AAF playing together
I have a site with two indexes. Index A is created offline by RDig
and queried from the web via RDig (specifically,
RDig.searcher.search). Index B is managed by AAF with :remote =>
true. Simple enough. However, I need to query both indexes from RDig.
Usually this is ok, as I modified RDig to accept an array of
search_paths with an element for index A and index B.
However, when Index
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
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
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 Mar 12
5
index.rb:384 [BUG]
Hi folks,
I''ve working and playing with acts_as_ferret and follow this fantastic
tutorial:
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial
When I try to implement the field storage tip, it crash. So, I try to
make it via script/console:
1. I have a simple model called Articles:
class Article < ActiveRecord::Base
acts_as_ferret :fields =>
2007 May 30
4
aaf and dynamic attrs: a bug?
Hi!
I faced some issue while using it for dynamic attrs indexing/search.
Maybe I made something wrong. Here is test method. Everything works just
fine until last line http://pastie.caboo.se/66274 . Tested on both
stable and trunk of aaf and ferret 0.11.4.
the short version of code below:
Contact.acts_as_ferret :fields => [ :first_name ]
assert
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 <<
2007 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all,
I cannot make aaf (rev. 220) use my custom analyzer, despite following the
indications @
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
To pinpoint the problem, I created a model + a simple analyzer with 2 stop
words : "fax" and "gsm".
test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a
stop word.
=> I get a
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
2007 Jan 29
1
Segmentation fault in Search::Searcher#highlight
I''m using ferret 0.10.14 in Linux Fedora 3.
When I do highlight with Index::Index#highlight, it works well.
But, doing the same test with Searcher#highlight,
[BUG] Segmentation fault occurred.
Here''s my test code.
require ''rubygems''
require ''ferret''
include Ferret::Search
#searcher = Ferret::Index::Index.new(:path =>
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 Aug 30
7
AAF Sorting by date - what am I doing wrong?
I''m trying to sort my search results by Date, in descending order. I''ve
done quite a bit of reading through the forums here, and I''ve tried two
different suggestions.
This just returns results in the same order as a search without a sort:
sort_fields = []
sort_fields <<
Ferret::Search::SortField.new("ferret_created_at",:reverse => :true)
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/.
2007 Jun 08
2
getting the list of indexed words from ferret or aaf
is the list of indexed words readily available via aaf or directly from
ferret?
--
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 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/.
2006 Sep 20
3
Range searches some times they work, some times not...
Hi i''m using ferret to enable geographical postcode. I take a postcode
and distance in miles from the user, strip off the outcode and 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
2006 Nov 17
4
undefined method `exists?''
Anyone ever run into this error message when creating a new FieldInfos?
Ferret::Index::FieldInfos.new(:store=>:no)
NoMethodError: undefined method `exists?'' for {:store=>:no}:Hash
--
Posted via http://www.ruby-forum.com/.
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