ae58fc2850911b1d1fbaf842aed88d22c2776640
angie
  Fri Feb 12 12:59:23 2016 -0800
Adding a third search mode to trixSearch(), for less stringent searches such as autocomplete.
The first two modes were previously designated by a boolean expand -- now there is an enum
trixSearchMode whose first two values correspond to that (expand==FALSE = tsmExact,
expand==TRUE = tsmExpand).  The third mode, tsmFirstFive, returns matches of five or more
characters even if there are many characters left in a long word.  For example, "arabi" will
match "arabidopsis" in tsmFirstFive mode, but not in tsmExpand mode because that leaves six
unmatched letters after "arabi".

diff --git src/hg/hgFileSearch/hgFileSearch.c src/hg/hgFileSearch/hgFileSearch.c
index 3b6e6b2..8a5abe6 100644
--- src/hg/hgFileSearch/hgFileSearch.c
+++ src/hg/hgFileSearch/hgFileSearch.c
@@ -102,31 +102,31 @@
     return TRUE;
     }
 
 //warn("No composites found");
 dyStringFree(&dyComposites);
 return FALSE;
 }
 
 #ifdef USE_TABS
 static struct slRef *simpleSearchForTdbs(struct trix *trix,char **descWords,int descWordCount)
 // Performs the simple search and returns the found tracks.
 {
 struct slRef *foundTdbs = NULL;
 
 struct trixSearchResult *tsList;
-for (tsList = trixSearch(trix, descWordCount, descWords, TRUE);
+for (tsList = trixSearch(trix, descWordCount, descWords, tsmExpand);
      tsList != NULL;
      tsList = tsList->next)
     {
     struct trackDb *tdb = (struct track *) hashFindVal(trackHash, tsList->itemId);
     if (track != NULL)  // It is expected that this is NULL 
         {               // (e.g. when the trix references trackDb tracks which have no tables)
         refAdd(&foundTdbs, tdb);
         }
     }
 return foundTdbs;
 }
 #endif///def USE_TABS
 
 struct slName *tdbListGetGroups(struct trackDb *tdbList)
 // Returns a list of groups found in the tdbList