Skip to content

Commit

Permalink
Fix SORTABLE argument issue in FT.CREATE command (#3584)
Browse files Browse the repository at this point in the history
All I know these changes have been enough to pass all redis-om-spring tests in redis/redis-om-spring#357
  • Loading branch information
sazzad16 authored Oct 15, 2023
1 parent c7b820a commit 8d5aa3c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ public void addParams(CommandArguments args) {
args.add(SEPARATOR).add(separator);
}

if (caseSensitive) {
args.add(CASESENSITIVE);
}

if (withSuffixTrie) {
args.add(WITHSUFFIXTRIE);
}

if (sortableUNF) {
args.add(SORTABLE).add(UNF);
} else if (sortable) {
Expand All @@ -115,13 +123,5 @@ public void addParams(CommandArguments args) {
if (noIndex) {
args.add(NOINDEX);
}

if (caseSensitive) {
args.add(CASESENSITIVE);
}

if (withSuffixTrie) {
args.add(WITHSUFFIXTRIE);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,29 +107,30 @@ public void addParams(CommandArguments args) {
args.addParams(fieldName);
args.add(TEXT);

if (sortableUNF) {
args.add(SORTABLE).add(UNF);
} else if (sortable) {
args.add(SORTABLE);
if (weight != null) {
args.add(WEIGHT).add(weight);
}

if (noStem) {
args.add(NOSTEM);
}
if (noIndex) {
args.add(NOINDEX);
}

if (phoneticMatcher != null) {
args.add(PHONETIC).add(phoneticMatcher);
}

if (weight != null) {
args.add(WEIGHT).add(weight);
}

if (withSuffixTrie) {
args.add(WITHSUFFIXTRIE);
}

if (sortableUNF) {
args.add(SORTABLE).add(UNF);
} else if (sortable) {
args.add(SORTABLE);
}

if (noIndex) {
args.add(NOINDEX);
}
}
}

0 comments on commit 8d5aa3c

Please sign in to comment.