From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.142.204.14 with SMTP id b14cs177640wfg; Thu, 7 Jul 2011 07:48:42 -0700 (PDT) Received: by 10.52.22.177 with SMTP id e17mr1135888vdf.215.1310050121572; Thu, 07 Jul 2011 07:48:41 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id by5si11345277vdc.48.2011.07.07.07.48.41; Thu, 07 Jul 2011 07:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 146DE3C8048 for ; Thu, 7 Jul 2011 10:48:41 -0400 (EDT) Received: from mail-pv0-f178.google.com (mail-pv0-f178.google.com [74.125.83.178]) by rubyforge.org (Postfix) with ESMTP id CC95D1858363 for ; Thu, 7 Jul 2011 10:48:28 -0400 (EDT) Received: by pvg7 with SMTP id 7so747002pvg.23 for ; Thu, 07 Jul 2011 07:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=qmO1tf6mZ0e5FKB+DUvGZmoKl1wxSevTUbxXL6hTtrg=; b=wP+lYpN3gJx5FDjpVruifulHSupwkuf9z/FkES30F6eKnfJ+xeLp4m9NICxfzvdi+C N6tIVfjTbCCW8LtvINqjaDj9uNOLc6PgzXofO5udM7dhHSGf6y/6Rt8dcepOaoLz7KmZ e4jEUmdf9X4E6NI4t2oEw6El86z/IrciquSFI= Received: by 10.68.29.230 with SMTP id n6mr1269534pbh.130.1310050108128; Thu, 07 Jul 2011 07:48:28 -0700 (PDT) Received: from panama.localnet (125.net112138030.t-com.ne.jp [112.138.30.125]) by mx.google.com with ESMTPS id v9sm3689111pbm.95.2011.07.07.07.48.26 (version=SSLv3 cipher=OTHER); Thu, 07 Jul 2011 07:48:26 -0700 (PDT) From: Horacio Sanson Organization: piaotech To: Sup developer discussion Date: Thu, 7 Jul 2011 23:48:23 +0900 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.4; x86_64; ; ) References: <201107071124.16433.hsanson@gmail.com> <1310018610-sup-9096@masanjin.net> In-Reply-To: <1310018610-sup-9096@masanjin.net> MIME-Version: 1.0 Message-Id: <201107072348.23637.hsanson@gmail.com> Subject: Re: [sup-devel] How are the queries supposed to work? X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org On Thursday 07 July 2011 15:07:41 William Morgan wrote: > Hi Horacio, > > Reformatted excerpts from Horacio Sanson's message of 2011-07-07: > > # Now I tried several queries that I thought would return that message > > but they all returned zero results: > > > > index.set_query(Query.new("body", "HELP")) > > index.set_query(Query.new("body", "PLEASE")) > > These two are due to case folding. If you try "help" and "please", it > should work. > Indeed lowercasing all the queries make them work. > > index.set_query(Query.new("labels", "unread") > > This one should be Query.new("body", "~unread"). The label syntax is > different in heliotrope from in Sup; they aren't regular fielded terms. > > > index.set_query(Query.new("from", "rubyonrails-talk@googlegroups.com") > > index.set_query(Query.new("to", "rubyonrails-talk@googlegroups.com") > > index.set_query(Query.new("body", "rubyonrails-talk@googlegroups.com") > > This I don't quite understand. Similar queries work on my system. Would > you be able to send the the message that this corresponds to? > Sorry my mistake. The queries I did were with: "" in this case the result is zero but if I remove the "<" and ">" then I get the expected results. The same goes for "[rails]" that does not work unless I remove the square brackets. > > index.set_query(Query.new("body", "fixtures")) > > index.set_query(Query.new("subject", "fixtures")) > > These ones work due to the lower casing. > > > index.set_query(Query.new("subject", "Rails")) > > index.set_query(Query.new("subject", "[Rails]")) > > index.set_query(Query.new("subject", "Test fixtures")) > > index.set_query(Query.new("subject", "test fixtures")) > > I would expect the last one to work. Did it? > You are rigth, the last query works correclty. Maybe I was already tired of so much testing and forgot to actually run the query after setting it. > > On all tests I made sure to run index.reset_query! before setting the > > new query with index.set_query. Is this the correct way??? > > The reset_query! is unnecessary. > > Thanks for all your testing. Much of this is undocumented, so I ask you > to bear with me. Once the UTF-7 encoding issue with the labels get's fixed I will test querying with Japanese labels. -- regards, Horacio Sanson _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel