Skip to content

Commit 46f9022

Browse files
authored
Add Search Applications API (#2082)
1 parent ffbf26d commit 46f9022

14 files changed

+1060
-36
lines changed

output/schema/schema.json

Lines changed: 594 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 8 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { IndexName, Name } from '@_types/common'
21+
import { EpochTime, UnitMillis } from '@_types/Time'
22+
import { InlineScript } from '@_types/Scripting'
23+
24+
export class SearchApplication {
25+
/**
26+
* Search Application name
27+
*/
28+
name: Name
29+
/**
30+
* Indices that are part of the Search Application
31+
*/
32+
indices: IndexName[]
33+
/**
34+
* Last time the Search Application was updated
35+
*/
36+
updated_at_millis: EpochTime<UnitMillis>
37+
/**
38+
* Analytics collection associated to the Search Application
39+
*/
40+
analytics_collection_name?: Name
41+
/**
42+
* Search template to use on search operations
43+
*/
44+
template?: SearchApplicationTemplate
45+
}
46+
47+
export class SearchApplicationTemplate {
48+
script: InlineScript
49+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { RequestBase } from '@_types/Base'
20+
import { Name } from '@_types/common'
21+
22+
/**
23+
* Deletes a search application.
24+
* @rest_spec_name search_application.delete
25+
* @since 8.8.0
26+
* @stability beta
27+
*/
28+
interface Request extends RequestBase {
29+
path_parts: {
30+
/**
31+
* The name of the search application to delete
32+
*/
33+
name: Name
34+
}
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { AcknowledgedResponseBase } from '@_types/Base'
21+
22+
export class Response {
23+
body: AcknowledgedResponseBase
24+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { RequestBase } from '@_types/Base'
20+
import { Name } from '@_types/common'
21+
22+
/**
23+
* Returns the details about a search application
24+
* @rest_spec_name search_application.get
25+
* @since 8.8.0
26+
* @stability beta
27+
*/
28+
interface Request extends RequestBase {
29+
path_parts: {
30+
/**
31+
* The name of the search application
32+
*/
33+
name: Name
34+
}
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { SearchApplication } from '../_types/SearchApplication'
21+
22+
export class Response {
23+
body: SearchApplication
24+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import { RequestBase } from '@_types/Base'
20+
import { Name } from '@_types/common'
21+
import { integer } from '@_types/Numeric'
22+
23+
/**
24+
* Returns the existing search applications.
25+
* @rest_spec_name search_application.list
26+
* @since 8.8.0
27+
* @stability beta
28+
*/
29+
interface Request extends RequestBase {
30+
query_parameters: {
31+
/**
32+
* Query in the Lucene query string syntax"
33+
*/
34+
q?: string
35+
/**
36+
* Starting offset (default: 0)
37+
*/
38+
from?: integer
39+
/**
40+
* specifies a max number of results to get
41+
*/
42+
size?: integer
43+
}
44+
}

0 commit comments

Comments
 (0)