fix bug of measurement recommend of token6 complete op and token7 hierarchy recommend
This commit is contained in:
parent
f45f10507b
commit
8313b16dfe
|
|
@ -387,6 +387,10 @@ func handleLevelFuzzySearch(ctx context.Context, rdb *redis.Client, hierarchy co
|
|||
if searchInput == "" {
|
||||
var specificalKey string
|
||||
specificalKeyIndex := searchInputIndex - 1
|
||||
if hierarchy == constants.MeasTagRecommendHierarchyType {
|
||||
specificalKeyIndex = searchInputIndex - 2
|
||||
}
|
||||
|
||||
if specificalKeyIndex >= 0 {
|
||||
specificalKey = inputSlice[specificalKeyIndex]
|
||||
}
|
||||
|
|
@ -489,7 +493,6 @@ func runFuzzySearch(ctx context.Context, searchInput string, searchPrefix string
|
|||
}
|
||||
for searchInputLen != 0 {
|
||||
fuzzyInput := strings.Join([]string{comparePrefix, searchInput}, ".")
|
||||
results, err := ac.SuggestOpts(searchInput, redisearch.SuggestOptions{
|
||||
results, err := ac.SuggestOpts(fuzzyInput, redisearch.SuggestOptions{
|
||||
Num: math.MaxInt16,
|
||||
Fuzzy: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue