45748d58b5b832232d1de4c98230f979ca146859 kent Fri Nov 14 16:36:21 2014 -0800 Adding trixSearchCmp function to header file and fixed documentation. diff --git src/inc/trix.h src/inc/trix.h index 740580b..db51142 100644 --- src/inc/trix.h +++ src/inc/trix.h @@ -34,15 +34,18 @@ struct trixSearchResult *trixSearch(struct trix *trix, int wordCount, char **words, boolean expand); /* Return a list of items that match all words. This will be sorted so that * multiple-word matches where the words are closer to each other and in the * right order will be first. Single word matches will be prioritized so that those * closer to the start of the search text will appear before those later. * Do a trixSearchResultFreeList when done. If expand is TRUE then this will match not * only the input words, but also additional words that start with the input words. */ void trixSearchResultFree(struct trixSearchResult **pTsr); /* Free up data associated with trixSearchResult. */ void trixSearchResultFreeList(struct trixSearchResult **pList); /* Free up a list of trixSearchResults. */ + +int trixSearchResultCmp(const void *va, const void *vb); +/* Compare two trixSearchResult in such a way that most relevant searches tend to be first. */