Don't allow empty words
This commit is contained in:
parent
3cb9ab9eff
commit
816ed5722b
1 changed files with 6 additions and 1 deletions
|
@ -381,7 +381,12 @@ public class BinaryMapPoiReaderAdapter {
|
|||
int length = readInt();
|
||||
int oldLimit = codedIS.pushLimit(length);
|
||||
offset = codedIS.getTotalBytesRead();
|
||||
List<String> queries = Arrays.asList(query.split(" "));
|
||||
List<String> queries = new ArrayList<>();
|
||||
for (String word : query.split(" ")) {
|
||||
if (word.trim().length() > 0) {
|
||||
queries.add(word.trim());
|
||||
}
|
||||
}
|
||||
TIntArrayList charsList = new TIntArrayList(queries.size());
|
||||
listOffsets = new ArrayList<TIntArrayList>(queries.size());
|
||||
while(listOffsets.size() < queries.size()) {
|
||||
|
|
Loading…
Reference in a new issue