Skip to content

Commit

Permalink
Merge branch 'master' into systemd_service_conf
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Mar 13, 2018
2 parents 509c0a2 + edc57f6 commit 7a942dc
Show file tree
Hide file tree
Showing 127 changed files with 741 additions and 171 deletions.
2 changes: 2 additions & 0 deletions buildSrc/src/main/resources/forbidden/es-all-signatures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ java.nio.channels.SocketChannel#connect(java.net.SocketAddress)
# org.elasticsearch.common.Booleans#parseBoolean(java.lang.String) directly on the string.
@defaultMessage use org.elasticsearch.common.Booleans#parseBoolean(java.lang.String)
java.lang.Boolean#getBoolean(java.lang.String)

org.apache.lucene.util.IOUtils @ use @org.elasticsearch.core.internal.io instead
16 changes: 6 additions & 10 deletions distribution/packages/src/common/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,15 @@ chown -R root:elasticsearch /etc/elasticsearch
chmod g+s /etc/elasticsearch
chmod 0750 /etc/elasticsearch

if [ -f /etc/default/elasticsearch ]; then
chown root:elasticsearch /etc/default/elasticsearch
if [ -f ${path.env} ]; then
chown root:elasticsearch ${path.env}
fi

if [ -f /etc/sysconfig/elasticsearch ]; then
chown root:elasticsearch /etc/sysconfig/elasticsearch
fi

if [ ! -f "$ES_PATH_CONF"/elasticsearch.keystore ]; then
if [ ! -f /etc/elasticsearch/elasticsearch.keystore ]; then
/usr/share/elasticsearch/bin/elasticsearch-keystore create
chown root:elasticsearch "$ES_PATH_CONF"/elasticsearch.keystore
chmod 660 "$ES_PATH_CONF"/elasticsearch.keystore
md5sum "$ES_PATH_CONF"/elasticsearch.keystore > "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum
chown root:elasticsearch /etc/elasticsearch/elasticsearch.keystore
chmod 660 /etc/elasticsearch/elasticsearch.keystore
md5sum /etc/elasticsearch/elasticsearch.keystore > /etc/elasticsearch/.elasticsearch.keystore.initial_md5sum
fi

${scripts.footer}
11 changes: 3 additions & 8 deletions distribution/packages/src/common/scripts/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ case "$1" in
;;
esac

ES_ENV_FILE="${path.env}"
if [ -f "$ES_ENV_FILE" ]; then
. "$ES_ENV_FILE"
fi

# Stops the service
if [ "$STOP_REQUIRED" = "true" ]; then
echo -n "Stopping elasticsearch service..."
Expand All @@ -70,9 +65,9 @@ if [ "$STOP_REQUIRED" = "true" ]; then
echo " OK"
fi

if [ -f "$ES_PATH_CONF"/elasticsearch.keystore ]; then
if md5sum --status -c "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum; then
rm "$ES_PATH_CONF"/elasticsearch.keystore "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum
if [ -f /etc/elasticsearch/elasticsearch.keystore ]; then
if md5sum --status -c /etc/elasticsearch/.elasticsearch.keystore.initial_md5sum; then
rm /etc/elasticsearch/elasticsearch.keystore /etc/elasticsearch/.elasticsearch.keystore.initial_md5sum
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import org.apache.lucene.search.spell.LevensteinDistance;
import org.apache.lucene.util.CollectionUtil;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.core.internal.io.IOUtils;
import org.elasticsearch.Version;
import org.elasticsearch.bootstrap.JarHell;
import org.elasticsearch.cli.EnvironmentAwareCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.elasticsearch.plugins;

import org.apache.lucene.util.IOUtils;
import org.elasticsearch.core.internal.io.IOUtils;
import org.elasticsearch.cli.Command;
import org.elasticsearch.cli.LoggingAwareMultiCommand;
import org.elasticsearch.cli.MultiCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.core.internal.io.IOUtils;
import org.elasticsearch.cli.EnvironmentAwareCommand;
import org.elasticsearch.cli.ExitCodes;
import org.elasticsearch.cli.Terminal;
Expand Down
16 changes: 2 additions & 14 deletions docs/reference/indices/put-mapping.asciidoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
[[indices-put-mapping]]
== Put Mapping

The PUT mapping API allows you to add a new type to an existing index, or add new
fields to an existing type:
The PUT mapping API allows you to add fields to an existing index or to change search only settings of existing fields.

[source,js]
--------------------------------------------------
PUT twitter <1>
{}
PUT twitter/_mapping/_doc <2>
{
"properties": {
"name": {
"type": "text"
}
}
}
PUT twitter/_mapping/_doc <3>
{
"properties": {
"email": {
Expand All @@ -29,8 +19,7 @@ PUT twitter/_mapping/_doc <3>
--------------------------------------------------
// CONSOLE
<1> <<indices-create-index,Creates an index>> called `twitter` without any type mapping.
<2> Uses the PUT mapping API to add a new mapping type called `user`.
<3> Uses the PUT mapping API to add a new field called `email` to the `user` mapping type.
<2> Uses the PUT mapping API to add a new field called `email` to the `_doc` mapping type.

More information on how to define type mappings can be found in the
<<mapping,mapping>> section.
Expand Down Expand Up @@ -125,4 +114,3 @@ PUT my_index/_mapping/_doc

Each <<mapping-params,mapping parameter>> specifies whether or not its setting
can be updated on an existing field.

Loading

0 comments on commit 7a942dc

Please sign in to comment.