You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2016/12/09 15:58:58 UTC

[4/4] lucene-solr:apiv2: Add descriptions for Schema APIs

Add descriptions for Schema APIs


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a2486fd2
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a2486fd2
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a2486fd2

Branch: refs/heads/apiv2
Commit: a2486fd2d38a5495939132b315ff202519a7dfbf
Parents: 8d8cd3c
Author: Cassandra Targett <ct...@apache.org>
Authored: Fri Dec 9 09:57:56 2016 -0600
Committer: Cassandra Targett <ct...@apache.org>
Committed: Fri Dec 9 09:57:56 2016 -0600

----------------------------------------------------------------------
 .../src/resources/apispec/core.RealtimeGet.json     |  7 ++++---
 .../apispec/core.SchemaEdit.addCopyField.json       |  9 +++++----
 .../apispec/core.SchemaEdit.addFieldType.json       | 10 +++++-----
 .../apispec/core.SchemaEdit.deleteCopyField.json    |  9 ++++++---
 .../apispec/core.SchemaEdit.deleteDynamicField.json |  6 ++++--
 .../apispec/core.SchemaEdit.deleteField.json        |  5 +++--
 .../apispec/core.SchemaEdit.deleteFieldType.json    |  6 ++++--
 .../apispec/core.SchemaRead.copyFields.json         | 11 ++++++++---
 .../resources/apispec/core.SchemaRead.fields.json   | 16 +++++++++++++---
 9 files changed, 52 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.RealtimeGet.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.RealtimeGet.json b/solr/core/src/resources/apispec/core.RealtimeGet.json
