001/*
002 * (C) Copyright 2014 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     bdelbosc
018 */
019package org.nuxeo.elasticsearch;
020
021final public class ElasticSearchConstants {
022
023    private ElasticSearchConstants() {
024    }
025
026    public static final String AGG_INCLUDE_PROP = "include";
027
028    public static final String AGG_SIZE_PROP = "size";
029
030    public static final String AGG_MIN_DOC_COUNT_PROP = "minDocCount";
031
032    public static final String AGG_EXCLUDE_PROP = "exclude";
033
034    public static final String AGG_ORDER_PROP = "order";
035
036    public static final String AGG_INTERVAL_PROP = "interval";
037
038    public static final String AGG_EXTENDED_BOUND_MAX_PROP = "extendedBoundsMax";
039
040    public static final String AGG_EXTENDED_BOUND_MIN_PROP = "extendedBoundsMin";
041
042    public static final String AGG_FORMAT_PROP = "format";
043
044    public static final String AGG_TIME_ZONE_PROP = "timeZone";
045
046    public static final String AGG_PRE_ZONE_PROP = "preZone";
047
048    public static final String AGG_ORDER_COUNT_DESC = "count desc";
049
050    public static final String AGG_ORDER_COUNT_ASC = "count asc";
051
052    public static final String AGG_ORDER_TERM_DESC = "term desc";
053
054    public static final String AGG_ORDER_TERM_ASC = "term asc";
055
056    public static final String AGG_ORDER_KEY_DESC = "key desc";
057
058    public static final String AGG_ORDER_KEY_ASC = "key asc";
059
060    public static final String AGG_TYPE_TERMS = "terms";
061
062    public static final String AGG_TYPE_SIGNIFICANT_TERMS = "significant_terms";
063
064    public static final String AGG_TYPE_RANGE = "range";
065
066    public static final String AGG_TYPE_DATE_RANGE = "date_range";
067
068    public static final String AGG_TYPE_HISTOGRAM = "histogram";
069
070    public static final String AGG_TYPE_DATE_HISTOGRAM = "date_histogram";
071
072    public static final String ID_FIELD = "_id";
073
074    public static final String FULLTEXT_FIELD = "_all";
075
076    /**
077     * Elasticsearch type name used to index Nuxeo documents
078     */
079    public static final String DOC_TYPE = "doc";
080
081    /**
082     * Elasticsearch type name used to index Nuxeo audit entries
083     */
084    public static final String ENTRY_TYPE = "entry";
085
086    /**
087     * Elasticsearch type name used for the UID sequencer index
088     */
089    public static final String SEQ_ID_TYPE = "seqId";
090
091    public static final String ACL_FIELD = "ecm:acl";
092
093    public static final String PATH_FIELD = "ecm:path";
094
095    public static final String CHILDREN_FIELD = "ecm:path.children";
096
097    public static final String BINARYTEXT_FIELD = "ecm:binarytext";
098
099    public static final String ALL_FIELDS = "*";
100
101    public static final String ES_ENABLED_PROPERTY = "elasticsearch.enabled";
102
103    public static final String FETCH_DOC_FROM_ES_PROPERTY = "elasticsearch.fetchDocFromEs";
104
105    public static final String REINDEX_BUCKET_READ_PROPERTY = "elasticsearch.reindex.bucketReadSize";
106
107    public static final String REINDEX_BUCKET_WRITE_PROPERTY = "elasticsearch.reindex.bucketWriteSize";
108
109    public static final String REINDEX_ON_STARTUP_PROPERTY = "elasticsearch.reindex.onStartup";
110
111    public static final String DISABLE_AUTO_INDEXING = "disableAutoIndexing";
112
113    public static final String ES_SYNC_INDEXING_FLAG = "ESSyncIndexing";
114
115    public static final String REINDEX_USING_CHILDREN_TRAVERSAL_PROPERTY = "elasticsearch.reindex.useChildrenTraversal";
116
117    /** @since 7.4 */
118    public static final String INDEXING_QUEUE_ID = "elasticSearchIndexing";
119
120    public static final String EPOCH_MILLIS_FORMAT = "epoch_millis";
121
122}