[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] How are the queries supposed to work?



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.

> 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?

> 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?

> 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.
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel