Skip to content

Commit

Permalink
Revert "Feature/create summaries (#2649)"
Browse files Browse the repository at this point in the history
This reverts commit 9ca79cb.
  • Loading branch information
ivakegg committed Jan 15, 2025
1 parent 5dab6cc commit 0c28a11
Show file tree
Hide file tree
Showing 27 changed files with 270 additions and 2,179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public class Constants {
// From ingest
public static final Text TERM_FREQUENCY_COLUMN_FAMILY = new Text("tf");

public static final Text D_COLUMN_FAMILY = new Text("d");

// content functions
public static final String TERM_OFFSET_MAP_JEXL_VARIABLE_NAME = ContentFunctions.TERM_OFFSET_MAP_JEXL_VARIABLE_NAME;
public static final String CONTENT_FUNCTION_NAMESPACE = ContentFunctions.CONTENT_FUNCTION_NAMESPACE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ public class QueryParameters {
*/
public static final String EXCERPT_FIELDS = "excerpt.fields";

/**
* Used to specify summaries that should be returned.
*/
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)
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@
import datawave.query.DocumentSerialization.ReturnType;
import datawave.query.QueryParameters;
import datawave.query.attributes.ExcerptFields;
import datawave.query.attributes.SummaryOptions;
import datawave.query.attributes.UniqueFields;
import datawave.query.common.grouping.GroupFields;
import datawave.query.function.DocumentPermutation;
import datawave.query.iterator.QueryIterator;
import datawave.query.iterator.ivarator.IvaratorCacheDirConfig;
import datawave.query.iterator.logic.ContentSummaryIterator;
import datawave.query.iterator.logic.TermFrequencyExcerptIterator;
import datawave.query.jexl.JexlASTHelper;
import datawave.query.jexl.visitors.JexlStringBuildingVisitor;
Expand Down Expand Up @@ -439,11 +437,6 @@ public class ShardQueryConfiguration extends GenericQueryConfiguration implement
// The class for the excerpt iterator
private Class<? extends SortedKeyValueIterator<Key,Value>> excerptIterator = TermFrequencyExcerptIterator.class;

private SummaryOptions summaryOptions = new SummaryOptions();

// The class for the summary iterator
private Class<? extends SortedKeyValueIterator<Key,Value>> summaryIterator = ContentSummaryIterator.class;

/**
* A bloom filter to avoid duplicate results if needed
*/
Expand Down Expand Up @@ -756,8 +749,6 @@ public void copyFrom(ShardQueryConfiguration other) {
this.setStrictFields(other.getStrictFields());
this.setExcerptFields(ExcerptFields.copyOf(other.getExcerptFields()));
this.setExcerptIterator(other.getExcerptIterator());
this.setSummaryOptions(SummaryOptions.copyOf(other.getSummaryOptions()));
this.setSummaryIterator(other.getSummaryIterator());
this.setFiFieldSeek(other.getFiFieldSeek());
this.setFiNextSeek(other.getFiNextSeek());
this.setEventFieldSeek(other.getEventFieldSeek());
Expand Down Expand Up @@ -2631,24 +2622,6 @@ public void setExcerptIterator(Class<? extends SortedKeyValueIterator<Key,Value>
this.excerptIterator = excerptIterator;
}

public SummaryOptions getSummaryOptions() {
return summaryOptions;
}

public void setSummaryOptions(SummaryOptions summaryOptions) {
if (summaryOptions != null) {
this.summaryOptions = summaryOptions;
}
}

public Class<? extends SortedKeyValueIterator<Key,Value>> getSummaryIterator() {
return summaryIterator;
}

public void setSummaryIterator(Class<? extends SortedKeyValueIterator<Key,Value>> summaryIterator) {
this.summaryIterator = summaryIterator;
}

public int getFiFieldSeek() {
return fiFieldSeek;
}
Expand Down Expand Up @@ -3038,7 +3011,6 @@ public boolean equals(Object o) {
Objects.equals(getLenientFields(), that.getLenientFields()) &&
Objects.equals(getStrictFields(), that.getStrictFields()) &&
Objects.equals(getExcerptFields(), that.getExcerptFields()) &&
Objects.equals(getSummaryOptions(), that.getSummaryOptions()) &&
getFiFieldSeek() == that.getFiFieldSeek() &&
getFiNextSeek() == that.getFiNextSeek() &&
getEventFieldSeek() == that.getEventFieldSeek() &&
Expand Down Expand Up @@ -3247,7 +3219,6 @@ public int hashCode() {
getLenientFields(),
getStrictFields(),
getExcerptFields(),
getSummaryOptions(),
getFiFieldSeek(),
getFiNextSeek(),
getEventFieldSeek(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
import datawave.query.tracking.ActiveQuery;
import datawave.query.tracking.ActiveQueryLog;
import datawave.query.transformer.ExcerptTransform;
import datawave.query.transformer.SummaryTransform;
import datawave.query.transformer.UniqueTransform;
import datawave.query.util.EmptyContext;
import datawave.query.util.EntryToTuple;
Expand Down Expand Up @@ -200,8 +199,6 @@ public class QueryIterator extends QueryOptions implements YieldingKeyValueItera

protected ExcerptTransform excerptTransform = null;

protected SummaryTransform summaryTransform = null;

protected RangeProvider rangeProvider;

public QueryIterator() {}
Expand Down Expand Up @@ -820,11 +817,6 @@ public Entry<DocumentData,Document> apply(@Nullable Entry<Key,Document> input) {
documents = excerptTransform.getIterator(documents);
}

SummaryTransform summaryTransform = getSummaryTransform();
if (summaryTransform != null) {
documents = summaryTransform.getIterator(documents);
}

// a hook to allow mapping the document such as with the TLD or Parent
// query logics
// or if the document was not aggregated in the first place because the
Expand Down Expand Up @@ -1621,22 +1613,6 @@ protected ExcerptTransform getExcerptTransform() {
return excerptTransform;
}

protected SummaryTransform getSummaryTransform() {
if (summaryTransform == null && getSummaryOptions() != null && getSummaryOptions().getSummarySize() != 0) {
synchronized (getSummaryOptions()) {
if (summaryTransform == null) {
try {
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);
}
}
}
}
return summaryTransform;
}

/**
* Get a default implementation of a {@link RangeProvider}
*
Expand Down
Loading

0 comments on commit 0c28a11

Please sign in to comment.