flimzy commented on a change in pull request #418: Add search index 
documentation
URL: 
https://github.com/apache/couchdb-documentation/pull/418#discussion_r291741298
 
 

 ##########
 File path: src/api/ddoc/views.rst
 ##########
 @@ -315,6 +315,1128 @@ including the update sequence of the database from 
which the view was
 generated. The returned value can be compared this to the current update
 sequence exposed in the database information (returned by :get:`/{db}`).
 
+Search
+======
+
+Search indexes enable you to query a database by using `Lucene Query Parser 
Syntax 
<http://lucene.apache.org/core/4_3_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Overview>`_.
 A search index uses one, or multiple, fields from your documents. You can use 
a search index to run queries, find documents based on the content they 
contain, or work with groups, facets, or geographical searches.
+
+To create a search index, you add a JavaScript function to a design document 
in the database. An index builds after processing one search request or after 
the server detects a document update. The ``index`` function takes the 
following parameters: 
+
+1.  Field name - The name of the field you want to use when you query the 
index. If you set this parameter to ``default``, then this field is queried if 
no field is specified in the query syntax.
+2.  Data that you want to index, for example, ``doc.address.country``. 
+3.  (Optional) The third parameter includes the following fields: ``boost``, 
``facet``, ``index``, and ``store``. These fields are described in more detail 
later.   
+
+By default, a search index response returns 25 rows. The number of rows that 
is returned can be changed by using the ``limit`` parameter. However, a result 
set from a search is limited to 200 rows. Each response includes a ``bookmark`` 
field. You can include the value of the ``bookmark`` field in later queries to 
look through the responses.
+
+You can query the API by using one of the following methods: URI, CouchDB 
Dashboard, curl, or a browser plug-in, such as Postman or RESTClient.
 
 Review comment:
   Does this sentence belong here? It doesn't seem particularly relevant to 
search indexes. It seems like general information, which might belong in a 
"getting started" section, rather than in something about indexes?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to