// Find searches through complete transaction indices for a specified
// query string. All indices that queried are in the form of tries.
Find searches through complete transaction indices for a specified
query string. All indices that queried are in the form of tries.
// Find searches through complete transaction indices for a specified // query string . All indices that queried are in the form of tries .
func (m *Indexer) Find(query string, max int) (results []string) {
	if max > 0 {
		results = make([]string, 0, max)
	}
	cb := func(a string, _ interface{}) bool {
		if max > 0 && len(results) >= max {
			return false
		}
		results = append(results, a)
		return true
	}
	if query != "" {
		m.WalkPrefix(query, cb)
	} else {
		m.Walk(cb)
	}
	return results
}
func ( m * Indexer ) Find ( query string , max int ) ( results [ ] string ) { if max > 0 { results = make ( [ ] string , 0 , max ) } cb := func ( a string , _ interface { } ) bool { if max > 0 && len ( results ) >= max { return false } results = append ( results , a ) return true } if query != " " { m . WalkPrefix ( query , cb ) } else { m . Walk ( cb ) } return results }
Find searches through complete transaction indices for a specified
query string.
Find searches through complete transaction indices for a specified query string .