Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / search / checkers / SearchApiLimits.java
blob1fd2d23ebe3088f0c535d04b5ab22980c51db382
1 package com.google.appengine.api.search.checkers;
3 import com.google.appengine.api.search.DateUtil;
4 import com.google.apphosting.api.AppEngineInternal;
6 import java.util.Date;
8 /**
9 * Contains limits on field values, document sizes, and other properties of objects in the Search
10 * API.
12 @AppEngineInternal
13 public class SearchApiLimits {
15 /**
16 * The pattern each document field name should match.
18 public static final String FIELD_NAME_PATTERN = "^[A-Za-z][A-Za-z0-9_]*$";
20 /**
21 * The default number of indexes we will try to return.
23 public static final int GET_INDEXES_DEFAULT_LIMIT = 20;
25 /**
26 * The maximum number of indexes that can be requested to be returned in
27 * list indexes results.
29 public static final int GET_INDEXES_MAXIMUM_LIMIT = 1000;
31 /**
32 * The maximum offset of the first index returned in list indexes results.
34 public static final int GET_INDEXES_MAXIMUM_OFFSET = 1000;
36 /**
37 * The default number of documents requested for get range requests.
39 public static final int GET_RANGE_DEFAULT_LIMIT = 100;
41 /**
42 * The maximum number of documents which can be requested for get range requests.
44 public static final int GET_RANGE_MAXIMUM_LIMIT = 1000;
46 /**
47 * The maximum length of an atom in bytes ({@value}).
49 public static final int MAXIMUM_ATOM_LENGTH = 500;
51 /**
52 * The maximum length of a cursor.
54 public static final int MAXIMUM_CURSOR_LENGTH = 10000;
56 /**
57 * The maximum date that can be stored in a date field.
59 public static final Date MAXIMUM_DATE_VALUE =
60 DateUtil.getEpochPlusDays(
61 Integer.MAX_VALUE, DateUtil.MILLISECONDS_IN_DAY - 1);
63 /**
64 * The maximum length of a document id.
66 public static final int MAXIMUM_DOCUMENT_ID_LENGTH = 500;
68 /**
69 * The maximum length of a document.
71 public static final int MAXIMUM_DOCUMENT_LENGTH = 1 << 20;
73 /**
74 * The maximum length for an index name.
76 public static final int MAXIMUM_INDEX_NAME_LENGTH = 100;
78 /**
79 * The maximum length of a field name in bytes ({@value}).
81 public static final int MAXIMUM_NAME_LENGTH = 500;
83 /**
84 * The maximum negative degrees for latitude.
86 public static final double MAXIMUM_NEGATIVE_LATITUDE = -90.0;
88 /**
89 * The maximum negative degrees for longitude.
91 public static final double MAXIMUM_NEGATIVE_LONGITUDE = -180.0;
93 /**
94 * The maximum value that can be stored in a number field ({@value}).
96 public static final float MAXIMUM_NUMBER_VALUE = 2147483647;
98 /**
99 * The maximum positive degrees for latitude.
101 public static final double MAXIMUM_POSITIVE_LATITUDE = 90.0;
104 * The maximum positive degrees for longitude.
106 public static final double MAXIMUM_POSITIVE_LONGITUDE = 180.0;
109 * The maximum length of a query string.
111 public static final int MAXIMUM_QUERY_LENGTH = 2000;
114 * The maximum length of a text or HTML in bytes ({@value}).
116 public static final int MAXIMUM_TEXT_LENGTH = 1024 * 1024;
119 * The minimum date that can be stored in a date field.
121 public static final Date MINIMUM_DATE_VALUE =
122 DateUtil.getEpochPlusDays(Integer.MIN_VALUE, 0);
125 * The minimum value that can be stored in a number field ({@value}).
127 public static final float MINIMUM_NUMBER_VALUE = -2147483647;
130 * The maximum number of documents allowed per index and delete request.
132 public static final int PUT_MAXIMUM_DOCS_PER_REQUEST = 200;
135 * The default limit on the number of documents to return in results.
137 public static final int SEARCH_DEFAULT_LIMIT = 20;
140 * The default found count accuracy is the limit.
142 public static final int SEARCH_DEFAULT_NUMBER_FOUND_ACCURACY = -1;
145 * The default number of documents to score.
147 public static final int SEARCH_DEFAULT_SORTED_LIMIT = 1000;
150 * The maximum number of documents that can be requested
151 * to be returned in search results.
153 public static final int SEARCH_MAXIMUM_LIMIT = 1000;
156 * The maximum number found accuracy that can be requested.
158 public static final int SEARCH_MAXIMUM_NUMBER_FOUND_ACCURACY = 10000;
161 * The maximum number of names of fields to return in results.
163 public static final int SEARCH_MAXIMUM_NUMBER_OF_FIELDS_TO_RETURN = 100;
166 * The maximum offset into all search results to return results from.
168 public static final int SEARCH_MAXIMUM_OFFSET = 1000;
171 * The maximum number of documents that can be requested to be scored.
173 public static final int SEARCH_MAXIMUM_SORTED_LIMIT = 10000;
176 * This class cannot be instantiated.
178 private SearchApiLimits() {