]> mj.ucw.cz Git - libucw.git/blobdiff - lib/custom.h
Added secondary sorting (i.e., breaking ties when two documents have the same Q)
[libucw.git] / lib / custom.h
index f4a57115aae467872ce9fd6d65507fba28f0fe1a..250a7bac19afc6636efac7ce32aff61cfc26e050 100644 (file)
@@ -98,6 +98,9 @@ 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 */
@@ -108,6 +111,8 @@ 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