a019cec925f0e902a6eb2ddeb781dd549c7e9406 chmalee Fri Mar 5 15:54:25 2021 -0800 Add public track hub results to track search, refs #26179 diff --git src/hg/inc/hubSearchText.h src/hg/inc/hubSearchText.h index 9d98def..2a8fc4e 100644 --- src/hg/inc/hubSearchText.h +++ src/hg/inc/hubSearchText.h @@ -66,17 +66,33 @@ #define hubSearchTextTabOut(el,f) hubSearchTextOutput(el,f,'\t','\n'); /* Print out hubSearchText as a line in a tab-separated file. */ #define hubSearchTextCommaOut(el,f) hubSearchTextOutput(el,f,',',','); /* Print out hubSearchText as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ struct hubSearchText *hubSearchTextLoadWithNullGiveContext(char **row, char *searchTerms); /* Load a hubSearchText from row fetched with select * from hubSearchText * from database, but instead of loading the entire text field for long text results, * only load the pieces that provide context for the supplied searchTerms. * Dispose of this with hubSearchTextFree(). */ +char *modifyTermsForHubSearch(char *hubSearchTerms, bool isStrictSearch); +/* This won't exactly be pretty. MySQL treats any sequence of alphanumerics and underscores + * as a word, and single apostrophes are allowed as long as they don't come back-to-back. + * Cut down to those characters, then add initial + (for requiring word) and * (for word + * expansion) as appropriate. */ + +void getHubSearchResults(struct sqlConnection *conn, char *hubSearchTableName, + char *hubSearchTerms, bool checkLongText, char *dbFilter, struct hash *hubLookup, + struct hash **searchResultHashRet, struct slName **hubsToPrintRet, char *extra); +/* Find hubs, genomes, and tracks that match the provided search terms. + * Return all hits that satisfy the (optional) supplied assembly filter. + * if checkLongText is FALSE, skip searching within the long description text entries + * extra contains optional caller specific mysql filtering*/ + +char *hubSearchTextTableName(); + #endif /* HUBSEARCHTEXT_H */