mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
parent
813e053f62
commit
3c059ee057
14 changed files with 1786 additions and 0 deletions
53
docs/java-rest/high-level/ml/find-file-structure.asciidoc
Normal file
53
docs/java-rest/high-level/ml/find-file-structure.asciidoc
Normal file
|
@ -0,0 +1,53 @@
|
|||
--
|
||||
:api: find-file-structure
|
||||
:request: FindFileStructureRequest
|
||||
:response: FindFileStructureResponse
|
||||
--
|
||||
[id="{upid}-{api}"]
|
||||
=== Find File Structure API
|
||||
|
||||
The Find File Structure API can be used to find the structure of a text file
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
<1> Create a new `FindFileStructureRequest` object
|
||||
<2> Add the contents of `anInterestingFile` to the request
|
||||
|
||||
==== Optional Arguments
|
||||
|
||||
The following arguments are optional.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-options]
|
||||
--------------------------------------------------
|
||||
<1> Set the maximum number of lines to sample (the entire sample will be
|
||||
used if it contains fewer lines)
|
||||
<2> Request that an explanation of the analysis be returned in the response
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Find File Structure Response
|
||||
|
||||
A +{response}+ contains information about the file structure,
|
||||
as well as mappings and an ingest pipeline that could be used
|
||||
to index the contents into {es}.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
<1> The `FileStructure` object contains the structure information
|
Loading…
Add table
Add a link
Reference in a new issue