-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] move find file structure to a new API endpoint #67123
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1870,8 +1870,17 @@ public void testFindFileStructure() throws Exception { | |
// end::find-file-structure-request-options | ||
|
||
// tag::find-file-structure-execute | ||
FindFileStructureResponse findFileStructureResponse = | ||
client.machineLearning().findFileStructure(findFileStructureRequest, RequestOptions.DEFAULT); | ||
FindFileStructureResponse findFileStructureResponse = client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will probably be removed once the high level client is updated |
||
.machineLearning() | ||
.findFileStructure( | ||
findFileStructureRequest, | ||
RequestOptions.DEFAULT | ||
.toBuilder() | ||
.setWarningsHandler( | ||
warnings -> Collections.singletonList( | ||
"[POST /_ml/find_file_structure] is deprecated! Use [POST /_text_structure/find_structure] instead." | ||
).equals(warnings) == false | ||
).build()); | ||
// end::find-file-structure-execute | ||
|
||
// tag::find-file-structure-response | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"ml.find_file_structure":{ | ||
"text_structure.find_structure":{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. opted to not keep the old yaml definition (with deprecation) as the API was experimental. |
||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-find-file-structure.html", | ||
"description":"Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch." | ||
|
@@ -13,7 +13,7 @@ | |
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_ml/find_file_structure", | ||
"path":"/_text_structure/find_structure", | ||
"methods":[ | ||
"POST" | ||
] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apply plugin: 'elasticsearch.esplugin' | ||
esplugin { | ||
name 'x-pack-text-structure' | ||
description 'Elasticsearch Expanded Pack Plugin - Text Structure' | ||
classname 'org.elasticsearch.xpack.textstructure.TextStructurePlugin' | ||
extendedPlugins = ['x-pack-core'] | ||
} | ||
archivesBaseName = 'x-pack-text-structure' | ||
|
||
dependencies { | ||
compileOnly project(path: xpackModule('core'), configuration: 'default') | ||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
api project(':libs:elasticsearch-grok') | ||
api "com.ibm.icu:icu4j:${versions.icu4j}" | ||
api "net.sf.supercsv:super-csv:${versions.supercsv}" | ||
} | ||
|
||
addQaCheckDependencies() | ||
|
||
tasks.named("testingConventions").configure { enabled = false } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
017f8708c929029dde48bc298deaf3c7ae2452d3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably be removed once the high level client is updated