search for: termqueri

Displaying 20 results from an estimated 35 matches for "termqueri".

Did you mean: termquery
2006 Sep 23
0
TermQuery problem
Hi, Using the 0.10.4 gem under ruby 1.8.5 (2006-08-25) [i686-linux], I get different results with a TermQuery and a search string. Namely, using a search string seems to always work whereas using a TermQuery often doesn''t return any entries. For example: > x=@i[450][:message_id] => "9e7db9110509070759732b21c4 at mail.gmail.com" >
2006 Sep 23
8
svn problems
I can consistently segfault the 0.10.4 gem, so I''m trying to get the subversion version working with hopes towards tracking the problem down. I have a fresh SVN checkout but: a) the version (in ferret.rb) claims to be 0.9.6; and b) Ferret::Index::FieldInfos and a couple other classes are missing at run time. It looks like this is because they''re not exported in the C
2006 Oct 25
1
problem with TermQuery
This might be more of a Lucene question, but I can''t figure it out. How come this works: Item.find_id_by_contents("name:Bob") but this returns no results: Item.find_id_by_contents(Ferret::Search::TermQuery.new(:name, "Bob")) Thanks in advance! -Jon -- Posted via http://www.ruby-forum.com/.
2006 Jun 27
2
Using QueryParser vs building my own query
Hello all I finally caved in and decided I should build my own query instead of relying on QueryParser to do the job for me, but I''ve hit a strange problem.. Here''s how I build my query: #Main query query = Ferret::Search::BooleanQuery.new #Build query to match types typesquery = Ferret::Search::BooleanQuery.new @selected_types.each{|type| typesquery.add_query(
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get no results? Where am I going wrong? Thanks. -----------BEGIN SCRIPT---------------- require ''rubygems'' require ''ferret'' include Ferret path = ''/tmp/myindex'' field_infos = Ferret::Index::FieldInfos.new() field_infos.add_field(:name, :store => :yes, :index => :yes)
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
Okay in this plea for help I''m going to repeat some of what i posted before but with a larger amount of background info in the hope that i can get a decent grip on ferret before it wriggles away.. Firstly, what does installing the acts_as_ferret plugin actually do? I install it and add it to my model and then the index is automatically generated and a few methods are added to it and
2007 Feb 01
2
Searcher do not work or I do not work
Hi. I want to learn more about ferret. So I downloaded ferret-0.10.14 and write a simple test script Only query = TermQuery.new(:content, ''program'') gives result. If I change ''program'' with ''Good'' or ''Extra'' -> no result and searching on (:title, ''Ruby'') -> no result Strange, Strange Here is the
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
2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret index. I was hoping to find a way of sorting the array as i combine the two so def advanced_search(search_text, store, format, sortby) # find items in ferret index items = Item.find_by_contents(search_text) # and now find all the items from a certain store or category items_from_sql = Item.find_by_sql("SELECT *
2006 Sep 22
1
Query Objects vs. Query Strings
Hi .. I tried to build some query objects to get some documents from my index.. without success.. Is something wrong here? q = Ferret::Search::BooleanQuery.new q1 = Ferret::Search::TermQuery.new(:type, "movie") q2 = Ferret::Search::TermQuery.new(:name, "Indiana") q.add_query(q1, :should) q.add_query(q2, :should) Indexer.index.search_each(q) do |doc, score| puts doc end 0
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below. bq = Ferret::Search::BooleanQuery.new bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)), Ferret::Search::BooleanClause::Occur::MUST) filter = Ferret::Search::QueryFilter.new(bq) @vobjects = VoObject.find_by_contents(search_input,:filter => filter, :sort
2007 May 14
3
How to make a Tag cloud with Ferret ?
Hello, I want to make a TAG CLOUD using ferret. How can i do so ? I would need to know the amount of keyword for every each words in the index. Thank you -- Posted via http://www.ruby-forum.com/.
2006 Jan 05
2
ActiveRecord callbacks not happening
Hi, I have a model class like so: class Candidate < ActiveRecord::Base validates_presence_of :name @@index = FerretConfig::INDEX def self.after_destroy puts "Ferret: after_destroy called" @@index.query_delete("+id:#{self.id} +ferret_class:#{self.class.name}") optimize_index end end But when I delete a record, the after_destroy is never called.
2006 Jan 02
3
Multiple indexes?
Hi, I''m indexing records from different database tables and they have identical column names in many cases. Does this mean I have to create different indexes for each table? TIA, Vamsee.
2007 Aug 23
4
scoring problem in acts_as_ferret
Hi, I am using acts_as_ferret and have a problem with scoring. I would like to organize it in such way that, if any of the searched terms fits, I get 1.0 score as a result. I will explain it on the example. I have in index: a) "one two three four" b) "one two three" c) "one two" d) "one" When I search for "one" I would like to get 1.0 score for
2007 Jan 05
3
Confused about Search Results
Hi everyone, I''m pretty new to Lucene and Ferret, so I feel that this is most likely myself not completely understanding the correct way to do this. I haved indexed ~2200 text files (of various sizes), and I am now running searches on the index to get a feel for Lucene and Ferret. In my first program, which is using Lucene I search for ''influenza'' and get the
2019 Mar 08
0
imap segfault in libc.so with CLucene FTS backend enabled
Steps to reproduce: - Enable CLucene FTS in Dovecot; - Open mailbox with MUA; - Search for message with any text; - IMAP session crash. OS: Gentoo Base System release 2.6 Version: FTS: dev-cpp/clucene-2.3.3.4-r6 IMAP: net-mail/dovecot-2.3.2.1 LIBC: sys-libs/musl-1.1.21 Dovecot FTS config: plugin { fts = lucene fts_lucene = whitespace_chars=@. normalize no_snowball fts_autoindex=yes
2007 Nov 04
3
Searching different fields based on document permissions
I''m currently writing a system that stores user-created documents. Each user belongs to a specific group, and the system supports multiple groups. The thing is, my users want to be able to hide pieces of a document from other groups. So for example, lets say Joe of team A has written this document: "Hello all, our secret plan is finally complete! <private>We will begin
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 =>
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