1 package com
.google
.appengine
.api
.search
.checkers
;
3 import com
.google
.appengine
.api
.search
.DateUtil
;
8 * Contains limits on field values, document sizes, and other properties of objects in the Search
11 public class SearchApiLimits
{
14 * The pattern each document field name should match.
16 public static final String FIELD_NAME_PATTERN
= "^[A-Za-z][A-Za-z0-9_]*$";
19 * The default number of indexes we will try to return.
21 public static final int GET_INDEXES_DEFAULT_LIMIT
= 20;
24 * The maximum number of indexes that can be requested to be returned in
25 * list indexes results.
27 public static final int GET_INDEXES_MAXIMUM_LIMIT
= 1000;
30 * The maximum offset of the first index returned in list indexes results.
32 public static final int GET_INDEXES_MAXIMUM_OFFSET
= 1000;
35 * The default number of documents requested for get range requests.
37 public static final int GET_RANGE_DEFAULT_LIMIT
= 100;
40 * The maximum number of documents which can be requested for get range requests.
42 public static final int GET_RANGE_MAXIMUM_LIMIT
= 1000;
45 * The maximum length of an atom in bytes ({@value}).
47 public static final int MAXIMUM_ATOM_LENGTH
= 500;
50 * The maximum length of a cursor.
52 public static final int MAXIMUM_CURSOR_LENGTH
= 10000;
55 * The maximum date that can be stored in a date field.
57 public static final Date MAXIMUM_DATE_VALUE
=
58 DateUtil
.getEpochPlusDays(
59 Integer
.MAX_VALUE
, DateUtil
.MILLISECONDS_IN_DAY
- 1);
62 * The maximum length of a document id.
64 public static final int MAXIMUM_DOCUMENT_ID_LENGTH
= 500;
67 * The maximum length of a document.
69 public static final int MAXIMUM_DOCUMENT_LENGTH
= 1 << 20;
72 * The maximum length for an index name.
74 public static final int MAXIMUM_INDEX_NAME_LENGTH
= 100;
77 * The maximum length of a field or facet name in bytes ({@value}).
79 public static final int MAXIMUM_NAME_LENGTH
= 500;
82 * The maximum negative degrees for latitude.
84 public static final double MAXIMUM_NEGATIVE_LATITUDE
= -90.0;
87 * The maximum negative degrees for longitude.
89 public static final double MAXIMUM_NEGATIVE_LONGITUDE
= -180.0;
92 * The maximum value that can be stored in a number field ({@value}).
94 public static final double MAXIMUM_NUMBER_VALUE
= 2147483647;
97 * The maximum positive degrees for latitude.
99 public static final double MAXIMUM_POSITIVE_LATITUDE
= 90.0;
102 * The maximum positive degrees for longitude.
104 public static final double MAXIMUM_POSITIVE_LONGITUDE
= 180.0;
107 * The maximum length of a query string.
109 public static final int MAXIMUM_QUERY_LENGTH
= 2000;
112 * The maximum length of a text or HTML in bytes ({@value}).
114 public static final int MAXIMUM_TEXT_LENGTH
= 1024 * 1024;
117 * The minimum date that can be stored in a date field.
119 public static final Date MINIMUM_DATE_VALUE
=
120 DateUtil
.getEpochPlusDays(Integer
.MIN_VALUE
, 0);
123 * The minimum value that can be stored in a number field ({@value}).
125 public static final double MINIMUM_NUMBER_VALUE
= -2147483647;
128 * The maximum number of documents allowed per index and delete request.
130 public static final int PUT_MAXIMUM_DOCS_PER_REQUEST
= 200;
133 * The default limit on the number of documents to return in results.
135 public static final int SEARCH_DEFAULT_LIMIT
= 20;
138 * The default found count accuracy is the limit.
140 public static final int SEARCH_DEFAULT_NUMBER_FOUND_ACCURACY
= -1;
143 * The default number of documents to score.
145 public static final int SEARCH_DEFAULT_SORTED_LIMIT
= 1000;
148 * The maximum number of documents that can be requested
149 * to be returned in search results.
151 public static final int SEARCH_MAXIMUM_LIMIT
= 1000;
154 * The maximum number found accuracy that can be requested.
156 public static final int SEARCH_MAXIMUM_NUMBER_FOUND_ACCURACY
= 25000;
159 * The maximum number of names of fields to return in results.
161 public static final int SEARCH_MAXIMUM_NUMBER_OF_FIELDS_TO_RETURN
= 1000;
164 * The maximum offset into all search results to return results from.
166 public static final int SEARCH_MAXIMUM_OFFSET
= 1000;
169 * The maximum number of documents that can be requested to be scored.
171 public static final int SEARCH_MAXIMUM_SORTED_LIMIT
= 10000;
174 * The maximum number of facet discoveries that can be requested.
176 public static final int FACET_MAXIMUM_DISCOVERY_LIMIT
= 100;
179 * The default value for number of discovered facets.
181 public static final int FACET_DEFAULT_DISCOVERY_LIMIT
= 10;
184 * The maximum number for facet depth option.
186 public static final int FACET_MAXIMUM_DEPTH
= 10000;
189 * The maximum value for facet value limit option.
191 public static final int FACET_MAXIMUM_VALUE_LIMIT
= 20;
194 * The maximum number of facet value constraint can be requested.
196 public static final int FACET_MAXIMUM_CONSTRAINTS
= 50;
199 * The maximum number of facet ranges can be requested.
201 public static final int FACET_MAXIMUM_RANGES
= 50;
204 * This class cannot be instantiated.
206 private SearchApiLimits() {