748b06ac95ff2a3957be3845bd3594984e3cc3cf chmalee Wed Aug 17 19:21:48 2022 -0700 Rename test cgi to official name. Always search everything, only show categories that have matches in the result list. Add /search endpoint to hubApi, add code to search help docs in hgSuggest but don't call it yet in autoComplete.js. Minor fixups so search result links work correctly. Fixing up old programs that call hgPositionsFind diff --git src/hg/hubApi/dataApi.h src/hg/hubApi/dataApi.h index 6077f3e..27bb057 100644 --- src/hg/hubApi/dataApi.h +++ src/hg/hubApi/dataApi.h @@ -55,42 +55,45 @@ #define err429 429 #define err429Msg "Too Many Requests" #define err500 500 #define err500Msg "Internal Server Error" /* list of all potential arguments */ #define argHubUrl "hubUrl" #define argGenome "genome" #define argTrackLeavesOnly "trackLeavesOnly" #define argTrack "track" #define argChrom "chrom" #define argStart "start" #define argEnd "end" #define argMaxItemsOutput "maxItemsOutput" #define argJsonOutputArrays "jsonOutputArrays" +#define argCategories "categories" +#define argSearchTerm "search" /* valid argument listings to verify extraneous arguments * initialized in hubApi.c */ extern char *argListPublicHubs[]; extern char *argListUcscGenomes[]; extern char *argListHubGenomes[]; extern char *argListTracks[]; extern char *argListChromosomes[]; extern char *argListSchema[]; extern char *argGetDataTrack[]; extern char *argGetDataSequence[]; +extern char *argSearch[]; /* maximum number of words expected in PATH_INFO parsing * so far only using 2 */ #define MAX_PATH_INFO 32 /* maximum amount of DNA allowed in a get sequence request */ #define MAX_DNA_LENGTH 499999999 /* this size is directly related to the max limit in needMem used in * jsonWriteString */ extern long enteredMainTime; /* will become = clock1000() on entry */ /* limit amount of output to a maximum to avoid overload */ @@ -226,16 +229,22 @@ boolean isWiggleDataTable(char *type); /* is this a wiggle data track table */ /* ######################################################################### */ /* functions in getData.c */ void apiGetData(char *words[MAX_PATH_INFO]); /* 'getData' function, words[1] is the subCommand */ /* ######################################################################### */ /* functions in list.c */ void apiList(char *words[MAX_PATH_INFO]); /* 'list' function words[1] is the subCommand */ +/* ######################################################################### */ +/* functions in search.c */ + +void apiSearch(char *words[MAX_PATH_INFO]); +/* search function */ + #endif /* DATAAPH_H */