search for: regexpanalyz

Displaying 17 results from an estimated 17 matches for "regexpanalyz".

Did you mean: regexpanalyzer
2006 Oct 27
1
Regexpr. analyzer
Hi! I want to index html files, but w/o the tags, so I was thinking either I remove them before I index it (expensive), or put up an RegExpAnalyzer. BTW, when using an analyzer, does that mean that everything which it declines (i.e. the RegExpAnalyzer doesn''t match) won''t be put into the index files (i.e. blows it up)? I came up with a simple test, which didn''t work in act_as_ferret, but now in pure ferret doe...
2007 Apr 19
5
Chinese full text searching by acts_as_ferret?
How to add Chinese language full text searching function by using acts_as_ferret? RegExpAnalyzer.new(/./,false) this analyzer, i don''t know how to use it! does it works like this: user searching---->acts_as_ferret---->ferret ???? -- Posted via http://www.ruby-forum.com/.
2006 Oct 31
3
No search results using Searcher
...tried the following code: queryparser = QueryParser.new() searcher = Searcher.new(path) queryparser.fields = searcher.reader.fields searcher.search(queryparser.parse("something")) I index all my documents as follows: index = Index::Index.new(:path => path, :analyzer => Analysis::RegExpAnalyzer.new(/./, false)) index << { :title => title, :url => link, :body => page } What am I doing wrong? Thanks! -- Jeffrey Gelens
2007 May 18
3
issues with : in the content
Hi, I''ve discovered ferret and aaf this evening, I''ve just done some tests and it seems perfect for my needs. I''m indexing text data (title, description, etc) and also ethernet hardware addresses (MAC). Sorry if that sounds trivial but I can''t find the way to correctly index and achieve correct searches on MAC addresses. If I do something like this: index =
2006 Jul 07
4
How to add Asia token analyzer to ferret simply?
...need >> both the count of search results and offset. >> Very grateful! > > Hi Charlie, > > Ferret will work fine on Asian Languages. You just need to write your > own Analyzer which matches tokens correctly for the language you are > interested in. Have a look at the RegExpAnalyzer in Ferret. You can > look at test/unit/analysis/ctc_analyzer.rb to see how it works. > > Cheers, > Dave -- Posted via http://www.ruby-forum.com/.
2007 Apr 29
1
Chinese full-text support! Still fail-_-
...suggested but still made any progress. i downloaded the latest version of ferret from svn. Thanks and regards. captain Chengcai He wrote: > Hello everyone! > > I use the ferret as the following: > acts_as_ferret :fields => [:subject, :body], :analyzer => > Ferret::Analysis::RegExpAnalyzer.new(/./,false) > > when i input the english word to search, it''s so cool and so soon to got > the result! but when i input the chinese words to search, the ruby > allocate all the memory and the computer has no response, after a long > long time wait, there''s...
2006 Sep 06
9
Which analyzer to use
Lucene''s standard analyzer splits words separater with underscores. Ferret doesn''t do this. For example, if I create an index with only document ''test_case'' and search for ''case'' it doesn''t find anything. Lucene on the other hand finds it. The same story goes for words separated by colons. Which analyzer should I use to emulate
2007 Apr 08
10
Ferret and non latin characters support
I''ve successfully installed ferret and acts_as_ferret and have no problem with utf-8 for accented characters. It returns correct results fot e.g. fran?ais. My problem is with non latin characters (Persian indeed). I have tested different locales with no success both on Debian and Mac. Any idea? (ferret 0.11.4, acts_as_ferret 0.4.0, rails 1.1.6) -- Posted via http://www.ruby-forum.com/.
2008 Jun 13
2
strip out non-alphanumeric characters before saving to index
Does anyone know a simple way, with ferret or a_a_f, to strip out everything that''s not a letter, number or space before saving to the index? I know that i could do a custom method for every indexed field that regexes them out but i thought that there might be a universal option for it... thanks max -- Posted via http://www.ruby-forum.com/.
2006 Jul 05
3
Is there any schema of full-text search that support utf-8?
Is there any schema of full-text search that support utf-8 especially for Asia language such as Chinese,Japanese,etc. Ferret/acts_as_ferret can not work when these language key words are searched,and also, it is difficult to implement pagination-which need both the count of search results and offset. Very grateful! -- Posted via http://www.ruby-forum.com/.
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic: acts_as_ferret({ :fields => {:username => {:store => :yes, :boost => 30}, :subject => {:store => :yes, :boost => 20}, :body => {:store => :yes, :boost => 10}}, :remote => true }, { :analyzer => Ferret::Analysis::RegExpAnalyzer.new(/./, false) }) def self.full_text_search(q, options = {}, find_options = {}) return nil if q.nil? or q=="" default_options = {:limit => 10, :page => 1} options = default_options.merge options # get the offset based on what page we''re on options[:offse...
2007 Jul 18
5
Strange search result with conditions in find_by_contents
Hi, guys: Strange search result with conditions in find_by_contents! first of all, i''ve installed the acts_as_ferret to my project vender folder by ''ruby script/plugin install svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret'' in my SearchController def searchforum if !params[:doSearch].nil? if params[:searchTerms].nil? || params[:searchTerms] ==
2006 Jul 18
10
searching with chinese chars
Hi all, maybe not a Ferret question, but I assume here might have came across that already. I wrote a simple CGI app that adds docs into a Ferret index. The idea is testing asian languages input and searching. The script that does the input seems to be OK. As David mentioned in a question I made a little while ago, Ferret''s index is agnostic, in the sense that you can store anything in
2005 Dec 14
5
Query question
I have an index in which I want different records to be accessible to different users. I think I can do this by adding a "users" field to each record in the index and narrow down my queries to only those records matching the current user''s userid. I have the userids separated by commas. What would be the right way to query for a certain user? I have to make sure that I
2007 May 07
0
using acts_as_ferret in persian language
hi i installed ferret and acts_as_ferret successfully. but my Persian character search has not correct result. my code: acts_as_ferret :fields => [:fname] , :analyzer => Ferret::Analysis::RegExpAnalyzer.new(/./,false) -- Posted via http://www.ruby-forum.com/.
2007 May 16
0
How we got rid of a bus error when using acts_as_ferret
...und some a few mailing list threads that described the same situation, but didn''t come with any solution. Then we tried to zero in, first by removing the :analyzer part, and the bus error was gone. We started to suspect the analyzer that we were using: :analyzer => Ferret::Analysis::RegExpAnalyzer.new(FerretHelper::GENERIC_ANALYSIS_REGEX, true) Where GENERIC_ANALYSIS_REGEX is /([a-zA-Z]|[\xc0-\xdf][\x80-\xbf])+|[0-9]+|[\xe0-\xef][\x80-\xbf][\x80-\xbf]/ This is used, a la Jcode, to tokenize both European-language words, numbers, and CJV chars. Interestingly, we started to suspect if M...
2008 Jan 03
1
properly escaping special characters in AAF?
For most cases, I''ve got search working in Rails as follows: ## controller: term = params[:search][:term] @results = MyModel.find_by_contents "#{term}*" The ''*'' character is appended to the search term so that searches match anything that begins with ''term''. For the most part, this is great, but let''s say term is equal to