summaryrefslogtreecommitdiff
path: root/modules/lang-painless/src/main/resources/org/elasticsearch/painless/org.elasticsearch.txt
blob: ce78f8a63155d5f32a0ad0c35eb795067949dafc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Painless definition file. This defines the hierarchy of classes,
# what methods and fields they have, etc.
#

#### Primitive types

class void -> void {
}

class boolean -> boolean {
}

class byte -> byte {
}

class short -> short {
}

class char -> char {
}

class int -> int {
}

class long -> long {
}

class float -> float {
}

class double -> double {
}

class def -> java.lang.Object {
  boolean equals(Object)
  int hashCode()
  String toString()
}


#### Painless debugging API

class Debug -> org.elasticsearch.painless.api.Debug extends Object {
  void explain(Object)
}

#### ES Scripting API

class org.elasticsearch.common.geo.GeoPoint -> org.elasticsearch.common.geo.GeoPoint extends Object {
  double getLat()
  double getLon()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.Strings -> org.elasticsearch.index.fielddata.ScriptDocValues$Strings extends List,Collection,Iterable,Object {
  String get(int)
  String getValue()
  List getValues()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.Longs -> org.elasticsearch.index.fielddata.ScriptDocValues$Longs extends List,Collection,Iterable,Object {
  Long get(int)
  long getValue()
  List getValues()
  org.joda.time.ReadableDateTime getDate()
  List getDates()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.Dates -> org.elasticsearch.index.fielddata.ScriptDocValues$Dates extends List,Collection,Iterable,Object {
  org.joda.time.ReadableDateTime get(int)
  org.joda.time.ReadableDateTime getValue()
  List getValues()
  org.joda.time.ReadableDateTime getDate()
  List getDates()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.Doubles -> org.elasticsearch.index.fielddata.ScriptDocValues$Doubles extends List,Collection,Iterable,Object {
  Double get(int)
  double getValue()
  List getValues()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints -> org.elasticsearch.index.fielddata.ScriptDocValues$GeoPoints extends List,Collection,Iterable,Object {
  org.elasticsearch.common.geo.GeoPoint get(int)
  org.elasticsearch.common.geo.GeoPoint getValue()
  List getValues()
  double getLat()
  double getLon()
  double[] getLats()
  double[] getLons()

  # geo distance functions
  double arcDistance(double,double)
  double arcDistanceWithDefault(double,double,double)
  double planeDistance(double,double)
  double planeDistanceWithDefault(double,double,double)
  double geohashDistance(String)
  double geohashDistanceWithDefault(String,double)
}

class org.elasticsearch.index.fielddata.ScriptDocValues.Booleans -> org.elasticsearch.index.fielddata.ScriptDocValues$Booleans extends List,Collection,Iterable,Object {
  Boolean get(int)
  boolean getValue()
  List getValues()
}

class org.elasticsearch.index.fielddata.ScriptDocValues.BytesRefs -> org.elasticsearch.index.fielddata.ScriptDocValues$BytesRefs extends List,Collection,Iterable,Object {
  BytesRef get(int)
  BytesRef getValue()
  List getValues()
}

class BytesRef -> org.apache.lucene.util.BytesRef extends Object {
  byte[] bytes
  int offset
  int length
  boolean bytesEquals(BytesRef)
  String utf8ToString()
}

class org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues -> org.elasticsearch.index.mapper.IpFieldMapper$IpFieldType$IpScriptDocValues extends List,Collection,Iterable,Object {
  String get(int)
  String getValue()
  List getValues()
}

# for testing.
# currently FeatureTest exposes overloaded constructor, field load store, and overloaded static methods
class org.elasticsearch.painless.FeatureTest -> org.elasticsearch.painless.FeatureTest extends Object {
  org.elasticsearch.painless.FeatureTest <init>()
  org.elasticsearch.painless.FeatureTest <init>(int,int)
  int getX()
  int getY()
  void setX(int)
  void setY(int)
  boolean overloadedStatic()
  boolean overloadedStatic(boolean)
  Object twoFunctionsOfX(Function,Function)
  void listInput(List)
}

class org.elasticsearch.search.lookup.FieldLookup -> org.elasticsearch.search.lookup.FieldLookup extends Object {
  def getValue()
  List getValues()
  boolean isEmpty()
}