Commit 0ebb3a53 authored by Custom2043's avatar Custom2043
Browse files

Fix token build

parent 07b00196
...@@ -111,7 +111,8 @@ public class TokenBuilder extends Builder ...@@ -111,7 +111,8 @@ public class TokenBuilder extends Builder
for (Search s : searchesWithIgnore) for (Search s : searchesWithIgnore)
{ {
if (s != this.ignore.getRealSearch()) if (s instanceof ArraySearch) if (s != this.ignore.getRealSearch())
if (s instanceof ArraySearch)
{ {
Result[] array = results[position].getArray(); Result[] array = results[position].getArray();
Search[] toSearchIn; Search[] toSearchIn;
...@@ -126,12 +127,10 @@ public class TokenBuilder extends Builder ...@@ -126,12 +127,10 @@ public class TokenBuilder extends Builder
resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()]))); resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()])));
} }
else if (s instanceof OrSearch) else if (s instanceof OrSearch || s instanceof TokenSearch)
resultWithoutIgnore.add(results[1]); resultWithoutIgnore.add(results[position]);
else if (s instanceof MultipleSearch) else if (s instanceof MultipleSearch)
resultWithoutIgnore.add(new Result(results[position].getSearch(), this.getResultWithoutIgnores(results[position].getArray(), ((MultipleSearch) s).getSearches()))); resultWithoutIgnore.add(new Result(results[position].getSearch(), this.getResultWithoutIgnores(results[position].getArray(), ((MultipleSearch) s).getSearches())));
else
resultWithoutIgnore.add(results[position]);
position ++; position ++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment