summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search')
-rw-r--r--container-search/src/main/java/com/yahoo/search/Query.java27
-rw-r--r--container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java7
-rw-r--r--container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java29
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/Model.java52
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/Presentation.java10
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/Coverage.java14
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java12
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/ErrorHit.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/Hit.java166
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/HitGroup.java11
11 files changed, 8 insertions, 335 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/Query.java b/container-search/src/main/java/com/yahoo/search/Query.java
index e1bfc96dab0..b4adca2cef1 100644
--- a/container-search/src/main/java/com/yahoo/search/Query.java
+++ b/container-search/src/main/java/com/yahoo/search/Query.java
@@ -527,15 +527,6 @@ public class Query extends com.yahoo.processing.Request implements Cloneable {
}
/**
- * @deprecated do not use
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public boolean requestHasProperty(String name) {
- return httpRequest.hasProperty(name);
- }
-
- /**
* Returns the number of milliseconds to wait for a response from a search backend
* before timing it out. Default is 500.
* <p>
@@ -639,24 +630,6 @@ public class Query extends com.yahoo.processing.Request implements Cloneable {
setHits(hits);
}
- /**
- * This is ignored - compression is controlled at the network level.
- *
- * @deprecated this is ignored
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void setCompress(boolean ignored) { }
-
- /**
- * Returns false.
- *
- * @deprecated this always returns false
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public boolean getCompress() { return false; }
-
/** Returns a string describing this query */
@Override
public String toString() {
diff --git a/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java b/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java
index 5de0c5eff74..ac0c8375f04 100644
--- a/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java
+++ b/container-search/src/main/java/com/yahoo/search/cluster/ClusterMonitor.java
@@ -35,13 +35,6 @@ public class ClusterMonitor<T> {
/** A map from Node to corresponding MonitoredNode */
private final Map<T, BaseNodeMonitor<T>> nodeMonitors = Collections.synchronizedMap(new java.util.LinkedHashMap<>());
- /** @deprecated use the constructor with just the first argument instead */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public ClusterMonitor(NodeManager<T> manager, String ignored) {
- this(manager);
- }
-
public ClusterMonitor(NodeManager<T> manager) {
nodeManager = manager;
monitorThread = new MonitorThread("search.clustermonitor");
diff --git a/container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java b/container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java
index 83eca89dffa..13c23234910 100644
--- a/container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java
+++ b/container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java
@@ -121,20 +121,6 @@ public class GroupingRequest {
}
/**
- * Sets the result {@link RootGroup} of this request. This is used by the executing grouping searcher, and should
- * not be called by a requesting searcher.
- *
- * @param group the result to set.
- * @return this, to allow chaining.
- * @deprecated this is a noop
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public GroupingRequest setResultGroup(RootGroup group) {
- return this;
- }
-
- /**
* Returns the list of {@link Continuation}s of this request. This is used by the executing grouping searcher to
* allow pagination of grouping results.
*
@@ -156,21 +142,6 @@ public class GroupingRequest {
return newRequest;
}
- /**
- * Returns all instances of this class that have been attached to the given {@link Query}. If no requests have been
- * attached to the {@link Query}, this method returns an empty list.
- *
- * @param query the query whose requests to return.
- * @return the list of grouping requests.
- * @deprecated use query.getSelect().getGrouping()
- */
- @SuppressWarnings({ "unchecked" })
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public static List<GroupingRequest> getRequests(Query query) {
- return query.getSelect().getGrouping();
- }
-
@Override
public String toString() {
return root == null ? "(empty)" : root.toString();
diff --git a/container-search/src/main/java/com/yahoo/search/query/Model.java b/container-search/src/main/java/com/yahoo/search/query/Model.java
index 379d2d85bcc..28b605fa095 100644
--- a/container-search/src/main/java/com/yahoo/search/query/Model.java
+++ b/container-search/src/main/java/com/yahoo/search/query/Model.java
@@ -93,34 +93,6 @@ public class Model implements Cloneable {
setParent(query);
}
- /**
- * Creates trace a message of language detection results into this Model
- * instance's parent query. Do note this will give bogus results if the
- * Execution instance is not set correctly. This is done automatically
- * inside {@link Execution#search(Query)}. If tracing the same place as
- * creating the query instance, {@link #setExecution(Execution)} has to be
- * invoked first with the same Execution instance the query is intended to
- * be run by.
- *
- * @deprecated do not use; language can now be assigned later and for parts of the query tree, making this quite useless
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void traceLanguage() {
- if (getParent().getTraceLevel() < 2) return;
- if (language != null) {
- getParent().trace("Language " + getLanguage() + " specified directly as a parameter", false, 2);
- }
- else {
- Language l = getParsingLanguage();
- // Don't include the query, it will trigger query parsing
- getParent().trace("Detected language: " + l, false, 2);
- getParent().trace("Language " + l + " determined by " +
- (Language.fromEncoding(encoding) != Language.UNKNOWN ? "query encoding" :
- "the characters in the terms") + ".", false, 2);
- }
- }
-
public Language getParsingLanguage() {
return getParsingLanguage(queryString);
}
@@ -535,28 +507,4 @@ public class Model implements Cloneable {
return false;
}
- /**
- * Set the YTrace header value to use when transmitting this model to a
- * search backend (of some kind).
- *
- * @param next string representation of header value
- * @deprecated not used, ytrace has been discontinued
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void setYTraceHeaderToNext(String next) { }
-
- /**
- * Get the YTrace header value to use when transmitting this model to a
- * search backend (of some kind). Returns null if no ytrace data is not
- * turned on.
- *
- * @deprecated not used, ytrace has been discontinued
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public String getYTraceHeaderToNext() {
- return null;
- }
-
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/Presentation.java b/container-search/src/main/java/com/yahoo/search/query/Presentation.java
index ae179a2ba07..7ef4b0728c4 100644
--- a/container-search/src/main/java/com/yahoo/search/query/Presentation.java
+++ b/container-search/src/main/java/com/yahoo/search/query/Presentation.java
@@ -96,16 +96,6 @@ public class Presentation implements Cloneable {
/** Sets whether matching query terms should be bolded in the result */
public void setBolding(boolean bolding) { this.bolding = bolding; }
- /** @deprecated coverage information is always returned */
- @Deprecated // OK
- // TODO: Remove on Vespa 7
- public boolean getReportCoverage() { return true; }
-
- /** @deprecated coverage information is always returned */
- @Deprecated // OK
- // TODO: Remove on Vespa 7
- public void setReportCoverage(boolean ignored) { }
-
/** Get the name of the format desired for result rendering. */
@NonNull
public ComponentSpecification getRenderer() { return format; }
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
index 9eadd22ed43..b8b85eb4a5d 100644
--- a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
+++ b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
@@ -29,12 +29,6 @@ import java.util.Map;
*/
public class QueryProperties extends Properties {
- /** @deprecated use Query.nativeProperties */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public static final CompoundName[] PER_SOURCE_QUERY_PROPERTIES =
- Query.nativeProperties.toArray(new CompoundName[] {});
-
private Query query;
private final CompiledQueryProfileRegistry profileRegistry;
diff --git a/container-search/src/main/java/com/yahoo/search/result/Coverage.java b/container-search/src/main/java/com/yahoo/search/result/Coverage.java
index 7bc49fdb0b1..25829b70b5e 100644
--- a/container-search/src/main/java/com/yahoo/search/result/Coverage.java
+++ b/container-search/src/main/java/com/yahoo/search/result/Coverage.java
@@ -23,20 +23,6 @@ public class Coverage extends com.yahoo.container.handler.Coverage {
super(docs, active, nodes, resultSets);
}
- // TODO: Remove on Vespa 7
- /** @deprecated don't send a "full" boolean */
- @Deprecated // OK
- public Coverage(long docs, int nodes, boolean full) {
- this(docs, nodes, full, 1);
- }
-
- // TODO: Remove on Vespa 7
- /** @deprecated don't send a "full" boolean */
- @Deprecated // OK
- public Coverage(long docs, int nodes, boolean full, int resultSets) {
- super(docs, nodes, full, resultSets);
- }
-
/**
* Will set number of documents present in ideal state
*
diff --git a/container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java b/container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java
index 54b83544b1a..d8ec768325a 100644
--- a/container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java
+++ b/container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java
@@ -58,18 +58,6 @@ public class DefaultErrorHit extends Hit implements ErrorHit, Cloneable {
}
/**
- * Returns the main error of this result, never null.
- *
- * @deprecated use {@link #errors()}
- */
- @Override
- @Deprecated // OK
- // TODO: Remove on Vespa 7
- public ErrorMessage getMainError() {
- return errors.get(0);
- }
-
- /**
* This is basically a way of making a list simulate a set.
*/
private void removeAndAdd(ErrorMessage error) {
diff --git a/container-search/src/main/java/com/yahoo/search/result/ErrorHit.java b/container-search/src/main/java/com/yahoo/search/result/ErrorHit.java
index 091c8d67793..9be80372ba9 100644
--- a/container-search/src/main/java/com/yahoo/search/result/ErrorHit.java
+++ b/container-search/src/main/java/com/yahoo/search/result/ErrorHit.java
@@ -14,15 +14,6 @@ public interface ErrorHit extends Cloneable {
void setSource(String source);
- /**
- * Returns the main error of this result, never null
- *
- * @deprecated use errors().iterator().next()
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- ErrorMessage getMainError();
-
/**
* Adds an error to this. This may change the main error
* and/or the list of detailed errors
diff --git a/container-search/src/main/java/com/yahoo/search/result/Hit.java b/container-search/src/main/java/com/yahoo/search/result/Hit.java
index c5132549d05..fdfa58730fc 100644
--- a/container-search/src/main/java/com/yahoo/search/result/Hit.java
+++ b/container-search/src/main/java/com/yahoo/search/result/Hit.java
@@ -478,20 +478,6 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
return fields != null && ! fields.isEmpty();
}
- /**
- * Changes the key under which a value is found. This is useful because it allows keys to be changed
- * without accessing the value (which may be lazily created).
- *
- * @deprecated do not use
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void changeFieldKey(String oldKey, String newKey) {
- Map<String,Object> fieldMap = getFieldMap();
- Object value = fieldMap.remove(oldKey);
- fieldMap.put(newKey, value);
- }
-
private Map<String, Object> getFieldMap() {
return getFieldMap(2);
}
@@ -515,42 +501,16 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
return unmodifiableFieldMap;
}
- /** Generate a HitField from a field if the field exists */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public HitField buildHitField(String key) {
- return buildHitField(key, false);
- }
-
- /** Generate a HitField from a field if the field exists */
- @SuppressWarnings("deprecation")
- // TODO: Remove on Vespa 7
- @Deprecated // OK
public HitField buildHitField(String key, boolean forceNoPreTokenize) {
- return buildHitField(key, forceNoPreTokenize, false);
- }
-
- // TODO: Remove third parameter on Vespa 7 (set always true)
- @Deprecated // OK
- public HitField buildHitField(String key, boolean forceNoPreTokenize, boolean forceStringHandling) {
Object o = getField(key);
if (o == null) return null;
if (o instanceof HitField) return (HitField)o;
HitField h;
- if (forceNoPreTokenize) {
- if (o instanceof XMLString && !forceStringHandling) {
- h = new HitField(key, (XMLString) o, false);
- } else {
- h = new HitField(key, o.toString(), false);
- }
- } else {
- if (o instanceof XMLString && !forceStringHandling) {
- h = new HitField(key, (XMLString) o);
- } else {
- h = new HitField(key, o.toString());
- }
- }
+ if (forceNoPreTokenize)
+ h = new HitField(key, o.toString(), false);
+ else
+ h = new HitField(key, o.toString());
h.setOriginal(o);
getFieldMap().put(key, h);
return h;
@@ -559,34 +519,19 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
/** Returns the types of this as a modifiable set. Modifications to this set are directly reflected in this hit */
public Set<String> types() { return types; }
- /** @deprecated do not use */
- // TODO: FRemove on Vespa 7
- @Deprecated // OK
- public String getTypeString() {
- return types().stream().collect(Collectors.joining(" "));
- }
-
/**
* Returns the add number, assigned when adding the hit to a Result.
*
* Used to order equal relevant hit by add order. -1 if this hit
* has never been added to a result.
- *
- * @deprecated do not use
*/
- // TODO: Make package private on Vespa 7
- @Deprecated // OK
- public int getAddNumber() { return addNumber; }
+ int getAddNumber() { return addNumber; }
/**
* Sets the add number, assigned when adding the hit to a Result,
* used to order equal relevant hit by add order.
- *
- * @deprecated do not use
*/
- // TODO: Make package private on Vespa 7
- @Deprecated // OK
- public void setAddNumber(int addNumber) { this.addNumber = addNumber; }
+ void setAddNumber(int addNumber) { this.addNumber = addNumber; }
/**
* Returns whether this is a concrete hit, containing content of the requested
@@ -610,16 +555,6 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
public void setAuxiliary(boolean auxiliary) { this.auxiliary = auxiliary; }
- /** @deprecated do not use */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public int getSourceNumber() { return sourceNumber; }
-
- /** @deprecated do not use */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void setSourceNumber(int number) { this.sourceNumber = number; }
-
/** Returns the query which produced this hit, or null if not known */
public Query getQuery() { return query; }
@@ -633,52 +568,6 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
}
}
- /**
- * Returns a field of this hit XML escaped and without token
- * delimiters.
- *
- * @deprecated do not use
- * @return a field of this hit, or null if the property is not set
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public String getFieldXML(String key) {
- Object p = getField(key);
-
- if (p == null) {
- return null;
- } else if (p instanceof HitField) {
- return ((HitField)p).quotedContent(false);
- } else if (p instanceof StructuredData || p instanceof XMLString || p instanceof JSONString) {
- return p.toString();
- } else {
- return XML.xmlEscape(p.toString(), false, '\u001f');
- }
- }
-
- /**
- * @deprecated do not use
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public String getUnboldedField(String key, boolean escape) {
- Object p = getField(key);
-
- if (p == null) {
- return null;
- } else if (p instanceof HitField) {
- return ((HitField) p).bareContent(escape, false);
- } else if (p instanceof StructuredData) {
- return p.toString();
- } else if (p instanceof XMLString || p instanceof JSONString) {
- return p.toString();
- } else if (escape) {
- return XML.xmlEscape(p.toString(), false, '\u001f');
- } else {
- return stripCharacter('\u001F', p.toString());
- }
- }
-
/** Attach some data to this hit for this searcher */
public void setSearcherSpecificMetaData(Searcher searcher, Object data) {
if (searcherSpecificMetaData == null) {
@@ -703,60 +592,21 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
return searcherSpecificMetaData != null ? searcherSpecificMetaData.get(searcher) : null;
}
- /**
- * Internal - do not use
- *
- * @param filled the backing set
- */
- // TODO: Make package private on Vespa 7
- protected final void setFilledInternal(Set<String> filled) {
+ final void setFilledInternal(Set<String> filled) {
this.filled = filled;
unmodifiableFilled = (filled != null) ? Collections.unmodifiableSet(filled) : null;
}
/**
- * For internal use only.
* Gives access to the modifiable backing set of filled summaries.
* This set might be unmodifiable if the size is less than or equal to 1
*
* @return the set of filled summaries.
*/
- // TODO: Make package private on Vespa 7
- protected final Set<String> getFilledInternal() {
+ final Set<String> getFilledInternal() {
return filled;
}
- /**
- * @deprecated do not use
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public static String stripCharacter(char strip, String toStripFrom) {
- StringBuilder builder = null;
-
- int lastBadChar = 0;
- for (int i = 0; i < toStripFrom.length(); i++) {
- if (toStripFrom.charAt(i) == strip) {
- if (builder == null) {
- builder = new StringBuilder(toStripFrom.length());
- }
-
- builder.append(toStripFrom, lastBadChar, i);
- lastBadChar = i + 1;
- }
- }
-
- if (builder == null) {
- return toStripFrom;
- } else {
- if (lastBadChar < toStripFrom.length()) {
- builder.append(toStripFrom, lastBadChar, toStripFrom.length());
- }
-
- return builder.toString();
- }
- }
-
/** Releases the resources held by this, making it irreversibly unusable */
protected void close() {
query = null;
diff --git a/container-search/src/main/java/com/yahoo/search/result/HitGroup.java b/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
index 3d5cbab2865..af89220e504 100644
--- a/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
+++ b/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
@@ -383,17 +383,6 @@ public class HitGroup extends Hit implements DataList<Hit>, Cloneable, Iterable<
return hit;
}
- /**
- * Sets the main error of this result
- *
- * @deprecated prefer addError to add some error information.
- */
- // TODO: Remove on Vespa 7
- @Deprecated // OK
- public void setError(ErrorMessage error) {
- addError(error);
- }
-
/** Adds an error to this result */
public void addError(ErrorMessage error) {
getError(); // update the list of errors