sort by content+discussion

content is just doing simple text order, regardless of type.


John, we don't have to close this ticket after 0.13, but we'll want to update the documentation (moving alpha out)

  --Ethan McCutchen.....Thu Mar 19 12:00:13 -0700 2009


deprecated alpha in documentation. While i was there noticed sort by plusses and relevance. The former seems to be broken - http://sandwagn.wagn.org/wagn/plus_cards_by_plusses - and the latter didn't seem to change the order - http://sandwagn.wagn.org/wagn/User+*type_cards+by_relevance . What are they anyway?

  --John Abbe.....Fri Apr 17 16:29:09 -0700 2009


content is sorting by something, but not content - http://sandwagn.wagn.org/wagn/WQL_testing#Sort%20by%20content

  --John Abbe.....Fri Apr 17 16:29:49 -0700 2009


woof. don't get it. My first impulse was that it might not work on cards with html in the content (including most basic tags), because it wouldn't strip out the tags (which would be hard). But I switched it to plaintext and it didn't appear to fix things. I'll look at it and either fix it or knock it off this release.

  --Ethan McCutchen.....Fri Apr 17 19:46:01 -0700 2009


OK, this is actually working, but with several qualifiers:

1. it doesn't strip out html, so basic cards (and other cards where html is stored) are likely to be wack.
2. if the cards are hard formatted, it doesn't look at the hard formatting, it just looks in the db for the original content
3. it treats numbers as text. So it would get 1,2,3,4 right, but it would get 1,12,2,23,3 wrong.
4. it WAS case-sensitive. so A,B,C,a,b,c... I pushed a patch for this one (currently deploying).

So you can see that http://sandwagn.wagn.org/wagn/content_sort_1 and http://sandwagn.wagn.org/wagn/content_sort_2 are now largely working, with the above caveats.

1,2,and 3 above would all require very different types of work to fix. My inclination would be to test #4 then close this ticket and add the other 3 as ideas.

  --Ethan McCutchen.....Mon Apr 20 13:06:39 -0700 2009


fix sorting of numbers
strip HTML when sorting by content
handle sorting of hard-formatted cards

  --John Abbe.....Tue Apr 21 13:45:23 -0700 2009


Dates almost work. Oddly, some single-digit date months have a zero in front of them, and some don't. Maybe this could be fixed with a migration? See http://sandwagn.wagn.org/wagn/content_sort_3

  --John Abbe.....Tue Apr 21 15:32:14 -0700 2009


awesome. thanks for breaking these out. wouldn't be a super hard migration, but it looks like there would need to be a functional fix first since the ones with singles are later in the process. Let's push until we update our Date functionality.

  --Ethan (Not signed in).....Wed Apr 22 07:02:18 -0700 2009


Mostly okay, but since you can have []s and {}s and HTML in Phrase and PlainText cards, you still can get some funny ordering, alas. Inclined to still document but add a Tip about these issues; figure?

  -- John.....Thu Apr 23 15:06:17 -0700 2009


sounds good. this is all for the CQL Syntax card, right?

  --Ethan McCutchen.....Thu Apr 23 16:34:54 -0700 2009


Yes. And see the question on upgrade Date cardtype.

  --John Abbe.....Fri Apr 24 21:05:55 -0700 2009