]> mj.ucw.cz Git - libucw.git/commitdiff
Finally I realized why we were using secondary sorting on site_id
authorMartin Mares <mj@ucw.cz>
Sun, 21 Apr 2002 08:30:06 +0000 (08:30 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 21 Apr 2002 08:30:06 +0000 (08:30 +0000)
by default :-)  I was originally searching for some magic inside the
search server which needed that to work and completely missed the
simple fact that the front-end wants the results this way :-)

So I'm resurrecting it, but now as an ordinary instance of the secondary
sorting code I've introduced yesterday. The CUSTOM_SORTING switch is gone,
sorting by site ID and page age works always.

Also, I've simplified reverse sorting by introducing a separate XOR mask.

lib/custom.h

index 250a7bac19afc6636efac7ce32aff61cfc26e050..f4a57115aae467872ce9fd6d65507fba28f0fe1a 100644 (file)
@@ -98,9 +98,6 @@ enum string_type {
  *  A good place for definitions of the functions is lib/custom.c.
  *
  *  Please order the attributes by decreasing size to get optimum padding.
- *
- *  If you also want the search server to sort by a custom attribute
- *  on ties, define CUSTOM_SORTING.
  */
 
 #if 0          /* Example */
@@ -111,8 +108,6 @@ struct card_attr;
 void custom_get_lm(struct card_attr *ca, byte *attr);
 byte *custom_parse_lm(u32 *dest, byte *value, uns intval);
 
-#define CUSTOM_SORTING
-
 #else
 
 #define CUSTOM_ATTRS