Currently running the following setup:
-Ferret 0.11.5
-Acts as Ferret plugin 0.4.3 Rev.257
-Rails 2.1.1
-Ruby 1.8.6 Patchlevel 111
-Windows 2003 Server
This all works fine and dandy and after a lot of struggling with getting
these specific versions together I managed to get it up and running on
Windows. In all my models I have set the :remote => true option on the
acts_as_ferret declaration so the DRb is used in production.
The DRb runs fine and is defined in ferret_server.yml
Index directory is created in the project folder and the DRb seems to
index nicely in there. The top of the log says:
DRb server: ensure_index_exists for class Contest
Asked for a remote server ? true, ENV[“FERRET_USE_LOCAL_INDEX”] is nil,
looks like we are the server
Will use local index.
using index in C:/websites/BRProject/index/production/contest
1.) Is this correct? Or should I set this FERRET_USE_LOCAL_INDEX value?
2.) Then after indexing all my teams in the database I get these lines
in my ferret_server.log:
Adding field name with value ‘BLAH TEAM NAME’ to index
creating doc for class: Team, id: 4891
Adding field name with value ‘OTHER TEAM NAME’ to index
reindex model Team : 191.58% complete : -8.05 secs to finish
e[4;36;1mTeam Load (0.000000)e[0m e[0;1mSELECT * FROM teams
WHERE
(id > 4891) LIMIT 1000e[0m
e[4;35;1mSQL (0.000000)e[0m e[0mCOMMITe[0m
changing index dir to
C:/websites/BRProject/index/production/team/20081025165554
index dir is now
C:/websites/BRProject/index/production/team/20081025165554
#method_missing(:find_id_by_contents, [“Team”, “Othe~ OR Team~”,
{:limit=>4}])
#method_missing(:find_id_by_contents, [“Team”, “J~ OR P~ OR Custom~”,
{:limit=>4}])
#method_missing(:find_id_by_contents, [“Team”, “Munchin~ OR Hilto~”,
{:limit=>4}])
Followed by a similar ‘method_missing’ line about 1000 times. One for
each apparent search query entered on the website.
I use the ‘find_by_contents’ function throughout my application where I
split the query on non-word chars /[^\w]/ and join em with an OR and
make all the terms fuzzy. Should I use a different call? Or what am I
doing wrong here.
3.) I feel like I am abusing the query language for this purpose: Fuzzy
finding team names. Often I type in a nearly exact match with the team
and it wont show up. Especially team names with ‘.com’ in it for
example. Or exact matches yield different team names with a higher hit
rate. Also there is a problem with matching certain reserved words.
Apparently querying the States DB with ‘IN’ for Indiana is not going to
work
Is there any advice on how to better realize a fuzzy search engine?
thanks for the support!