index af7fd66..308870e 100644
--- a/solr/core/src/resources/apispec/core.RealtimeGet.json
+++ b/solr/core/src/resources/apispec/core.RealtimeGet.json
@@ -1,5 +1,6 @@
 {
   "documentation": "https://cwiki.apache.org/confluence/display/solr/RealTime+Get",
+  "description": "RealTime Get allows retrieving documents by ID before the documents have been committed to the index. It is useful when you need access to documents as soon as they are indexed but your commit times are high for other reasons.",
   "methods": [
     "GET"
   ],
@@ -10,15 +11,15 @@
     "params": {
       "id": {
         "type": "string",
-        "description": "one or more ids. Separate by commas if there are more than one"
+        "description": "A single document ID to retrieve."
       },
       "ids": {
         "type": "string",
-        "description": "one or more ids. Separate by commas if there are more than one"
+        "description": "One or more document IDs to retrieve. Separate by commas if more than one ID is specified."
       },
       "fq":{
         "type": "string",
-        "description": "Filter query"
+        "description": "An optional filter query to add to the query. One use case for this is security filtering, in case users or groups should not be able to retrieve the document ID requested."
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json b/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json
index d80b92f..26c4eff 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json
@@ -1,21 +1,22 @@
 {
   "documentation" : "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-AddaNewCopyFieldRule",
+  "description": "Adds a new copy field rule, to allow one field to be populated with the contents of one or more other fields.",
   "type": "object",
   "properties": {
     "source": {
       "type": "string",
-      "description": "The source field"
+      "description": "The field to copy from."
     },
     "dest": {
       "type":"array",
       "items": {
         "type": "string"
       },
-      "description": "A field or an array of fields to which the source field will be copied."
+      "description": "A field or an array of fields to which the source field will be copied. A wildcard for a dynamic field can be used, but only if the source field also contains a dynamic field."
     },
     "maxChars": {
       "type": "integer",
-      "description": "The upper limit for the number of characters to be copied. The section Copying Fields has more details."
+      "description": "An upper limit for the number of characters to be copied. This would be useful if index size is a concern. If a limit is not specified, the entire field will be copied."
     }
   },
   "required": [
@@ -23,4 +24,4 @@
     "dest"
   ]
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json b/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json
index 0efb967..3a44f6e 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json
@@ -31,11 +31,11 @@
       "type": "object",
       "description": "A query analyzer section defines how incoming queries to Solr will be analyzed for a field of this type.",
       "properties":{
-            "tokenizer": {
-          "type": "object",
-           "properties": {
-             "class": {
-               "type": "string"
+         "tokenizer": {
+            "type": "object",
+            "properties": {
+               "class": {
+                  "type": "string"
              }
           },
            "additionalProperties": true

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json b/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
index b33549e..dd6ff3a 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
@@ -1,16 +1,19 @@
 {
   "type":"object",
   "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaCopyFieldRule",
+  "description": "Deletes a copy field rule. Both sides of the copy rule (source and destination) are required in order to delete the rule.",
   "properties":{
     "source": {
-      "type":"string"
+      "type":"string",
+      "description": "The field the copy rule is defined to copy from."
     },
     "dest": {
-      "type": "string"
+      "type": "string",
+      "description": "The field the copy rule is defined to copy to."
     }
   },
   "required": [
     "source",
     "dest"
   ]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json b/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
index 1ad22a0..9550548 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
@@ -1,10 +1,12 @@
 {
   "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaDynamicFieldRule",
+  "description": "Deletes a dynamic field.",
   "type":"object",
   "properties": {
     "name": {
-      "type": "string"
+      "type": "string",
+      "description": "The name of the dynamic field to delete."
     }
   },
   "required":["name"]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json b/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json
index 1a6126d..6c2cb00 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json
@@ -1,11 +1,12 @@
 {
   "documentation" : "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaField",
+  "description": "Deletes a field from the schema.",
   "type":"object",
   "properties":{
     "name":{
-     "description" :"name of the field",
+     "description" :"The name of the field to delete.",
       "type" : "string"
     }
   },
   "required" : ["name"]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json b/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
index fd17753..712462a 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
@@ -1,12 +1,14 @@
 {
   "documentation":"https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaFieldType",
+  "description": "Deletes a field type from the schema.",
   "type":"object",
   "properties": {
     "name": {
-      "type": "string"
+      "type": "string",
+      "description": "The name of the field type to delete."
     }
   },
   "required": [
     "name"
   ]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json b/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json
index 35c4b56..4cf822e 100644
--- a/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json
+++ b/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json
@@ -1,5 +1,6 @@
 {
-  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-ListCopyFields",
+  "description": "Lists all copy fields.",
   "methods": [
     "GET"
   ],
@@ -8,13 +9,17 @@
       "schema/copyfields"
     ],
     "params": {
+      "wt": {
+         "type": "string",
+         "description": "The format of the response. Valid options are xml or json."
+      },
       "source.fl": {
         "type": "string",
-        "description": "Comma or space-separated list of one or more copyField source fields to include in the response - copyField directives with all other source fields will be excluded from the response. If not specified, all copyField-s will be included in the response"
+        "description": "Comma- or space-separated list of one or more source fields to include in the response. copyField directives with all other source fields will be excluded from the response. If not specified, all copyFields will be included in the response"
       },
       "dest.fl": {
         "type": "string",
-        "description": "Comma or space-separated list of one or more copyField dest fields to include in the response - copyField directives with all other dest fields will be excluded. If not specified, all copyField-s will be included in the response."
+        "description": "Comma or space-separated list of one or more copyField dest (destination) fields to include in the response. copyField directives with all other dest fields will be excluded. If not specified, all copyFields will be included in the response."
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2486fd2/solr/core/src/resources/apispec/core.SchemaRead.fields.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.fields.json b/solr/core/src/resources/apispec/core.SchemaRead.fields.json
index 006f2e6..3b6c787 100644
--- a/solr/core/src/resources/apispec/core.SchemaRead.fields.json
+++ b/solr/core/src/resources/apispec/core.SchemaRead.fields.json
@@ -1,5 +1,6 @@
 {
-  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-ListFields",
+  "description": "Get only the fields defined in the schema.",
   "methods": [
     "GET"
   ],
@@ -9,14 +10,23 @@
       "/schema/fields/{name}"
     ],
     "params": {
+      "wt": {
+         "type": "string",
+         "description": "The format of the response. Valid options are xml or json.",
+         "default": "json"
+      },
+      "fl": {
+         "type": "string",
+         "description": "A comma- or space-separated list fields to return. If not specified, all fields will be returned. Note a single field can be requested by adding the field name to the endpoint."
+      },
       "includeDynamic": {
         "type": "boolean",
-        "description": "If true, and if the fl query parameter is specified or the fieldname path parameter is used, matching dynamic fields are included in the response and identified with the dynamicBase property. If neither the fl query parameter nor the fieldname path parameter is specified, the includeDynamic query parameter is ignored. If false, matching dynamic fields will not be returned.",
+        "description": "If true, dynamic fields will be returned in the response.",
         "default": false
       },
       "showDefaults": {
         "type": "boolean",
-        "description": "If true, all default field properties from each field's field type will be included in the response (e.g. tokenized for solr.TextField). If false, only explicitly specified field properties will be included.",
+        "description": "If true, all field properties from each field's field type will be included in the response, even if they are not explicitly defined on the field. If false, only explicitly defined field properties will be included.",
         "default": false
       }
     }