You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2017/05/25 17:55:30 UTC
[21/44] lucene-solr:jira/solr-8668: added docs
added docs
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8f4d72a7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8f4d72a7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8f4d72a7
Branch: refs/heads/jira/solr-8668
Commit: 8f4d72a7d22f72755a5de4f1d9341a7ffe74949c
Parents: 872ed81
Author: Noble Paul <no...@apache.org>
Authored: Wed May 24 15:59:00 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Wed May 24 15:59:00 2017 +0930
----------------------------------------------------------------------
.../apache/solr/request/SolrQueryRequest.java | 42 ++++++++++++--------
1 file changed, 26 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8f4d72a7/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java b/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java
index 5bad237..2c5090b 100644
--- a/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java
+++ b/solr/core/src/java/org/apache/solr/request/SolrQueryRequest.java
@@ -33,58 +33,58 @@ import java.util.Map;
/**
* <p>Container for a request to execute a query.</p>
* <p><code>SolrQueryRequest</code> is not thread safe.</p>
- *
+ *
*
*/
public interface SolrQueryRequest extends AutoCloseable {
/** returns the current request parameters */
- public SolrParams getParams();
+ SolrParams getParams();
/** Change the parameters for this request. This does not affect
* the original parameters returned by getOriginalParams()
*/
- public void setParams(SolrParams params);
-
+ void setParams(SolrParams params);
+
/** A Collection of ContentStreams passed to the request
*/
- public Iterable<ContentStream> getContentStreams();
+ Iterable<ContentStream> getContentStreams();
/** Returns the original request parameters. As this
* does not normally include configured defaults
* it's more suitable for logging.
*/
- public SolrParams getOriginalParams();
+ SolrParams getOriginalParams();
/**
* Generic information associated with this request that may be both read and updated.
*/
- public Map<Object,Object> getContext();
+ Map<Object,Object> getContext();
/**
* This method should be called when all uses of this request are
* finished, so that resources can be freed.
*/
- public void close();
+ void close();
/** The start time of this request in milliseconds.
* Use this only if you need the absolute system time at the start of the request,
* getRequestTimer() provides a more accurate mechanism for timing purposes.
*/
- public long getStartTime();
+ long getStartTime();
/** The timer for this request, created when the request started being processed */
- public RTimerTree getRequestTimer();
+ RTimerTree getRequestTimer();
/** The index searcher associated with this request */
- public SolrIndexSearcher getSearcher();
+ SolrIndexSearcher getSearcher();
/** The solr core (coordinator, etc) associated with this request */
- public SolrCore getCore();
+ SolrCore getCore();
/** The schema snapshot from core.getLatestSchema() at request creation. */
public IndexSchema getSchema();
-
+
/** Replaces the current schema snapshot with the latest from the core. */
public void updateSchemaToLatest();
@@ -97,20 +97,30 @@ public interface SolrQueryRequest extends AutoCloseable {
/** Returns any associated JSON (or null if none) in deserialized generic form.
* Java classes used to represent the JSON are as follows: Map, List, String, Long, Double, Boolean
*/
- public Map<String,Object> getJSON();
+ Map<String,Object> getJSON();
- public void setJSON(Map<String,Object> json);
+ void setJSON(Map<String, Object> json);
- public Principal getUserPrincipal();
+ Principal getUserPrincipal();
default String getPath() {
return (String) getContext().get("path");
}
+ /** Only for V2 API.
+ * Returns a map of path segments and their values . For example ,
+ * if the path is configured as /path/{segment1}/{segment2} and a reguest is made
+ * as /path/x/y the returned map would contain {segment1:x ,segment2:y}
+ */
default Map<String, String> getPathTemplateValues() {
return Collections.emptyMap();
}
+ /** Only for v2 API
+ * if the request contains a command payload, it's parsed and returned as a list of
+ * CommandOperation objects
+ * @param validateInput , If true it is validated against the json schema spec
+ */
default List<CommandOperation> getCommands(boolean validateInput) {
return Collections.emptyList();
}