a48e4a31e870414b9ed4a9731bf4ca694e6ff008 chmalee Wed Oct 30 11:36:15 2019 -0700 Fixes to hub searching after code review: Angie noticed that links were broken due to a bug, but it turns out they were broken in a much bigger way as subtrack search hits were not linking out to the right parent tracks. This has been fixed by adding a new column to the hubSearchText table to encode the parent type of the parent tracks (comp, super, etc), and then building the links the correct way, refs #24338 diff --git src/hg/inc/hubSearchText.h src/hg/inc/hubSearchText.h index 6e3b9b4..9d98def 100644 --- src/hg/inc/hubSearchText.h +++ src/hg/inc/hubSearchText.h @@ -11,33 +11,34 @@ enum hubSearchTextTextLength { hubSearchTextShort = 0, hubSearchTextLong = 1, hubSearchTextMeta = 2, }; struct hubSearchText /* Track hub descriptions */ { struct hubSearchText *next; /* Next in singly linked list. */ char *hubUrl; /* Hub URL */ char *db; /* Assembly name (UCSC format) for Assembly and Track descriptions, NULL for hub descriptions */ char *track; /* Track name for track descriptions, NULL for others */ char *label; /* Name to display in search results */ - char *parents; /* Comma separated list of parent track of this track, NULL for others */ enum hubSearchTextTextLength textLength; /* Length of text (short for labels, long for description pages, meta for metadata) */ char *text; /* Description text */ + char *parents; /* Comma separated list of parent track of this track, NULL for others */ + char *parentTypes; /* Comma separated list of parent track types */ }; void hubSearchTextStaticLoadWithNull(char **row, struct hubSearchText *ret); /* Load a row from hubSearchText table into ret. The contents of ret will * be replaced at the next call to this function. */ struct hubSearchText *hubSearchTextLoadWithNull(char **row); /* Load a hubSearchText from row fetched with select * from hubSearchText * from database. Dispose of this with hubSearchTextFree(). */ struct hubSearchText *hubSearchTextLoadAll(char *fileName); /* Load all hubSearchText from whitespace-separated file. * Dispose of this with hubSearchTextFreeList(). */ struct hubSearchText *hubSearchTextLoadAllByChar(char *fileName, char chopper);