prepare more efficient query completion
adding an index that answers the question given a query "a=b and c=", what are possible values for c.
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.TreeSet;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.lucares.collections.IntList;
|
||||
import org.lucares.collections.LongList;
|
||||
import org.lucares.utils.byteencoder.VariableByteEncoder;
|
||||
|
||||
@@ -156,6 +157,14 @@ public class Tags implements Comparable<Tags> {
|
||||
return result;
|
||||
}
|
||||
|
||||
public IntList getKeysAsInt() {
|
||||
final IntList result = new IntList();
|
||||
for (final Tag tag : tags) {
|
||||
result.add(tag.getKey());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<Tag> toTags() {
|
||||
return Collections.unmodifiableList(tags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user