similar to: Best way to build a query?

Displaying 20 results from an estimated 20000 matches similar to: "Best way to build a query?"

2008 Mar 13
0
ActionView::TemplateError when FQL query does not return any results
I submitted this as a bug here: http://rubyforge.org/tracker/index.php?func=detail&aid=18799&group_id=4187&atid=16130 However, I just realized that I probably should have posted here first. Has anyone else had a similar experiance with queries that don''t return results? I have the following FQL Query: "SELECT uid FROM user WHERE has_added_app = 1 AND uid IN (SELECT
2008 Jan 07
1
Selecting maximum value from a field
Hello, I have a field which contains integer values. How do I obtain the maximum value of the column? Benjamin
2008 Jan 12
1
Native release for windows 0.11.6?
Hello, Is there going to be a native windows release for 0.11.6? Alternatively, if a new version is going to be released soon, will there be a release for windows of that? Thanks! Benjamin
2007 Apr 05
2
best way to maintain dynamic fields?
I have a Topic that has_many comments. In the search results only want Topics to show up, but I want them to include the text of the comments that they have when they are indexed. To do this I''ve added a :comments_text field for acts_as_ferret and the comments_text method gathers the text from all comments up into a string that can be indexed. The trick is that when comments are added,
2008 Jan 11
3
Date range queries return zero results
Hello, I am having trouble getting data ranges to work correctly. I am using the following command to load the db: index << {:title => row[7].to_i, :date => Date.strptime(row[3], ''%Y-%m-%d''), :page_id => row[5].to_i, :page => row[6].to_i, :content_type => row[1].to_i,
2008 Jan 16
2
Escaping special characters :, (, ), [, ], {, }, !, +, ", ~, ^, -, |, <, >, =, *, ?, \
Hello, I am trying to escape words for searching i.e., "hello". The key here is that the two L''s on "hello" are actually vertical bars. Is there a special function in Ferret or anywhere for that matter that will do the escaping of the Ferret special characters? Thanks in advance, Benjamin
2007 Dec 20
1
indexing tuples (example: "frog" => 123) as opposed to words
Hi, I need to map words in a document back to there original word id''s in my database. For example, if I had the sentence "I eat food" and I was searching for "food" I would obviously get the document back as a result. For my particular problem I need to not only get the document id but also the id of the match. Suppose my original sentence was actually
2007 Sep 07
4
Ferret DRB - can add/edit index, but can''t search
I''m trying to use the Ferret DRB server to avoid concurrency issues when using multiple mongrels. I can successfully add and edit data on my index via the DRB server, however, when I search the index, I get the following error: DRb::DRbConnError (DRb::DRbServerNotFound): /usr/lib/ruby/1.8/drb/drb.rb:1647:in `current_server'' /usr/lib/ruby/1.8/drb/drb.rb:1709:in
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
2007 Sep 09
1
MultiTerm query segfault - remote denial of service
Hi ferreteers, I came across a segfault in the query parser. It had already been reported[1] and fixed[2], but it can lead to a denial of service. If you use Ferret anywhere that you allow users to execute queries, those users can crash your Ruby process with a specially crafted query. I''m sure you''re all using Monit or something for your Rails or drb processes, so
2007 Apr 15
3
Massive difference in query times on OSX and Linux
I have a 1.7GB index with 440818 documents. Queries that take 0.23846 seconds on my MacBook pro take an indefinite period of time on a Fedora Core 4 EC2 instance. Five minutes and counting...I''m using Ferret 0.11.3. I don''t see any errors in the logs. Has anyone ever seen anything like this?
2011 Oct 10
1
Text Mining with Facebook Reviews (XML and FQL)
Hello, I am trying to use XML package to download Facebook reviews in the following way: require(XML) mydata.vectors <- character(0) Qword <- URLencode('#IBM') QUERY <- paste('SELECT review_id, message, rating from review where message LIKE %',Qword,'%',sep='') Facebook_url = paste('https://api.facebook.com/method/fql.query?query=
2007 May 29
0
Query strings and stop words
Is there an option for filtering stop words out of the query string, so that queries that contain stop words don''t return zero results? It has been several years, but I think that when I was on a project that was writing a search engine, we used to filter stop words both out of the index and out of the query string, after it was parsed. This allows a query like [cold and sinus] to
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(
2007 May 10
5
Segmentation fault on large index
I''m getting a segmentation fault on a large index (15GB). I''m running ferret 0.11.4 on OpenSuSE 10.2 with ruby 1.8.6. The segmentation fault appeared after I optimized the index, see further below for the error message I got before that. Ferret works perfectly on other (smaller) indexes. Is this a known issue, and if so, is there a workaround? --------------------- after
2006 Dec 18
0
Ferret best practice
Hello, I am searching for Ferret best practice : when to open, close, and optimize a ferret index on a classical web application where many people add, read, and sometime delete elements. Do you always keep your index open ? or do you open and close it on every transaction ? Do you optimize your index often ? on every insert ? on every 1000 insert ? or every night ? Thanks for you feedback
2007 Sep 13
5
refreshing indexes?
I am new to ferret and am just reading about it in the O''reilly shortcuts as well as other web resources. My app is a Rails app and so I am looking into acts_as_ferret as well. There are some questions for which I couldn''t find answers in the material I have read so far so I''d appreciate any help on these from the list. A bit of a background. My app will have 10,000 -
2007 Jul 11
4
Query with special characters crashes under Windows XP
Hi, Index queries with special characters (e.g. German Umlauts but also other European ones) make the Ruby process run for quite a long time and crash finally. I''m using Rails on Windows XP with Ferret 0.11.4_mswin_32. I could isolate the problem in the following simple controller action (so there''s no web browser form field involved): def test index = Ferret::I.new index
2007 Dec 25
1
Does sort work for strings work?
Hi, I am trying to get sorting working. I have had success with numbers but when I try to sort my string fields nothing happens. I am using the following code: options = {} s = Search::SortField.new(''object_title'', :reverse => false) options[:sort] = s @index.search_each("my query",options) do |id, score| puts "-->Document #{id} found with a
2006 Jun 15
3
best updating method
Hi All, I have a Ferret index containing some cached RSS feeds. I have a nightly cron script to cache the feeds, and I''d like to update the index with the latest feeds. I see the Index class has an update method, but I can''t work out how to get the id of the relevant document to pass in. Lets say I have a file called "google_news.xml" I want to go: