File tree Expand file tree Collapse file tree 6 files changed +72
-48
lines changed
specification/search_application Expand file tree Collapse file tree 6 files changed +72
-48
lines changed Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { IndexName , Name } from '@_types/common'
21- import { Script } from '@_types/Scripting'
20+ import { Name } from '@_types/common'
2221import { EpochTime , UnitMillis } from '@_types/Time'
22+ import { SearchApplicationParameters } from './SearchApplicationParameters'
2323
24- export class SearchApplication {
24+ export class SearchApplication extends SearchApplicationParameters {
2525 /**
26- * Search Application name.
26+ * Search Application name
2727 */
2828 name : Name
29- /**
30- * Indices that are part of the Search Application.
31- */
32- indices : IndexName [ ]
3329 /**
3430 * Last time the Search Application was updated.
3531 */
3632 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- /**
49- * The associated mustache template.
50- */
51- script : Script
5233}
Original file line number Diff line number Diff line change 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 { SearchApplicationTemplate } from './SearchApplicationTemplate'
22+
23+ export class SearchApplicationParameters {
24+ /**
25+ * Indices that are part of the Search Application.
26+ */
27+ indices : IndexName [ ]
28+ /**
29+ * Analytics collection associated to the Search Application.
30+ */
31+ analytics_collection_name ?: Name
32+ /**
33+ * Search template to use on search operations.
34+ */
35+ template ?: SearchApplicationTemplate
36+ }
Original file line number Diff line number Diff line change 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 { Script } from '@_types/Scripting'
21+
22+ export class SearchApplicationTemplate {
23+ /**
24+ * The associated mustache template.
25+ */
26+ script : Script
27+ }
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { SearchApplication } from '.. /_types/SearchApplication'
20+ import { SearchApplication } from '@search_application /_types/SearchApplication'
2121
2222export class Response {
2323 body : SearchApplication
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { IndexName , Name } from '@_types/common '
20+ import { SearchApplication } from '@search_application/ _types/SearchApplication '
2121import { long } from '@_types/Numeric'
22- import { EpochTime , UnitMillis } from '@_types/Time'
2322
2423export class Response {
2524 body : {
2625 count : long
27- results : SearchApplicationListItem [ ]
26+ results : SearchApplication [ ]
2827 }
2928}
30-
31- export class SearchApplicationListItem {
32- /**
33- * Search Application name
34- */
35- name : Name
36- /**
37- * Indices that are part of the Search Application
38- */
39- indices : IndexName [ ]
40- /**
41- * Last time the Search Application was updated
42- */
43- updated_at_millis : EpochTime < UnitMillis >
44- /**
45- * Analytics collection associated to the Search Application
46- */
47- analytics_collection_name ?: Name
48- }
Original file line number Diff line number Diff line change 1818 */
1919import { RequestBase } from '@_types/Base'
2020import { Name } from '@_types/common'
21- import { SearchApplication } from '../_types/SearchApplication '
21+ import { SearchApplicationParameters } from '../_types/SearchApplicationParameters '
2222
2323/**
2424 * Create or update a search application.
@@ -44,5 +44,5 @@ export interface Request extends RequestBase {
4444 * Contains parameters for a search application.
4545 */
4646 /** @codegen_name search_application */
47- body : SearchApplication
47+ body : SearchApplicationParameters
4848}
You can’t perform that action at this time.
0 commit comments