Skip to content

Commit f88ba94

Browse files
authored
Merge pull request #5018 from apache/nouveau-field-type-doc
expand nouveau docs on field types
2 parents f4cb798 + f04487c commit f88ba94

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/docs/src/ddocs/nouveau.rst

+32-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ database. An index builds after processing one search request or after the serve
3535
a document update. The ``index`` function takes the following parameters:
3636

3737
#. Field type - The type of the field, can be ``string``, ``text``, ``double``
38-
or ``stored``.
38+
or ``stored``. See :ref:`Field Types <ddoc/nouveau/field_types>` for more information.
3939
#. Field name - The name of the field you want to use when you query the index.
4040
If you set this parameter to ``default``, then this field is queried if no field is
4141
specified in the query syntax.
@@ -63,6 +63,37 @@ results from deeper in the result set.
6363
A nouveau index will inherit the partitioning type from the ``options.partitioned`` field
6464
of the design document that contains it.
6565

66+
.. _ddoc/nouveau/field_types:
67+
68+
Field Types
69+
===========
70+
71+
Nouveau currently supports four field types, each of which has different semantics to the
72+
others.
73+
74+
Text
75+
A text field is the most common field type, the field value is analyzed at
76+
index time to permit efficient querying by the individual words within it
77+
(and wildcards, and regex, etc). This field type is not appropriate for
78+
sorting, range queries and faceting.
79+
80+
String
81+
A string field indexes the fields value as a single token without
82+
analysis (that is, no case-folding, no common suffixes are removed,
83+
etc). This field type is recommended for sorting and faceting. You *can*
84+
search on string fields but you must specify the ``keyword`` analyzer in the
85+
index definition for this field to ensure that your queries are not
86+
analyzed.
87+
88+
Double
89+
A double field requires a number value and is appropriate for sorting,
90+
range queries and range faceting.
91+
92+
Stored
93+
A stored field stores the field value into the index without
94+
analysis. The value is returned with search results but you cannot search,
95+
sort, range or facet over a stored field.
96+
6697
Index functions
6798
===============
6899

0 commit comments

Comments
 (0)