* [sup-talk] Sorting
@ 2009-12-14 17:01 Michael McDermott
2009-12-14 17:13 ` Marc Weber
2009-12-14 23:12 ` Carl Worth
0 siblings, 2 replies; 6+ messages in thread
From: Michael McDermott @ 2009-12-14 17:01 UTC (permalink / raw)
To: sup-talk
After running a search in Sup, is there any way to sort the result set? Or,
perhaps, specify the ordering in the query? (ala SQL)
--
Michael McDermott
www.mad-computer-scientist.com
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sup-talk] Sorting
2009-12-14 17:01 [sup-talk] Sorting Michael McDermott
@ 2009-12-14 17:13 ` Marc Weber
2009-12-14 17:17 ` Edward Z. Yang
2009-12-14 20:45 ` Michael McDermott
2009-12-14 23:12 ` Carl Worth
1 sibling, 2 replies; 6+ messages in thread
From: Marc Weber @ 2009-12-14 17:13 UTC (permalink / raw)
To: sup-talk
Excerpts from Michael McDermott's message of Mon Dec 14 18:01:39 +0100 2009:
> After running a search in Sup, is there any way to sort the result set? Or,
> perhaps, specify the ordering in the query? (ala SQL)
Hi McDermott
Sup is lazy.
It only searches as much results as fit on screen unless you use !!
I think threads are sorted by date which makes much sense.
You propose that you want a ORDER BY feature.
From SQL you should also know that this forces the database to fetch all
rows even if you're interested only in LIMIT 1.
So try !! and wait. If it' fast enough tell so. If it's not think about
another way to solve you real problem. Maybe just put your real problem
here. There may be a different solution.
You want to stort your threads by which field?
Marc Weber
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sup-talk] Sorting
2009-12-14 17:13 ` Marc Weber
@ 2009-12-14 17:17 ` Edward Z. Yang
2009-12-14 20:45 ` Michael McDermott
1 sibling, 0 replies; 6+ messages in thread
From: Edward Z. Yang @ 2009-12-14 17:17 UTC (permalink / raw)
To: Marc Weber; +Cc: sup-talk
Excerpts from Marc Weber's message of Mon Dec 14 12:13:01 -0500 2009:
> It only searches as much results as fit on screen unless you use !!
> I think threads are sorted by date which makes much sense.
If we have an index on X field you want to sort on, we shouldn't
need to grab all of the entries either. Although, this is entirely
index dependent...
Edward
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sup-talk] Sorting
2009-12-14 17:13 ` Marc Weber
2009-12-14 17:17 ` Edward Z. Yang
@ 2009-12-14 20:45 ` Michael McDermott
2009-12-19 19:10 ` William Morgan
1 sibling, 1 reply; 6+ messages in thread
From: Michael McDermott @ 2009-12-14 20:45 UTC (permalink / raw)
To: sup-talk
The thing that brought it to mind was search results. In particular, I was
searching for messages with a particular label, then wanting to sort them by
date. (I am running sup version 0.8.1, installed from the Jaunty repositories,
if that is of any help).
At least at my current version, the messages were not in a chronological order.
There were messages from the last couple of days interleaved for the first few
pages.
That said, I am sure that arbitrary sorting would be useful. Heck, even
Thunderbird and Outlook (much less powerful though they be) allow messages to be
sorted by fields other than date received.
Excerpts from Marc Weber's message of Mon Dec 14 11:13:01 -0600 2009:
> Excerpts from Michael McDermott's message of Mon Dec 14 18:01:39 +0100 2009:
> > After running a search in Sup, is there any way to sort the result set? Or,
> > perhaps, specify the ordering in the query? (ala SQL)
>
> Hi McDermott
>
> Sup is lazy.
>
> It only searches as much results as fit on screen unless you use !!
> I think threads are sorted by date which makes much sense.
>
> You propose that you want a ORDER BY feature.
> >From SQL you should also know that this forces the database to fetch all
> rows even if you're interested only in LIMIT 1.
>
> So try !! and wait. If it' fast enough tell so. If it's not think about
> another way to solve you real problem. Maybe just put your real problem
> here. There may be a different solution.
>
> You want to stort your threads by which field?
>
> Marc Weber
--
Michael McDermott
www.mad-computer-scientist.com
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sup-talk] Sorting
2009-12-14 17:01 [sup-talk] Sorting Michael McDermott
2009-12-14 17:13 ` Marc Weber
@ 2009-12-14 23:12 ` Carl Worth
1 sibling, 0 replies; 6+ messages in thread
From: Carl Worth @ 2009-12-14 23:12 UTC (permalink / raw)
To: Michael McDermott, sup-talk
[-- Attachment #1.1: Type: text/plain, Size: 991 bytes --]
On Mon, 14 Dec 2009 11:01:39 -0600, Michael McDermott <mcdermott.michaelj@gmail.com> wrote:
> After running a search in Sup, is there any way to sort the result set? Or,
> perhaps, specify the ordering in the query? (ala SQL)
The Xapian database (which Sup uses optionally now and perhaps
exclusively in the future) allows results to be sorted by anything
stored in a "value" field of the documents.
If I recall correctly, Sup is currently storing three things in "value"
fields:
1. Message ID
2. Thread ID (which is Message ID of a representative message)
3. Date
So it's quite easy to have Xapian return things based on an ordering of
any one of those values (in either direction). And this does not require
fetching all documents.
Sorting on anything else would require either fetching all documents,
(and doing the sort in the user-interface), or else storing an
additional value for each document in the database.
What is it that you actually want to sort on?
-carl
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [sup-talk] Sorting
2009-12-14 20:45 ` Michael McDermott
@ 2009-12-19 19:10 ` William Morgan
0 siblings, 0 replies; 6+ messages in thread
From: William Morgan @ 2009-12-19 19:10 UTC (permalink / raw)
To: sup-talk
Reformatted excerpts from Michael McDermott's message of 2009-12-14:
> At least at my current version, the messages were not in a
> chronological order. There were messages from the last couple of days
> interleaved for the first few pages.
That's a bug, then. Messages should always be in chronological order. If
this behavior persists with Sup 0.9.1, please submit a bug report to
http://masanjin.net/sup-bugs/
> That said, I am sure that arbitrary sorting would be useful. Heck,
> even Thunderbird and Outlook (much less powerful though they be) allow
> messages to be sorted by fields other than date received.
Sorting by other fields is not so useful when you have a good full-text
search. I doubt I will spend energy working on this, though as always,
patches are welcome.
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-12-19 19:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-14 17:01 [sup-talk] Sorting Michael McDermott
2009-12-14 17:13 ` Marc Weber
2009-12-14 17:17 ` Edward Z. Yang
2009-12-14 20:45 ` Michael McDermott
2009-12-19 19:10 ` William Morgan
2009-12-14 23:12 ` Carl Worth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox