diff --git a/warehouse/query-core/src/main/java/datawave/query/QueryParameters.java b/warehouse/query-core/src/main/java/datawave/query/QueryParameters.java index 66b3fa47b2..3add61588f 100644 --- a/warehouse/query-core/src/main/java/datawave/query/QueryParameters.java +++ b/warehouse/query-core/src/main/java/datawave/query/QueryParameters.java @@ -214,7 +214,7 @@ public class QueryParameters { /** * Used to specify summaries that should be returned. */ - public static final String SUMMARY_SIZE = "summary.size"; + public static final String SUMMARY_OPTIONS = "summary.options"; /** * Used to specify model or DB fields that should be treated as lenient (can be skipped if normalization fails) diff --git a/warehouse/query-core/src/main/java/datawave/query/attributes/SummaryOptions.java b/warehouse/query-core/src/main/java/datawave/query/attributes/SummaryOptions.java new file mode 100644 index 0000000000..6042a55977 --- /dev/null +++ b/warehouse/query-core/src/main/java/datawave/query/attributes/SummaryOptions.java @@ -0,0 +1,213 @@ +package datawave.query.attributes; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Objects; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import datawave.query.Constants; +import datawave.query.postprocessing.tf.PhraseIndexes; + +/** + * Represents options for a summary that have been specified within an #SUMMARY_SIZE function. An instance of {@link SummaryOptions} can easily be captured as a + * parameter string using {@link SummaryOptions#toString()}, and transformed back into a {@link SummaryOptions} instance via + * {@link SummaryOptions#from(String)}. + */ +public class SummaryOptions implements Serializable { + + private static final long serialVersionUID = 6769159729743311079L; + + private static final Logger log = LoggerFactory.getLogger(SummaryOptions.class); + + public static final String SIZE_PARAMETER = "SIZE"; + public static final String VIEWS_PARAMETER = "VIEWS"; + + private static final int DEFAULT_SIZE = 150; + + private int summarySize; + private ArrayList viewNamesList; + private boolean only; + + public SummaryOptions() { + summarySize = 0; + viewNamesList = new ArrayList<>(); + only = false; + } + + /** + * Returns a new {@link SummaryOptions} parsed from the string. The provided string is expected to have the format returned by + * {@link SummaryOptions#toString()}. + * + * + * @param string + * the string to parse + * @return the parsed {@link SummaryOptions} + */ + @JsonCreator + public static SummaryOptions from(String string) { + if (string == null) { + return null; + } + // Strip whitespaces. + string = PhraseIndexes.whitespacePattern.matcher(string).replaceAll(""); + + SummaryOptions summaryOptions = new SummaryOptions(); + + // if passed no parameters, return of summary of default size + if (string.isBlank()) { + summaryOptions.summarySize = DEFAULT_SIZE; + return summaryOptions; + } + + try { + // split on / to get the separate options + String[] parameterParts = string.split(Constants.FORWARD_SLASH); + + // go through each option and try to set them + for (String parameterPart : parameterParts) { + // for options that are "key:value", split on colon to get the key + String[] parts = parameterPart.split(Constants.COLON); + // if we have the "size" option... + if (parts[0].equalsIgnoreCase(SIZE_PARAMETER)) { + summaryOptions.summarySize = Integer.parseInt(parts[1]); + } + // if we have the "only" option... + else if (parts[0].equalsIgnoreCase("ONLY")) { + summaryOptions.only = true; + } + // if we have the "views" option... + else if (parts[0].equalsIgnoreCase(VIEWS_PARAMETER)) { + // the view names are split by commas. split them, uppercase them, then add the to the list. + String[] names = parts[1].split(Constants.COMMA); + for (String name : names) { + summaryOptions.viewNamesList.add(name.toUpperCase()); + } + } + } + } catch (Exception e) { + log.warn("Unable to parse summary size string, returning empty SummaryOptions: {}", string, e); + return new SummaryOptions(); + } + + return summaryOptions; + } + + /** + * Returns a copy of the given {@link SummaryOptions} + * + * @param other + * the instance to copy + * @return the copy + */ + public static SummaryOptions copyOf(SummaryOptions other) { + if (other == null) { + return null; + } + SummaryOptions summaryOptions = new SummaryOptions(); + summaryOptions.summarySize = other.summarySize; + summaryOptions.viewNamesList = new ArrayList<>(other.viewNamesList); + summaryOptions.only = other.only; + return summaryOptions; + } + + public int getSummarySize() { + return summarySize; + } + + public boolean onlyListedViews() { + return only; + } + + /** + * Replace a view name with another view name + * + * @param viewName + * the one to replace + * @param replacement + * the one to replace the other + */ + public void replace(String viewName, String replacement) { + int index = viewNamesList.indexOf(viewName); + if (index != -1) { + viewNamesList.set(index, replacement); + } + } + + /** + * Return whether this {@link SummaryOptions} view names list is empty. + * + * @return true if empty, or false otherwise + */ + public boolean isEmpty() { + return viewNamesList.isEmpty(); + } + + public String viewNamesListToString() { + if (viewNamesList.isEmpty()) { + return ""; + } + + StringBuilder sb = new StringBuilder(); + for (String viewName : viewNamesList) { + sb.append(viewName).append(Constants.COMMA); + } + return sb.substring(0, sb.length() - 1); + } + + public static String[] viewNamesListFromString(String string) { + return string.split(Constants.COMMA); + } + + /** + * Returns this {@link SummaryOptions} as a formatted string that can later be parsed back into a {@link SummaryOptions} using + * {@link SummaryOptions#from(String)}. This is also what will be used when serializing a {@link SummaryOptions} to JSON/XML. The string will have the + * format {@code SIZE:size/[only]/[NAMES:contentName1, contentName2, ....]}. + * + * @return a formatted string + */ + @JsonValue + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(SIZE_PARAMETER).append(":").append(summarySize); + if (only) { + sb.append("/").append("ONLY"); + } + if (!viewNamesList.isEmpty()) { + sb.append("/").append(VIEWS_PARAMETER).append(":"); + for (String viewName : viewNamesList) { + sb.append(viewName).append(Constants.COMMA); + } + return sb.substring(0, sb.length() - 1); + } + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SummaryOptions that = (SummaryOptions) o; + return Objects.equals(summarySize, that.summarySize) && Objects.equals(viewNamesList, that.viewNamesList) && Objects.equals(only, that.only); + } + + @Override + public int hashCode() { + return Objects.hash(summarySize, viewNamesList, only); + } +} diff --git a/warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java b/warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java deleted file mode 100644 index d827e4cad4..0000000000 --- a/warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java +++ /dev/null @@ -1,201 +0,0 @@ -package datawave.query.attributes; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Objects; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -import datawave.query.Constants; -import datawave.query.postprocessing.tf.PhraseIndexes; - -/** - * Represents options for a summary that have been specified within an #SUMMARY_SIZE function. An instance of {@link SummarySize} can easily be captured as a - * parameter string using {@link SummarySize#toString()}, and transformed back into a {@link SummarySize} instance via {@link SummarySize#from(String)}. - */ -public class SummarySize implements Serializable { - - private static final long serialVersionUID = 6769159729743311079L; - - private static final Logger log = LoggerFactory.getLogger(SummarySize.class); - - public static final String SIZE_PARAMETER = "SIZE"; - public static final String VIEWS_PARAMETER = "VIEWS"; - - private static final int DEFAULT_SIZE = 150; - - private int summarySize; - private ArrayList contentNamesList; - private boolean only; - - public SummarySize() { - summarySize = 0; - contentNamesList = new ArrayList<>(); - only = false; - } - - /** - * Returns a new {@link SummarySize} parsed from the string. The provided string is expected to have the format returned by {@link SummarySize#toString()}. - * - * - * @param string - * the string to parse - * @return the parsed {@link SummarySize} - */ - @JsonCreator - public static SummarySize from(String string) { - if (string == null) { - return null; - } - // Strip whitespaces. - string = PhraseIndexes.whitespacePattern.matcher(string).replaceAll(""); - - SummarySize summarySize = new SummarySize(); - - if (string.isBlank()) { - summarySize.summarySize = DEFAULT_SIZE; - return summarySize; - } - - try { - String[] parameterParts = string.split(Constants.FORWARD_SLASH); - - for (String parameterPart : parameterParts) { - String[] parts = parameterPart.split(Constants.COLON); - if (parts[0].equalsIgnoreCase(SIZE_PARAMETER)) { - summarySize.summarySize = Integer.parseInt(parts[1]); - } else if (parts[0].equalsIgnoreCase("ONLY")) { - summarySize.only = true; - } else if (parts[0].equalsIgnoreCase(VIEWS_PARAMETER)) { - String[] names = parts[1].split(Constants.COMMA); - for (String name : names) { - summarySize.contentNamesList.add(name.toUpperCase()); - } - } - } - } catch (Exception e) { - log.warn("Unable to parse summary size string: {}", string, e); - return new SummarySize(); - } - - return summarySize; - } - - /** - * Returns a copy of the given {@link SummarySize} - * - * @param other - * the instance to copy - * @return the copy - */ - public static SummarySize copyOf(SummarySize other) { - if (other == null) { - return null; - } - SummarySize summarySize = new SummarySize(); - summarySize.summarySize = other.summarySize; - summarySize.contentNamesList = new ArrayList<>(other.contentNamesList); - summarySize.only = other.only; - return summarySize; - } - - public int getSummarySize() { - return summarySize; - } - - public boolean onlyListedContents() { - return only; - } - - /** - * Replace a content name with another content name - * - * @param contentName - * the one to replace - * @param replacement - * the one to replace the other - */ - public void replace(String contentName, String replacement) { - int index = contentNamesList.indexOf(contentName); - if (index != -1) { - contentNamesList.set(index, replacement); - } - } - - /** - * Return whether this {@link SummarySize} content names list is empty. - * - * @return true if empty, or false otherwise - */ - public boolean isEmpty() { - return contentNamesList.isEmpty(); - } - - public String contentNamesListToString() { - if (contentNamesList.isEmpty()) { - return ""; - } - - StringBuilder sb = new StringBuilder(); - for (String contentName : contentNamesList) { - sb.append(contentName).append(Constants.COMMA); - } - return sb.substring(0, sb.length() - 1); - } - - public static String[] contentNamesListFromString(String string) { - return string.split(Constants.COMMA); - } - - /** - * Returns this {@link SummarySize} as a formatted string that can later be parsed back into a {@link SummarySize} using {@link SummarySize#from(String)}. - * This is also what will be used when serializing a {@link SummarySize} to JSON/XML. The string will have the format - * {@code SIZE:size/[only]/[NAMES:contentName1, contentName2, ....]}. - * - * @return a formatted string - */ - @JsonValue - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(SIZE_PARAMETER).append(":").append(summarySize); - if (only) { - sb.append("/").append("ONLY"); - } - if (!contentNamesList.isEmpty()) { - sb.append("/").append(VIEWS_PARAMETER).append(":"); - for (String contentName : contentNamesList) { - sb.append(contentName).append(Constants.COMMA); - } - return sb.substring(0, sb.length() - 1); - } - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SummarySize that = (SummarySize) o; - return Objects.equals(summarySize, that.summarySize) && Objects.equals(contentNamesList, that.contentNamesList) && Objects.equals(only, that.only); - } - - @Override - public int hashCode() { - return Objects.hash(summarySize, contentNamesList, only); - } -} diff --git a/warehouse/query-core/src/main/java/datawave/query/config/ShardQueryConfiguration.java b/warehouse/query-core/src/main/java/datawave/query/config/ShardQueryConfiguration.java index 700ccb0911..ad692d5286 100644 --- a/warehouse/query-core/src/main/java/datawave/query/config/ShardQueryConfiguration.java +++ b/warehouse/query-core/src/main/java/datawave/query/config/ShardQueryConfiguration.java @@ -47,7 +47,7 @@ import datawave.query.DocumentSerialization.ReturnType; import datawave.query.QueryParameters; import datawave.query.attributes.ExcerptFields; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.attributes.UniqueFields; import datawave.query.common.grouping.GroupFields; import datawave.query.function.DocumentPermutation; @@ -440,7 +440,7 @@ public class ShardQueryConfiguration extends GenericQueryConfiguration implement // The class for the excerpt iterator private Class> excerptIterator = TermFrequencyExcerptIterator.class; - private SummarySize summarySize = new SummarySize(); + private SummaryOptions summaryOptions = new SummaryOptions(); // The class for the summary iterator private Class> summaryIterator = DColumnSummaryIterator.class; @@ -741,7 +741,7 @@ public void copyFrom(ShardQueryConfiguration other) { this.setStrictFields(other.getStrictFields()); this.setExcerptFields(ExcerptFields.copyOf(other.getExcerptFields())); this.setExcerptIterator(other.getExcerptIterator()); - this.setSummarySize(SummarySize.copyOf(other.getSummarySize())); + this.setSummaryOptions(SummaryOptions.copyOf(other.getSummaryOptions())); this.setSummaryIterator(other.getSummaryIterator()); this.setFiFieldSeek(other.getFiFieldSeek()); this.setFiNextSeek(other.getFiNextSeek()); @@ -2620,13 +2620,13 @@ public void setExcerptIterator(Class this.excerptIterator = excerptIterator; } - public SummarySize getSummarySize() { - return summarySize; + public SummaryOptions getSummaryOptions() { + return summaryOptions; } - public void setSummarySize(SummarySize summarySize) { - if (summarySize != null) { - this.summarySize = summarySize; + public void setSummaryOptions(SummaryOptions summaryOptions) { + if (summaryOptions != null) { + this.summaryOptions = summaryOptions; } } @@ -3017,7 +3017,7 @@ public boolean equals(Object o) { Objects.equals(getLenientFields(), that.getLenientFields()) && Objects.equals(getStrictFields(), that.getStrictFields()) && Objects.equals(getExcerptFields(), that.getExcerptFields()) && - Objects.equals(getSummarySize(), that.getSummarySize()) && + Objects.equals(getSummaryOptions(), that.getSummaryOptions()) && getFiFieldSeek() == that.getFiFieldSeek() && getFiNextSeek() == that.getFiNextSeek() && getEventFieldSeek() == that.getEventFieldSeek() && @@ -3223,7 +3223,7 @@ public int hashCode() { getLenientFields(), getStrictFields(), getExcerptFields(), - getSummarySize(), + getSummaryOptions(), getFiFieldSeek(), getFiNextSeek(), getEventFieldSeek(), diff --git a/warehouse/query-core/src/main/java/datawave/query/iterator/QueryIterator.java b/warehouse/query-core/src/main/java/datawave/query/iterator/QueryIterator.java index abf918f895..d55cc073c0 100644 --- a/warehouse/query-core/src/main/java/datawave/query/iterator/QueryIterator.java +++ b/warehouse/query-core/src/main/java/datawave/query/iterator/QueryIterator.java @@ -1634,11 +1634,11 @@ protected ExcerptTransform getExcerptTransform() { } protected SummaryTransform getSummaryTransform() { - if (summaryTransform == null && getSummarySize() != null && getSummarySize().getSummarySize() != 0) { - synchronized (getSummarySize()) { + if (summaryTransform == null && getSummaryOptions() != null && getSummaryOptions().getSummarySize() != 0) { + synchronized (getSummaryOptions()) { if (summaryTransform == null) { try { - summaryTransform = new SummaryTransform(summarySize, myEnvironment, sourceForDeepCopies.deepCopy(myEnvironment), + summaryTransform = new SummaryTransform(summaryOptions, myEnvironment, sourceForDeepCopies.deepCopy(myEnvironment), summaryIterator.getDeclaredConstructor().newInstance()); } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new RuntimeException("Could not create summary transform", e); diff --git a/warehouse/query-core/src/main/java/datawave/query/iterator/QueryOptions.java b/warehouse/query-core/src/main/java/datawave/query/iterator/QueryOptions.java index 7c46b7fcdf..3e110543a9 100644 --- a/warehouse/query-core/src/main/java/datawave/query/iterator/QueryOptions.java +++ b/warehouse/query-core/src/main/java/datawave/query/iterator/QueryOptions.java @@ -61,7 +61,7 @@ import datawave.query.DocumentSerialization; import datawave.query.attributes.Document; import datawave.query.attributes.ExcerptFields; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.attributes.UniqueFields; import datawave.query.common.grouping.GroupFields; import datawave.query.composite.CompositeMetadata; @@ -261,7 +261,7 @@ public class QueryOptions implements OptionDescriber { public static final String EXCERPT_ITERATOR = "excerpt.iterator.class"; - public static final String SUMMARY_SIZE = "summary.size"; + public static final String SUMMARY_OPTIONS = "summary.options"; public static final String SUMMARY_ITERATOR = "summary.iterator.class"; @@ -437,7 +437,7 @@ public class QueryOptions implements OptionDescriber { protected Class> excerptIterator = TermFrequencyExcerptIterator.class; - protected SummarySize summarySize; + protected SummaryOptions summaryOptions; protected Class> summaryIterator = DColumnSummaryIterator.class; @@ -559,7 +559,7 @@ public void deepCopy(QueryOptions other) { this.excerptFields = other.excerptFields; this.excerptFieldsNoHitCallout = other.excerptFieldsNoHitCallout; this.excerptIterator = other.excerptIterator; - this.summarySize = other.summarySize; + this.summaryOptions = other.summaryOptions; this.summaryIterator = other.summaryIterator; this.fiFieldSeek = other.fiFieldSeek; @@ -1279,12 +1279,12 @@ public void setExcerptIterator(Class this.excerptIterator = excerptIterator; } - public SummarySize getSummarySize() { - return summarySize; + public SummaryOptions getSummaryOptions() { + return summaryOptions; } - public void setSummarySize(SummarySize summarySize) { - this.summarySize = summarySize; + public void setSummaryOptions(SummaryOptions summaryOptions) { + this.summaryOptions = summaryOptions; } public Class> getSummaryIterator() { @@ -1388,7 +1388,7 @@ public IteratorOptions describeOptions() { options.put(EXCERPT_FIELDS, "excerpt fields"); options.put(EXCERPT_FIELDS_NO_HIT_CALLOUT, "excerpt fields no hit callout"); options.put(EXCERPT_ITERATOR, "excerpt iterator class (default datawave.query.iterator.logic.TermFrequencyExcerptIterator"); - options.put(SUMMARY_SIZE, "The size of the summary to return with possible options (ONLY) and list of contentNames"); + options.put(SUMMARY_OPTIONS, "The size of the summary to return with possible options (ONLY) and list of contentNames"); options.put(SUMMARY_ITERATOR, "summary iterator class (default datawave.query.iterator.logic.DColumnSummaryIterator"); options.put(FI_FIELD_SEEK, "The number of fields traversed by a Field Index data filter or aggregator before a seek is issued"); options.put(FI_NEXT_SEEK, "The number of next calls made by a Field Index data filter or aggregator before a seek is issued"); @@ -1896,8 +1896,8 @@ public boolean validateOptions(Map options) { } } - if (options.containsKey(SUMMARY_SIZE)) { - setSummarySize(SummarySize.from(options.get(SUMMARY_SIZE))); + if (options.containsKey(SUMMARY_OPTIONS)) { + setSummaryOptions(SummaryOptions.from(options.get(SUMMARY_OPTIONS))); } if (options.containsKey(SUMMARY_ITERATOR)) { diff --git a/warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java b/warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java index 3f2f316f01..0a54196464 100644 --- a/warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java +++ b/warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java @@ -25,7 +25,7 @@ import org.slf4j.LoggerFactory; import datawave.query.Constants; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.table.parser.ContentKeyValueFactory; /** @@ -38,20 +38,20 @@ public class DColumnSummaryIterator implements SortedKeyValueIterator public static final String SUMMARY_SIZE = "summary.size"; - public static final String CONTENT_NAMES = "content.names"; + public static final String VIEW_NAMES = "view.names"; public static final String ONLY_SPECIFIED = "only.specified"; /** - * A list of content names to potentially create a summary for. The closer to the front in the list, the higher the priority to get a summary for that - * content + * A list of view names to potentially create a summary for. The closer to the front in the list, the higher the priority to get a summary for that + * view */ - protected final ArrayList contentSummaryOrder = new ArrayList<>(); + protected final ArrayList viewSummaryOrder = new ArrayList<>(); /** the size in bytes of the summary to create */ protected int summarySize; - /** if we will only look at the content names specified in the query */ + /** if we will only look at the view names specified in the query */ protected boolean onlySpecified; /** the underlying source */ @@ -88,7 +88,7 @@ public SortedKeyValueIterator deepCopy(IteratorEnvironment env) { public void init(SortedKeyValueIterator source, Map options, IteratorEnvironment env) throws IOException { this.source = source; - contentSummaryOrder.addAll(List.of("CONTENT", "CONTENT1")); + viewSummaryOrder.addAll(List.of("CONTENT", "CONTENT1")); if (options.containsKey(SUMMARY_SIZE)) { this.summarySize = Math.max(1, Math.min(Integer.parseInt(options.get(SUMMARY_SIZE)), 1500)); @@ -96,23 +96,23 @@ public void init(SortedKeyValueIterator source, Map op this.summarySize = 150; } - // if "ONLY" we will clear the content names list so that we only use the ones passed in + // if "ONLY" we will clear the view names list so that we only use the ones passed in if (options.containsKey(ONLY_SPECIFIED)) { onlySpecified = Boolean.parseBoolean(options.get(ONLY_SPECIFIED)); if (onlySpecified) { - contentSummaryOrder.clear(); + viewSummaryOrder.clear(); } } else { onlySpecified = false; } - // add the content names to the list in the order specified - if (options.containsKey(CONTENT_NAMES)) { - String[] nameList = SummarySize.contentNamesListFromString(options.get(CONTENT_NAMES)); + // add the view names to the list in the order specified + if (options.containsKey(VIEW_NAMES)) { + String[] nameList = SummaryOptions.viewNamesListFromString(options.get(VIEW_NAMES)); for (int i = nameList.length - 1; i >= 0; i--) { String name = nameList[i]; - contentSummaryOrder.remove(name); - contentSummaryOrder.add(0, name); + viewSummaryOrder.remove(name); + viewSummaryOrder.add(0, name); } } } @@ -241,18 +241,18 @@ public void next() throws IOException { while (source.hasTop() && dtUid.equals(getDtUidFromDKey(source.getTopKey()))) { top = source.getTopKey(); - // get the content name - String currentContentName = getContentName(top); + // get the view name + String currentViewName = getViewName(top); - for (String name : contentSummaryOrder) { + for (String name : viewSummaryOrder) { if (name.endsWith("*")) { name = name.substring(0, name.length() - 1); - if (currentContentName.startsWith(name)) { - foundContent.put(currentContentName, source.getTopValue().get()); + if (currentViewName.startsWith(name)) { + foundContent.put(currentViewName, source.getTopValue().get()); } } else { - if (currentContentName.equalsIgnoreCase(name)) { - foundContent.put(currentContentName, source.getTopValue().get()); + if (currentViewName.equalsIgnoreCase(name)) { + foundContent.put(currentViewName, source.getTopValue().get()); } } } @@ -262,7 +262,7 @@ public void next() throws IOException { } // create the summary - String summary = createSummary(contentSummaryOrder, foundContent, summarySize); + String summary = createSummary(viewSummaryOrder, foundContent, summarySize); if (summary != null) { tk = new Key(top.getRow(), new Text(dtUid), new Text(summary), top.getColumnVisibility()); tv = new Value(); @@ -275,23 +275,23 @@ public void next() throws IOException { } /** - * this method attempts to create a summary out of the found contents + * this method attempts to create a summary out of the found views * - * @param contentSummaryOrder - * the order to check for contents. the first one found will have a summary made from it + * @param viewSummaryOrder + * the order to check for views. the first one found will have a summary made from it * @param foundContent * the map of all the content found for the document * @param summarySize * the size in bytes of the summary to create * @return the created summary */ - private static String createSummary(List contentSummaryOrder, Map foundContent, int summarySize) { - // check each potential content name we could make summaries for - for (String name : contentSummaryOrder) { + private static String createSummary(List viewSummaryOrder, Map foundContent, int summarySize) { + // check each potential view name we could make summaries for + for (String name : viewSummaryOrder) { if (name.endsWith("*")) { - // strip wildcard from content name + // strip wildcard from view name name = name.substring(0, name.length() - 1); - // if we have content name that matches the list... + // if we have a view name that matches the list... Map summaries = new HashMap<>(); for (Map.Entry entry : foundContent.entrySet()) { if (entry.getKey().startsWith(name)) { @@ -305,7 +305,7 @@ private static String createSummary(List contentSummaryOrder, Map entry : summaries.entrySet()) { sb.append(entry.getKey()).append(": ").append(entry.getValue()).append("\n"); @@ -348,13 +348,13 @@ private void seekToNextUid(Text row, String dtAndUid) throws IOException { } /** - * Get the content name from the end of the column qualifier of the d key + * Get the view name from the end of the column qualifier of the d key * * @param dKey * the d key - * @return the content name + * @return the view name */ - private static String getContentName(Key dKey) { + private static String getViewName(Key dKey) { String cq = dKey.getColumnQualifier().toString(); int index = cq.lastIndexOf(Constants.NULL); return cq.substring(index + 1); @@ -371,14 +371,14 @@ private static String getDtUidFromDKey(Key dKey) { return getDtUid(dKey.getColumnQualifier().toString()); } - public void setContentNameList(List contentNameList) { - contentSummaryOrder.clear(); - contentSummaryOrder.addAll(contentNameList); + public void setViewNameList(List viewNameList) { + viewSummaryOrder.clear(); + viewSummaryOrder.addAll(viewNameList); } @Override public String toString() { - return "DColumnExcerptIterator: " + summarySize + ", " + onlySpecified + ", " + contentSummaryOrder; + return "DColumnExcerptIterator: " + summarySize + ", " + onlySpecified + ", " + viewSummaryOrder; } } diff --git a/warehouse/query-core/src/main/java/datawave/query/jexl/functions/QueryFunctions.java b/warehouse/query-core/src/main/java/datawave/query/jexl/functions/QueryFunctions.java index 7fe15bcf8d..7bf58108df 100644 --- a/warehouse/query-core/src/main/java/datawave/query/jexl/functions/QueryFunctions.java +++ b/warehouse/query-core/src/main/java/datawave/query/jexl/functions/QueryFunctions.java @@ -28,7 +28,7 @@ public class QueryFunctions { public static final String UNIQUE_FUNCTION = "unique"; public static final String GROUPBY_FUNCTION = "groupby"; public static final String EXCERPT_FIELDS_FUNCTION = "excerpt_fields"; - public static final String SUMMARY_FUNCTION = "summary_size"; + public static final String SUMMARY_FUNCTION = "summary"; public static final String LENIENT_FIELDS_FUNCTION = "lenient"; public static final String STRICT_FIELDS_FUNCTION = "strict"; public static final String MATCH_REGEX = "matchRegex"; diff --git a/warehouse/query-core/src/main/java/datawave/query/jexl/visitors/QueryOptionsFromQueryVisitor.java b/warehouse/query-core/src/main/java/datawave/query/jexl/visitors/QueryOptionsFromQueryVisitor.java index be2b87c693..324bedd55d 100644 --- a/warehouse/query-core/src/main/java/datawave/query/jexl/visitors/QueryOptionsFromQueryVisitor.java +++ b/warehouse/query-core/src/main/java/datawave/query/jexl/visitors/QueryOptionsFromQueryVisitor.java @@ -252,7 +252,7 @@ private Object visit(ASTFunctionNode node, Map optionsMap) { case QueryFunctions.SUMMARY_FUNCTION: { List options = new ArrayList<>(); this.visit(node, options); - optionsMap.put(QueryParameters.SUMMARY_SIZE, JOINER.join(options)); + optionsMap.put(QueryParameters.SUMMARY_OPTIONS, JOINER.join(options)); return null; } case QueryFunctions.NO_EXPANSION: { diff --git a/warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummarySize.java b/warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummaryOptions.java similarity index 86% rename from warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummarySize.java rename to warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummaryOptions.java index 5479fc698c..9eea024f1a 100644 --- a/warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummarySize.java +++ b/warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummaryOptions.java @@ -10,12 +10,12 @@ /** * Function to specify when summaries should be included for results for any hit documents. This function accepts a string in the format - * {@code size/[only]/[contentName1, contentName2, ....]}. See {@link datawave.query.attributes.SummarySize} for additional documentation on supported + * {@code size/[only]/[contentName1, contentName2, ....]}. See {@link datawave.query.attributes.SummaryOptions} for additional documentation on supported * formatting. */ -public class SummarySize extends JexlQueryFunction { +public class SummaryOptions extends JexlQueryFunction { - public SummarySize() { + public SummaryOptions() { super(QueryFunctions.SUMMARY_FUNCTION, new ArrayList<>()); } @@ -23,7 +23,7 @@ public SummarySize() { public void validate() throws IllegalArgumentException { String parameters = this.parameterList.isEmpty() ? "" : String.join(",", parameterList); try { - datawave.query.attributes.SummarySize.from(parameters); + datawave.query.attributes.SummaryOptions.from(parameters); } catch (Exception e) { BadRequestQueryException qe = new BadRequestQueryException(DatawaveErrorCode.INVALID_FUNCTION_ARGUMENTS, MessageFormat.format("Unable to parse summary options from arguments for function {0}", this.name)); @@ -52,6 +52,6 @@ public String toString() { @Override public QueryFunction duplicate() { - return new SummarySize(); + return new SummaryOptions(); } } diff --git a/warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java b/warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java index f55fa17426..8ae2c8520a 100644 --- a/warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java +++ b/warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java @@ -658,8 +658,8 @@ private void configureExcerpts(ShardQueryConfiguration config, IteratorSetting c } private void configureSummaries(ShardQueryConfiguration config, IteratorSetting cfg) { - if (config.getSummarySize().getSummarySize() != 0) { - addOption(cfg, QueryOptions.SUMMARY_SIZE, config.getSummarySize().toString(), true); + if (config.getSummaryOptions().getSummarySize() != 0) { + addOption(cfg, QueryOptions.SUMMARY_OPTIONS, config.getSummaryOptions().toString(), true); addOption(cfg, QueryOptions.SUMMARY_ITERATOR, config.getSummaryIterator().getName(), false); } } diff --git a/warehouse/query-core/src/main/java/datawave/query/planner/QueryOptionsSwitch.java b/warehouse/query-core/src/main/java/datawave/query/planner/QueryOptionsSwitch.java index eced5e48b9..743fb1abfc 100644 --- a/warehouse/query-core/src/main/java/datawave/query/planner/QueryOptionsSwitch.java +++ b/warehouse/query-core/src/main/java/datawave/query/planner/QueryOptionsSwitch.java @@ -13,7 +13,7 @@ import datawave.query.Constants; import datawave.query.QueryParameters; import datawave.query.attributes.ExcerptFields; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.attributes.UniqueFields; import datawave.query.common.grouping.GroupFields; import datawave.query.config.ShardQueryConfiguration; @@ -68,9 +68,9 @@ public static void apply(Map optionsMap, ShardQueryConfiguration ExcerptFields excerptFields = ExcerptFields.from(value); config.setExcerptFields(excerptFields); break; - case QueryParameters.SUMMARY_SIZE: - SummarySize summarySize = SummarySize.from(value); - config.setSummarySize(summarySize); + case QueryParameters.SUMMARY_OPTIONS: + SummaryOptions summaryOptions = SummaryOptions.from(value); + config.setSummaryOptions(summaryOptions); break; case QueryParameters.NO_EXPANSION_FIELDS: config.setNoExpansionFields(new HashSet<>(Arrays.asList(StringUtils.split(value, Constants.PARAM_VALUE_SEP)))); diff --git a/warehouse/query-core/src/main/java/datawave/query/tables/ShardQueryLogic.java b/warehouse/query-core/src/main/java/datawave/query/tables/ShardQueryLogic.java index ba53ab830d..6a61218a48 100644 --- a/warehouse/query-core/src/main/java/datawave/query/tables/ShardQueryLogic.java +++ b/warehouse/query-core/src/main/java/datawave/query/tables/ShardQueryLogic.java @@ -63,7 +63,7 @@ import datawave.query.DocumentSerialization; import datawave.query.QueryParameters; import datawave.query.attributes.ExcerptFields; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.attributes.UniqueFields; import datawave.query.cardinality.CardinalityConfiguration; import datawave.query.common.grouping.GroupFields; @@ -989,12 +989,12 @@ protected void loadQueryParameters(ShardQueryConfiguration config, Query setting } } - // Get the SUMMARY_SIZE parameter if given - String summarySizeParam = settings.findParameter(QueryParameters.SUMMARY_SIZE).getParameterValue().trim(); - if (StringUtils.isNotBlank(summarySizeParam)) { - SummarySize summarySize = SummarySize.from(summarySizeParam); - this.setSummarySize(summarySize); - config.setSummarySize(summarySize); + // Get the SUMMARY parameter if given + String summaryParam = settings.findParameter(QueryParameters.SUMMARY_OPTIONS).getParameterValue().trim(); + if (StringUtils.isNotBlank(summaryParam)) { + SummaryOptions summaryOptions = SummaryOptions.from(summaryParam); + this.setSummaryOptions(summaryOptions); + config.setSummaryOptions(summaryOptions); } // Get the HIT_LIST parameter if given @@ -1546,12 +1546,12 @@ public void setExcerptIterator(String iteratorClass) { } } - public SummarySize getSummarySize() { - return getConfig().getSummarySize(); + public SummaryOptions getSummaryoptions() { + return getConfig().getSummaryOptions(); } - public void setSummarySize(SummarySize summarySize) { - getConfig().setSummarySize(summarySize); + public void setSummaryOptions(SummaryOptions summaryOptions) { + getConfig().setSummaryOptions(summaryOptions); } public String getSummaryIterator() { diff --git a/warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java b/warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java index 2b1fe13504..e0af15afd8 100644 --- a/warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java +++ b/warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java @@ -1,12 +1,11 @@ package datawave.query.transformer; -import static datawave.query.iterator.logic.DColumnSummaryIterator.CONTENT_NAMES; +import static datawave.query.iterator.logic.DColumnSummaryIterator.VIEW_NAMES; import static datawave.query.iterator.logic.DColumnSummaryIterator.ONLY_SPECIFIED; import static datawave.query.iterator.logic.DColumnSummaryIterator.SUMMARY_SIZE; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -35,7 +34,7 @@ import datawave.query.attributes.Content; import datawave.query.attributes.Document; import datawave.query.attributes.DocumentKey; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.iterator.logic.DColumnSummaryIterator; import datawave.query.iterator.logic.TermFrequencyExcerptIterator; @@ -50,18 +49,18 @@ public class SummaryTransform extends DocumentTransform.DefaultDocumentTransform private static final String CONTENT_SUMMARY = "CONTENT_SUMMARY"; private final DColumnSummaryIterator summaryIterator; - private final SummarySize summarySize; + private final SummaryOptions summaryOptions; private final IteratorEnvironment env; private final SortedKeyValueIterator source; - public SummaryTransform(SummarySize summarySize, IteratorEnvironment env, SortedKeyValueIterator source) { - this(summarySize, env, source, new TermFrequencyExcerptIterator()); + public SummaryTransform(SummaryOptions summaryOptions, IteratorEnvironment env, SortedKeyValueIterator source) { + this(summaryOptions, env, source, new TermFrequencyExcerptIterator()); } - public SummaryTransform(SummarySize summarySize, IteratorEnvironment env, SortedKeyValueIterator source, + public SummaryTransform(SummaryOptions summaryOptions, IteratorEnvironment env, SortedKeyValueIterator source, SortedKeyValueIterator summaryIterator) { - ArgumentChecker.notNull(summarySize); - this.summarySize = summarySize; + ArgumentChecker.notNull(summaryOptions); + this.summaryOptions = summaryOptions; this.env = env; this.source = source; this.summaryIterator = (DColumnSummaryIterator) summaryIterator; @@ -77,7 +76,7 @@ public Entry apply(@Nullable Entry entry) { ArrayList documentKeys = getEventIds(document); if (!documentKeys.isEmpty()) { if (log.isTraceEnabled()) { - log.trace("Fetching summaries {} for document {}", summarySize, document.getMetadata()); + log.trace("Fetching summaries {} for document {}", summaryOptions, document.getMetadata()); } Set summaries = getExcerpts(documentKeys); addExcerptsToDocument(summaries, document); @@ -157,7 +156,7 @@ private Set getExcerpts(final ArrayList documentKeys) { Key endKey = startKey.followingKey(PartialKey.ROW_COLFAM); Range range = new Range(startKey, true, endKey, false); - Summary summary = getSummary(range, summarySize); + Summary summary = getSummary(range, summaryOptions); // Only retain non-blank summaries. if (!summary.isEmpty()) { summaries.add(summary); @@ -176,18 +175,18 @@ private Set getExcerpts(final ArrayList documentKeys) { * * @param range * the range to use when seeking - * @param summarySize + * @param summaryOptions * the object with our summary specifications * @return the summary */ - private Summary getSummary(Range range, SummarySize summarySize) { - // get the options out of the SummarySize object + private Summary getSummary(Range range, SummaryOptions summaryOptions) { + // get the options out of the SummaryOptions object final Map summaryIteratorOptions = new HashMap<>(); - summaryIteratorOptions.put(SUMMARY_SIZE, String.valueOf(summarySize.getSummarySize())); - if (!summarySize.isEmpty()) { - summaryIteratorOptions.put(CONTENT_NAMES, summarySize.contentNamesListToString()); + summaryIteratorOptions.put(SUMMARY_SIZE, String.valueOf(summaryOptions.getSummarySize())); + if (!summaryOptions.isEmpty()) { + summaryIteratorOptions.put(VIEW_NAMES, summaryOptions.viewNamesListToString()); } - summaryIteratorOptions.put(ONLY_SPECIFIED, String.valueOf(summarySize.onlyListedContents())); + summaryIteratorOptions.put(ONLY_SPECIFIED, String.valueOf(summaryOptions.onlyListedViews())); try { // set all of our options for the iterator diff --git a/warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationTest.java b/warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationTest.java index 310cb6ab40..c5b9e691f2 100644 --- a/warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationTest.java +++ b/warehouse/query-core/src/test/java/datawave/query/config/ShardQueryConfigurationTest.java @@ -39,7 +39,7 @@ import datawave.microservice.query.QueryImpl; import datawave.query.DocumentSerialization; import datawave.query.attributes.ExcerptFields; -import datawave.query.attributes.SummarySize; +import datawave.query.attributes.SummaryOptions; import datawave.query.attributes.UniqueFields; import datawave.query.common.grouping.GroupFields; import datawave.query.iterator.ivarator.IvaratorCacheDirConfig; @@ -53,7 +53,7 @@ public class ShardQueryConfigurationTest { - public final static Map,Class> primitiveMap = new HashMap<>(); + public static final Map,Class> primitiveMap = new HashMap<>(); static { primitiveMap.put(Boolean.class, boolean.class); primitiveMap.put(Byte.class, byte.class); @@ -471,8 +471,8 @@ public void setUp() throws Exception { updatedValues.put("excerptFields", ExcerptFields.from("FIELD_E/10,FIELD_F/11")); defaultValues.put("excerptIterator", TermFrequencyExcerptIterator.class); updatedValues.put("excerptIterator", TermFrequencyIndexIterator.class); - defaultValues.put("summarySize", new SummarySize()); - updatedValues.put("summarySize", SummarySize.from("50")); + defaultValues.put("summarySize", new SummaryOptions()); + updatedValues.put("summarySize", SummaryOptions.from("50")); defaultValues.put("summaryIterator", DColumnSummaryIterator.class); updatedValues.put("summaryIterator", DColumnSummaryIterator.class); defaultValues.put("fiFieldSeek", -1); diff --git a/warehouse/query-core/src/test/java/datawave/query/iterator/logic/DColumnSummaryIteratorTest.java b/warehouse/query-core/src/test/java/datawave/query/iterator/logic/DColumnSummaryIteratorTest.java index 4cbad11f26..c9314c0024 100644 --- a/warehouse/query-core/src/test/java/datawave/query/iterator/logic/DColumnSummaryIteratorTest.java +++ b/warehouse/query-core/src/test/java/datawave/query/iterator/logic/DColumnSummaryIteratorTest.java @@ -1,6 +1,6 @@ package datawave.query.iterator.logic; -import static datawave.query.iterator.logic.DColumnSummaryIterator.CONTENT_NAMES; +import static datawave.query.iterator.logic.DColumnSummaryIterator.VIEW_NAMES; import static datawave.query.iterator.logic.DColumnSummaryIterator.ONLY_SPECIFIED; import static datawave.query.iterator.logic.DColumnSummaryIterator.SUMMARY_SIZE; import static org.junit.Assert.assertEquals; @@ -89,7 +89,7 @@ public void tearDown() { */ private void givenOptions(String contentNameList, int summarySize, boolean only) { if (contentNameList != null) { - options.put(CONTENT_NAMES, contentNameList); + options.put(VIEW_NAMES, contentNameList); } options.put(SUMMARY_SIZE, String.valueOf(summarySize)); options.put(ONLY_SPECIFIED, String.valueOf(only)); @@ -138,7 +138,7 @@ public void testMatchFound2() throws IOException { @Test public void testMatchFoundSpecificContentNotFirstInList() throws IOException { givenOptions("CONTENT2", 100, false); - iterator.setContentNameList(List.of("CONTENT1", "CONTENT2")); + iterator.setViewNameList(List.of("CONTENT1", "CONTENT2")); iterator.init(new SortedListKeyValueIterator(source), options, env); Key startKey = new Key(row, new Text("email" + Constants.NULL + "987.654.321")); @@ -242,7 +242,7 @@ public void testNoMatchFoundForDataTypeAndUid() throws IOException { @Test public void testNoMatchFoundForContentName() throws IOException { givenOptions("THISWONTBEFOUND", 100, true); - iterator.setContentNameList(List.of("CONTENT1", "CONTENT2", "return", "of", "the", "mack")); + iterator.setViewNameList(List.of("CONTENT1", "CONTENT2", "return", "of", "the", "mack")); iterator.init(new SortedListKeyValueIterator(source), options, env); Key startKey = new Key(row, new Text("email" + Constants.NULL + "987.654.321")); diff --git a/warehouse/query-core/src/test/java/datawave/query/util/SummaryTest.java b/warehouse/query-core/src/test/java/datawave/query/util/SummaryTest.java index 26bb22e872..c63d51e377 100644 --- a/warehouse/query-core/src/test/java/datawave/query/util/SummaryTest.java +++ b/warehouse/query-core/src/test/java/datawave/query/util/SummaryTest.java @@ -215,7 +215,7 @@ public void testWithOnly() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(VIEWS:CONTENT/SIZE:50/ONLY)"; + String queryString = "QUOTE:(farther) #SUMMARY(VIEWS:CONTENT/SIZE:50/ONLY)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>( @@ -231,7 +231,7 @@ public void testWithNoArg() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE()"; + String queryString = "QUOTE:(farther) #SUMMARY()"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>(Set.of( @@ -247,7 +247,7 @@ public void testWithoutOnly() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(SIZE:50/VIEWS:CONTENT)"; + String queryString = "QUOTE:(farther) #SUMMARY(SIZE:50/VIEWS:CONTENT)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>( @@ -263,7 +263,7 @@ public void testSize() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(SIZE:50)"; + String queryString = "QUOTE:(farther) #SUMMARY(SIZE:50)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>( @@ -279,7 +279,7 @@ public void testOverMaxSize() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(SIZE:90000)"; + String queryString = "QUOTE:(farther) #SUMMARY(SIZE:90000)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>(Set.of( @@ -295,7 +295,7 @@ public void testNegativeSize() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(SIZE:-50)"; + String queryString = "QUOTE:(farther) #SUMMARY(SIZE:-50)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>(Set.of("CONTENT_SUMMARY:CONTENT: Y: : [] 9223372036854775807 false")); @@ -310,7 +310,7 @@ public void testNoContentFound() throws Exception { extraParameters.put("return.fields", "CONTENT_SUMMARY"); extraParameters.put("query.syntax", "LUCENE"); - String queryString = "QUOTE:(farther) #SUMMARY_SIZE(SIZE:50/ONLY/VIEWS:CANTFINDME,ORME)"; + String queryString = "QUOTE:(farther) #SUMMARY(SIZE:50/ONLY/VIEWS:CANTFINDME,ORME)"; // not sure why the timestamp and delete flag are present Set goodResults = new HashSet<>(Set.of("CONTENT_SUMMARY:NO CONTENT FOUND TO SUMMARIZE")); diff --git a/warehouse/query-core/src/test/resources/datawave/query/QueryLogicFactory.xml b/warehouse/query-core/src/test/resources/datawave/query/QueryLogicFactory.xml index 4f33e6ac2b..88348eac17 100644 --- a/warehouse/query-core/src/test/resources/datawave/query/QueryLogicFactory.xml +++ b/warehouse/query-core/src/test/resources/datawave/query/QueryLogicFactory.xml @@ -46,7 +46,7 @@ - +