Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Cleanup meta field docs #10912

Merged
merged 1 commit into from
May 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/reference/mapping/fields/field-names-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
The `_field_names` field indexes the field names of a document, which can later
be used to search for documents based on the fields that they contain typically
using the `exists` and `missing` filters.

`_field_names` is indexed by default for indices that have been created after
Elasticsearch 1.3.0.
18 changes: 1 addition & 17 deletions docs/reference/mapping/fields/id-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,10 @@
=== `_id`

Each document indexed is associated with an id and a type. The `_id`
field can be used to index just the id, and possible also store it. By
default it is not indexed and not stored (thus, not created).
field allows accessing only the id of a document.

Note, even though the `_id` is not indexed, all the APIs still work
(since they work with the `_uid` field), as well as fetching by ids
using `term`, `terms` or `prefix` queries/filters (including the
specific `ids` query/filter).

The `_id` field can be enabled to be indexed, and possibly stored,
using the appropriate mapping attributes:

[source,js]
--------------------------------------------------
{
"tweet" : {
"_id" : {
"index" : "not_analyzed",
"store" : true
}
}
}
--------------------------------------------------

15 changes: 2 additions & 13 deletions docs/reference/mapping/fields/routing-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
=== `_routing`

The routing field allows to control the `_routing` aspect when indexing
data and explicit routing control is required.

[float]
==== store / index

The first thing the `_routing` mapping does is to store the routing
value provided (`store` set to `true`) and index it (`index` set to
`not_analyzed`). The reason why the routing is stored by default is so
reindexing data will be possible if the routing value is completely
external and not part of the docs.
data and explicit routing control is required. It is stored and indexed.

[float]
==== required
Expand All @@ -20,9 +11,7 @@ Another aspect of the `_routing` mapping is the ability to define it as
required by setting `required` to `true`. This is very important to set
when using routing features, as it allows different APIs to make use of
it. For example, an index operation will be rejected if no routing value
has been provided (or derived from the doc). A delete operation will be
broadcasted to all shards if no routing value is provided and `_routing`
is required.
has been provided.

[float]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the next para, delete "or derived from the doc".

Also, need to check with @martijnvg, but I think you can delete "A delete operation will be broadcasted to all shards if no routing value is provided and _routing is required."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was removed in #10136. I've removed that delete operation line as well.

==== id uniqueness
Expand Down
11 changes: 0 additions & 11 deletions docs/reference/mapping/fields/size-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,3 @@ the mapping to:
}
}
--------------------------------------------------

In order to also store it, use:

[source,js]
--------------------------------------------------
{
"tweet" : {
"_size" : {"enabled" : true, "store" : true }
}
}
--------------------------------------------------
32 changes: 4 additions & 28 deletions docs/reference/mapping/fields/type-field.asciidoc
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
[[mapping-type-field]]
=== `_type`

Each document indexed is associated with an id and a type. The type,
when indexing, is automatically indexed into a `_type` field. By
default, the `_type` field is indexed (but *not* analyzed) and not
stored. This means that the `_type` field can be queried.

The `_type` field can be stored as well, for example:

[source,js]
--------------------------------------------------
{
"tweet" : {
"_type" : {"store" : true}
}
}
--------------------------------------------------

The `_type` field can also not be indexed, and all the APIs will still
work except for specific queries (term queries / filters) or aggregations
done on the `_type` field.

[source,js]
--------------------------------------------------
{
"tweet" : {
"_type" : {"index" : "no"}
}
}
--------------------------------------------------
Each document indexed is associated with an id and a type. The `_type`
field allows accessing only the type of a document. It is indexed
to allow quickly filtering on type, for example, when performing
a search request on a single or multiple types.
5 changes: 2 additions & 3 deletions docs/reference/mapping/fields/uid-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ Each document indexed is associated with an id and a type, the internal
is composed of the type and the id (meaning that different types can
have the same id and still maintain uniqueness).

The `_uid` field is automatically used when `_type` is not indexed to
perform type based filtering, and does not require the `_id` to be
indexed.
The `_uid` field is for type based filtering, as well as for
lookups of `_id` and `_type`.
6 changes: 2 additions & 4 deletions docs/reference/query-dsl/ids-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
== Ids Query

Filters documents that only have the provided ids. Note, this query
does not require the <<mapping-id-field,_id>>
field to be indexed since it works using the
<<mapping-uid-field,_uid>> field.
uses the <<mapping-uid-field,_uid>> field.

[source,js]
--------------------------------------------------
Expand All @@ -17,4 +15,4 @@ field to be indexed since it works using the
--------------------------------------------------

The `type` is optional and can be omitted, and can also accept an array
of values.
of values. If no type is specified, all types defined in the index mapping are tried.
4 changes: 1 addition & 3 deletions docs/reference/query-dsl/type-query.asciidoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[[query-dsl-type-query]]
== Type Query

Filters documents matching the provided document / mapping type. Note,
this query can work even when the `_type` field is not indexed (using
the <<mapping-uid-field,_uid>> field).
Filters documents matching the provided document / mapping type.

[source,js]
--------------------------------------------------
Expand Down