a345d17f7912a5f0e121951f6d261b496cce608b
braney
  Fri May 10 09:25:54 2013 -0700
first cut at track item search in track hubs that have bigBed files with a searchIndex field refs #10426
diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c
index 17b93e6..957dd75 100644
--- src/hg/lib/hgFind.c
+++ src/hg/lib/hgFind.c
@@ -3100,51 +3100,55 @@
 else
     {
     struct hgFindSpec *shortList = NULL, *longList = NULL;
     struct hgFindSpec *hfs;
     boolean done = FALSE;
 
     // Disable singleBaseSpec for any term that is not hgOfficialChromName
     // because that mangles legitimate IDs that are [A-Z]:[0-9]+.
     if (singleBaseSpec)
 	{
 	singleBaseSpec = relativeFlag = FALSE;
 	term = sqlEscapeString(originalTerm);
 	relStart = relEnd = 0;
 	}
 
+    if (!trackHubDatabase(db))
     hgFindSpecGetAllSpecs(db, &shortList, &longList);
     for (hfs = shortList;  hfs != NULL;  hfs = hfs->next)
 	{
 	if (hgFindUsingSpec(db, hfs, term, hgp, relativeFlag, relStart, relEnd,
 			    multiTerm))
 	    {
 	    done = TRUE;
 	    if (! hgFindSpecSetting(hfs, "semiShortCircuit"))
 		break;
 	    }
 	}
     if (! done)
 	{
 	for (hfs = longList;  hfs != NULL;  hfs = hfs->next)
 	    {
 	    hgFindUsingSpec(db, hfs, term, hgp, relativeFlag, relStart, relEnd,
 			    multiTerm);
 	    }
 	/* Lowe lab additions -- would like to replace these with specs, but 
 	 * will leave in for now. */
+	if (!trackHubDatabase(db))
 	findTigrGenes(db, term, hgp);
+
+	trackHubFindPos(db, term, hgp);
 	}
     hgFindSpecFreeList(&shortList);
     hgFindSpecFreeList(&longList);
     if(hgpMatchNames == NULL)
 	hgpMatchNames = newDyString(256);
     for(hgpItem = hgp; hgpItem != NULL; hgpItem = hgpItem->next)
 	{
 	struct hgPosTable *hpTable = NULL;
 	for(hpTable = hgpItem->tableList; hpTable != NULL; hpTable = hpTable->next)
 	    {
 	    struct hgPos *pos = NULL;
 	    for(pos = hpTable->posList; pos != NULL; pos = pos->next)
 		{
 		dyStringPrintf(hgpMatchNames, "%s,", pos->browserName);
 		}