[ML] move find file structure finder in Rest high Level client to its new endpoint and plugin (#67290)

Find file structure finder is now its own plugin, and separated from the ml plugin.

This commit updates the rest high level client to reflect this.

Additionally, this adjusts the internal and client object names from `FileStructure` to the more general `TextStructure`
This commit is contained in:
Benjamin Trent 2021-01-14 08:16:52 -05:00 committed by GitHub
parent 4d03817dc2
commit 5cf569ffff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 945 additions and 768 deletions

View file

@ -301,7 +301,6 @@ The Java High Level REST Client supports the following {ml} APIs:
* <<{upid}-estimate-model-memory>>
* <<{upid}-evaluate-data-frame>>
* <<{upid}-explain-data-frame-analytics>>
* <<{upid}-find-file-structure>>
* <<{upid}-flush-job>>
* <<{upid}-forecast-job>>
* <<{upid}-get-job>>
@ -366,8 +365,6 @@ include::ml/estimate-model-memory.asciidoc[]
include::ml/evaluate-data-frame.asciidoc[]
// EXPLAIN
include::ml/explain-data-frame-analytics.asciidoc[]
// FIND
include::ml/find-file-structure.asciidoc[]
// FLUSH
include::ml/flush-job.asciidoc[]
// FORECAST
@ -529,6 +526,17 @@ include::security/create-api-key.asciidoc[]
include::security/get-api-key.asciidoc[]
include::security/invalidate-api-key.asciidoc[]
[role="xpack"]
== Text Structure APIs
:upid: {mainid}-text-structure
:doc-tests-file: {doc-tests}/TextStructureClientDocumentationIT.java
The Java High Level REST Client supports the following Text Structure APIs:
* <<{upid}-find-structure>>
include::textstructure/find-structure.asciidoc[]
[role="xpack"]
== Watcher APIs

View file

@ -1,30 +1,29 @@
--
:api: find-file-structure
:request: FindFileStructureRequest
:response: FindFileStructureResponse
:api: find-structure
:request: FindStructureRequest
:response: FindStructureResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Find file structure API
=== Find structure API
experimental::[]
Determines the structure of a text file and other information that will be
Determines the structure of text and other information that will be
useful to import its contents to an {es} index. It accepts a +{request}+ object
and responds with a +{response}+ object.
[id="{upid}-{api}-request"]
==== Find file structure request
==== Find structure request
A sample from the beginning of the file (or the entire file contents if
it's small) must be added to the +{request}+ object using the
`FindFileStructureRequest#setSample` method.
A sample of the text to analyze must be added to the +{request}+
object using the `FindStructureRequest#setSample` method.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> Create a new `FindFileStructureRequest` object
<1> Create a new `FindStructureRequest` object
<2> Add the contents of `anInterestingFile` to the request
==== Optional arguments
@ -42,9 +41,9 @@ include-tagged::{doc-tests-file}[{api}-request-options]
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Find file structure response
==== Find structure response
A +{response}+ contains information about the file structure,
A +{response}+ contains information about the text structure,
as well as mappings and an ingest pipeline that could be used
to index the contents into {es}.
@ -52,4 +51,4 @@ to index the contents into {es}.
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> The `FileStructure` object contains the structure information
<1> The `TextStructure` object contains the structure information