27aa980683134b5ff14cbaf5bdcbe563eb4af207
tdreszer
  Wed Apr 6 08:19:34 2011 -0700
Moved common name and description matching code into search lib and removed it from hgFileSearch and hgTracks/searchTracks.c
diff --git src/hg/inc/search.h src/hg/inc/search.h
index b5d242d..2945512 100644
--- src/hg/inc/search.h
+++ src/hg/inc/search.h
@@ -32,16 +32,26 @@
 boolean isSearchTracksSupported(char *database, struct cart *cart);
 // Return TRUE if searchTracks is supported for this database and javascript is supported too
 
 struct slPair *fileFormatSearchWhiteList(void);
 // Gets the whitelist of approved file formats that is allowed for search
 
 char *fileFormatSelectHtml(char *name, char *selected, char *extraHtml);
 // returns an allocated string of HTML for the fileType select drop down
 
 struct slPair *mdbSelectPairs(struct cart *cart,enum searchTab selectedTab, struct slPair *mdbVars);
 // Returns the current mdb  vars and vals in the table of drop down selects
 
 char *mdbSelectsHtmlRows(struct sqlConnection *conn,struct slPair *mdbSelects, struct slPair *mdbVars,int cols,boolean fileSearch);
 // generates the html for the table rows containing mdb var and val selects.  Assume tableSearch unless fileSearch
 
+boolean searchNameMatches(struct trackDb *tdb, struct slName *wordList);
+// returns TRUE if all words in preparsed list matches short or long label
+// A "word" can be "multiple words" (parsed from quoteed string).
+
+boolean searchDescriptionMatches(struct trackDb *tdb, struct slName *wordList);
+// returns TRUE if all words in preparsed list matches html description page.
+// A "word" can be "multiple words" (parsed from quoteed string).
+// Because description contains html, quoted string match has limits.
+// DANGER: this will alter html of tdb struct (replacing \n with ' ', so the html should not be displayed after.
+
 #endif /* SEARCH_H */