You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2024/10/02 14:39:53 UTC
(couchdb) branch nouveau-range-doc-3.4.x-2 created (now 677997cdb)
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a change to branch nouveau-range-doc-3.4.x-2
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 677997cdb fix ranges doc for nouveau
This branch includes the following new commits:
new 677997cdb fix ranges doc for nouveau
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(couchdb) 01/01: fix ranges doc for nouveau
Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch nouveau-range-doc-3.4.x-2
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 677997cdb2c657097298ba115e1afffd3c8b441e
Author: Robert Newson <rn...@apache.org>
AuthorDate: Wed Oct 2 15:38:47 2024 +0100
fix ranges doc for nouveau
closes: https://github.com/apache/couchdb/issues/5273
---
src/docs/src/ddocs/nouveau.rst | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/docs/src/ddocs/nouveau.rst b/src/docs/src/ddocs/nouveau.rst
index b99b769ea..7dd9eda6e 100644
--- a/src/docs/src/ddocs/nouveau.rst
+++ b/src/docs/src/ddocs/nouveau.rst
@@ -692,23 +692,17 @@ Ranges
.. note::
The ``ranges`` option is only available when making global queries.
-The ``range`` facet syntax reuses the standard Lucene syntax for ranges to return counts
-of results that fit into each specified category. Inclusive range queries are denoted by
-brackets (``[``, ``]``). Exclusive range queries are denoted by curly brackets (``{``,
-``}``).
-
-.. note::
- The ``range`` operation works only if the indexed values are numbers. The indexed
- values cannot be mixed types. For example, if 100 strings are indexed, and one number,
- then the index cannot be used for ``range`` operations. You can check the type by
- using the ``typeof`` operator, and convert it by using the ``parseInt``,
- ``parseFloat``, or ``.toString()`` functions.
+The value of the range parameter is a JSON object where the fields names are double
+fields, and the values of the fields are arrays of JSON objects. The objects
+must have a ``label``, ``min`` and ``max`` value (of type string, double, double
+respectively), and optional ``min_inclusive`` and ``max_inclusive`` properties
+(defaulting to ``true`` if not specified).
*Example of a request that uses faceted search for matching ranges:*
.. code-block:: text
- ?q=*:*&ranges={"price":{"cheap":"[0 TO 100]","expensive":"{100 TO *}"}}
+ ?q=*:*&ranges={"price":[{"label":"cheap","min":0,"max":"100"},{"label":"expensive","min":100}]}
*Example results after a ranges check on a faceted search:*