Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QueryIteratorITs #2708

Open
wants to merge 1 commit into
base: integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ protected Iterator<Entry<Key,Document>> getEvaluation(NestedQueryIterator<Key> d
// get the function we use for the tf functionality. Note we are
// getting an additional source deep copy for this function
final Iterator<Tuple3<Key,Document,Map<String,Object>>> itrWithContext;
// TODO: this should be dynamic based on the query fields, not a flag passed to the iterator
if (this.isTermFrequenciesRequired()) {

TermFrequencyConfig tfConfig = new TermFrequencyConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ public Object visit(ASTAndNode and, Object data) {

// if we are not limiting the lookup, or not allowing term frequency lookup,
// or the field is index only but not in the term frequencies, then we must ivarate
// TODO: this logic is wrong, it will allow an ivarator against a TF field
if (!limitLookup || !allowTermFrequencyLookup || (indexOnlyFields.contains(identifier) && !termFrequencyFields.contains(identifier))) {
if (source instanceof ASTAndNode) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.junit.Before;

import datawave.query.iterator.QueryIteratorIT;
import datawave.query.iterator.QueryOptions;

/**
* AncestorQueryIterator integration tests. Ancestor Query should find any hits event query finds plus its own unique cases
Expand All @@ -14,6 +15,9 @@ public class AncestorQueryIteratorIT extends QueryIteratorIT {
public void setup() throws IOException {
super.setup();
iterator = new AncestorQueryIterator();

// adding the HIT_LIST option tells the query iterator to use a HitListArithmetic
options.put(QueryOptions.HIT_LIST, "true");
}

/**
Expand Down
Loading
Loading