From: Horacio Sanson <hsanson@gmail.com>
To: Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] How are the queries supposed to work?
Date: Thu, 7 Jul 2011 23:48:23 +0900 [thread overview]
Message-ID: <201107072348.23637.hsanson@gmail.com> (raw)
In-Reply-To: <1310018610-sup-9096@masanjin.net>
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:
"<rubyonrails-talk@googlegroups.com>"
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
next prev parent reply other threads:[~2011-07-07 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 2:24 Horacio Sanson
2011-07-07 6:07 ` William Morgan
2011-07-07 14:48 ` Horacio Sanson [this message]
2011-07-07 18:08 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201107072348.23637.hsanson@gmail.com \
--to=hsanson@gmail.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox