Commit graph

11 commits

Author SHA1 Message Date
Jan Kuipers
c70956ac16
[text structure] Find field and message structure endpoints (#105660)
* Extract AbstractFindStructureRequest

* Extract FindStructureResponse

* Extract RestFindStructureRequestParser

* FindFieldStructure endpoint

* FindMessageStructure endpoint

* Improve FindTextStructureResponseTests

* REST API spec + YAML REST tests

* Lint fixes

* Remove POST find_field_structure

* Update docs/changelog/105660.yaml

* Update changelog

* Fix text_structure.find_field_structure.json

* Fix find_field_structure yaml rest test

* Fix FindTextStructureResponseTests

* Fix YAML tests with security

* Remove unreachable code

* DelimitedTextStructureFinder::createFromMessages

* NdJsonTextStructureFinderFactory::createFromMessages

* XmlTextStructureFinderFactory::createFromMessages

* LogTextStructureFinderFactory::createFromMessages

* Lint fixes

* Add createFromMessages to TextStructureFinderFactory interface

* Wire createFromMessages in the endpoints

* Uppercase UTF-8

* REST test for semi-structured messages

* Restrict query params to applicable endpoints

* typo

* Polish thread scheduling

* Propagate parent task in search request

* No header row for find message/field structure

* Expose findTextStructure more consistently

* Move text structure query params to shared doc

* Rename "find structure API" -> "find text structure API"

* Find message structure API docs

* Find field structure docs

* Maybe fix docs error?

* bugfix

* Fix docs?

* Fix find-field-structure test from docs

* Improve docs

* Add param documents_to_sample to docs

* improve docs
2024-03-06 11:03:42 +01:00
Jan Kuipers
5dec83f69e
Endpoint to test Grok pattern (#104394)
* Add extract match ranges functionality to Grok.

* TestGrokPatternAction and Request

* TestGrokPattern response

* Update docs/changelog/104394.yaml

* Polish validation error message

* Improve test_grok_pattern API

* Add explicit CharSet

* Add endpoint to operator constants

* Add TransportTestGrokPatternActionTests

* REST API spec

* One more TransportTestGrokPatternActionTest

* Fix API spec

* Refactor REST API spec

* Polish code

* Replace TransportTestGrokPatternActionTests by a YAML REST test

* Add ecs_compatibility

* Always return arrays in the API

* Documentation

* YAML test for ecs_compatibility

* Rename doc fileø

* serverless scope

* Fix docs (hopefully)

* Update docs/reference/rest-api/index.asciidoc

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Add "text structure APIs" header in docs TOC

* Move file

* Remove test grok from main index

* typo

* Nested APIs underneath text structure

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2024-01-24 09:35:59 +01:00
David Roberts
a635230e1c
[ML] Unmute text-structure docs test (#92224)
This test should no longer fail now that #91829 has fixed
the underlying problem.
2022-12-08 09:19:41 +00:00
Craig Taverner
47e5739493
Mute reference/text-structure/apis/find-structure/line_264 for #92141 (#92144)
* Mute test for #92141

* Update docs/reference/text-structure/apis/find-structure.asciidoc
2022-12-06 15:01:45 +01:00
Ed Savage
f355787165
[ML] Allow overriding timestamp field to null in file structure finder (#90764)
Use a magic value of "null" for the timestamp format override to indicate to the analysis that a timestamp is not expected in the input text. This should improve performance when analysing delimited, ndjson or xml formatted text files that don't contain timestamps. For semi-structured text files without timestamps the magic value indicates to treat the text as single line log messages.

see #55219
2022-10-12 09:08:25 +01:00
Ed Savage
188f8872c6
[ML] ECS Grok patterns in the _text_structure/find_structure endpoint (#88982)
Also add support for new CATALINA/TOMCAT timestamp formats used by ECS Grok patterns

Relates #77065

Co-authored-by: David Roberts <dave.roberts@elastic.co>
2022-08-04 18:39:04 +01:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
Benjamin Trent
24ebcc8c24
[ML] [DOCS] update find-structure reference docs (#67586)
The text structure finder API documentation had many references to the "files". While this is one use of the API, the API now has a more generic name. This commit replaces many references to the word "file" to the more generic word "text".
2021-01-15 12:19:38 -05:00
James Rodewig
e795ab965a
[DOCS] Fix API titles (#67475) 2021-01-13 15:15:37 -05:00
Benjamin Trent
a437af3406
[ML] rename the text structure action and update required permissions (#67388)
This renames the text structure finder action to match the plugin name.
Also, this adds a new reserved role name so that adding specific permissions for this API is simple.
2021-01-13 14:11:25 -05:00
Lisa Cawley
401d302c69
[DOCS] Move find file structure to a new API endpoint (#67314) 2021-01-12 11:59:45 -08:00