From b8ba08c82bb7f40e0d98f63f6e8eaf3edb8e038f Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Fri, 5 Dec 2025 16:49:44 -0500 Subject: [PATCH 1/5] Re-enable CSV tests for CHUNK function --- .../src/main/resources/chunk.csv-spec | 47 ++++++++++--------- .../elasticsearch/xpack/esql/CsvTests.java | 4 -- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec index f89beacf0757b..717139845f007 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec @@ -38,16 +38,17 @@ FROM books // tag::chunk-with-chunking-settings-result[] book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all his life., Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, : Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child., Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and a, a sordid love triangle, a pathological obsession, and a gripping courtroom drama., But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God., A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] -1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58, volume, breathing an extraordinary variety of life into 58 different scenes, each of which is accompanied by appropriate passage from, , each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] -1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends, none of which were a nose of high rank., Many are reproduced here (the letters, not noses).] -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection, unique to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept, key works and shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic, , these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and, , an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of, the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of, , and uncompromising cynicism, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, whose tragedy turns on an inability to resist crime., Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories.] -1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other, religion, and morality.] +1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort for which he had been preparing all his life., Compelling\, profound\, complex\, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic, : Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning Smerdyakov\, the bastard child., Frequently lurid\, nightmarish\, always brilliant\, the novel plunges the reader into a sordid love triangle\, a pathological obsession\, and a, a sordid love triangle\, a pathological obsession\, and a gripping courtroom drama., But throughout the whole\, Dostoevsky searhes for the truth--about man\, about life\, about the existence of God., A terrifying answer to man's eternal questions\, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] +1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this fabulous volume\, breathing an extraordinary variety of life into 58, volume\, breathing an extraordinary variety of life into 58 different scenes\, each of which is accompanied by appropriate passage from, \, each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] +1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends\, none of which were a nose of high rank., Many are reproduced here (the letters\, not noses).] +1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection\, unique to the Modern Library\, gathers seven of Dostoevsky's key works and shows him to be equally adept, key works and shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works\, these small masterpieces move from the tender and romantic, \, these small masterpieces move from the tender and romantic White Nights\, an archetypal nineteenth-century morality tale of pathos and, \, an archetypal nineteenth-century morality tale of pathos and loss\, to the famous Notes from the Underground\, a story of, the famous Notes from the Underground\, a story of guilt\, ineffectiveness\, and uncompromising cynicism\, and the first major work of, \, and uncompromising cynicism\, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief\, whose tragedy turns on an inability to resist crime., Presented in chronological order\, in David Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's best stories.] +1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other\, religion\, and morality.] // end::chunk-with-chunking-settings-result[] ; chunkTextWithMatch required_capability: chunk_function_v2 +required_capability: match_function FROM books | WHERE MATCH(title, "Return") @@ -62,6 +63,7 @@ book_no:keyword | title:text chunkTextWithMatchMultipleChunksMvExpand required_capability: chunk_function_v2 +required_capability: match_function FROM books | WHERE MATCH(title, "Return") @@ -109,6 +111,7 @@ book_no:keyword | title:text chunkTextWithMatchMultipleChunksMvSliceMvExpand required_capability: chunk_function_v2 +required_capability: match_function FROM books | WHERE MATCH(title, "Return") @@ -142,11 +145,11 @@ FROM books ; book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [The brothers Karamazov In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all, literary effort for which he had been preparing all his life., Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, : Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child., Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and a, a sordid love triangle, a pathological obsession, and a gripping courtroom drama., But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God., A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] -1463 | Realms of Tolkien: Images of Middle-earth | [Realms of Tolkien: Images of Middle-earth Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing, Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58 different scenes, each of, variety of life into 58 different scenes, each of which is accompanied by appropriate passage from The Hobbit and The, accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] -1502 | Selected Passages from Correspondence with Friends | [Selected Passages from Correspondence with Friends Nikolai Gogol wrote some letters to his friends, none of which were a nose, to his friends, none of which were a nose of high rank. Many are reproduced here (the letters, not noses).] -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [The Best Short Stories of Dostoevsky (Modern Library) This collection, unique to the Modern Library, gathers seven of Dostoevsky's key, to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short, shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic, , these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and, , an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of, the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of, , and uncompromising cynicism, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, whose tragedy turns on an inability to resist crime., Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories.] -1985 | Brothers Karamazov | [Brothers Karamazov Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other, religion, and morality.] +1211 | The brothers Karamazov | [The brothers Karamazov In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort for which he had been preparing all, literary effort for which he had been preparing all his life., Compelling\, profound\, complex\, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic, : Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning Smerdyakov\, the bastard child., Frequently lurid\, nightmarish\, always brilliant\, the novel plunges the reader into a sordid love triangle\, a pathological obsession\, and a, a sordid love triangle\, a pathological obsession\, and a gripping courtroom drama., But throughout the whole\, Dostoevsky searhes for the truth--about man\, about life\, about the existence of God., A terrifying answer to man's eternal questions\, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] +1463 | Realms of Tolkien: Images of Middle-earth | [Realms of Tolkien: Images of Middle-earth Twenty new and familiar Tolkien artists are represented in this fabulous volume\, breathing, Tolkien artists are represented in this fabulous volume\, breathing an extraordinary variety of life into 58 different scenes\, each of, variety of life into 58 different scenes\, each of which is accompanied by appropriate passage from The Hobbit and The, accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] +1502 | Selected Passages from Correspondence with Friends | [Selected Passages from Correspondence with Friends Nikolai Gogol wrote some letters to his friends\, none of which were a nose, to his friends\, none of which were a nose of high rank. Many are reproduced here (the letters\, not noses).] +1937 | The Best Short Stories of Dostoevsky (Modern Library) | [The Best Short Stories of Dostoevsky (Modern Library) This collection\, unique to the Modern Library\, gathers seven of Dostoevsky's key, to the Modern Library\, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short, shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works\, these small masterpieces move from the tender and romantic, \, these small masterpieces move from the tender and romantic White Nights\, an archetypal nineteenth-century morality tale of pathos and, \, an archetypal nineteenth-century morality tale of pathos and loss\, to the famous Notes from the Underground\, a story of, the famous Notes from the Underground\, a story of guilt\, ineffectiveness\, and uncompromising cynicism\, and the first major work of, \, and uncompromising cynicism\, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief\, whose tragedy turns on an inability to resist crime., Presented in chronological order\, in David Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's best stories.] +1985 | Brothers Karamazov | [Brothers Karamazov Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other\, religion\, and morality.] ; chunkTextWithMultivaluedField @@ -198,11 +201,11 @@ FROM books ; book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort, effort for which he had been preparing all his life, life. Compelling, profound, complex, it is the story of a, a patricide and of the four sons who each had, had a motive for murder: Dmitry, the sensualist, Ivan, the, , the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the, , the bastard child. Frequently lurid, nightmarish, always brilliant, the novel, novel plunges the reader into a sordid love triangle, a, , a pathological obsession, and a gripping courtroom drama. But throughout, throughout the whole, Dostoevsky searhes for the truth--about man, man, about life, about the existence of God. A terrifying, terrifying answer to man's eternal questions, this monumental work remains, remains the crowning achievement of perhaps the finest novelist of, of all time. From the Paperback edition.] -1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this, this fabulous volume, breathing an extraordinary variety of life into, into 58 different scenes, each of which is accompanied by, by appropriate passage from The Hobbit and The Lord of, of the Rings and The Silmarillion] -1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends, none of, of which were a nose of high rank. Many are, are reproduced here (the letters, not noses).] -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection, unique to the Modern Library, gathers seven of, of Dostoevsky's key works and shows him to be equally, equally adept at the short story as with the novel, novel. Exploring many of the same themes as in his, his longer works, these small masterpieces move from the tender, tender and romantic White Nights, an archetypal nineteenth-century morality, morality tale of pathos and loss, to the famous Notes, Notes from the Underground, a story of guilt, ineffectiveness, and, , and uncompromising cynicism, and the first major work of existential, existential literature. Among Dostoevsky's prototypical characters is Yemelyan in The, The Honest Thief, whose tragedy turns on an inability to, to resist crime. Presented in chronological order, in David Magarshack's, Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's, Dostoevsky's best stories.] -1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia. The murder, murder of their father forces the brothers to question their, their beliefs about each other, religion, and morality.] +1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort, effort for which he had been preparing all his life, life. Compelling\, profound\, complex\, it is the story of a, a patricide and of the four sons who each had, had a motive for murder: Dmitry\, the sensualist\, Ivan\, the, \, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning Smerdyakov\, the, \, the bastard child. Frequently lurid\, nightmarish\, always brilliant\, the novel, novel plunges the reader into a sordid love triangle\, a, \, a pathological obsession\, and a gripping courtroom drama. But throughout, throughout the whole\, Dostoevsky searhes for the truth--about man, man\, about life\, about the existence of God. A terrifying, terrifying answer to man's eternal questions\, this monumental work remains, remains the crowning achievement of perhaps the finest novelist of, of all time. From the Paperback edition.] +1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this, this fabulous volume\, breathing an extraordinary variety of life into, into 58 different scenes\, each of which is accompanied by, by appropriate passage from The Hobbit and The Lord of, of the Rings and The Silmarillion] +1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends\, none of, of which were a nose of high rank. Many are, are reproduced here (the letters\, not noses).] +1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection\, unique to the Modern Library\, gathers seven of, of Dostoevsky's key works and shows him to be equally, equally adept at the short story as with the novel, novel. Exploring many of the same themes as in his, his longer works\, these small masterpieces move from the tender, tender and romantic White Nights\, an archetypal nineteenth-century morality, morality tale of pathos and loss\, to the famous Notes, Notes from the Underground\, a story of guilt\, ineffectiveness\, and, \, and uncompromising cynicism\, and the first major work of existential, existential literature. Among Dostoevsky's prototypical characters is Yemelyan in The, The Honest Thief\, whose tragedy turns on an inability to, to resist crime. Presented in chronological order\, in David Magarshack's, Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's, Dostoevsky's best stories.] +1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia. The murder, murder of their father forces the brothers to question their, their beliefs about each other\, religion\, and morality.] ; chunkWithRecursiveChunkingSettingsAndSeparatorGroup @@ -216,11 +219,11 @@ FROM books ; book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort, Karamazov, the literary effort for which he had been preparing, he had been preparing all his life., Compelling, profound, complex, it is the story of a patricide, story of a patricide and of the four sons who, the four sons who each had a motive for murder, a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning, mystic, and twisted, cunning Smerdyakov, the bastard child., Frequently lurid, nightmarish, always brilliant, the novel plunges the reader, novel plunges the reader into a sordid love triangle, a, sordid love triangle, a pathological obsession, and a gripping courtroom, , and a gripping courtroom drama., But throughout the whole, Dostoevsky searhes for the truth--about, for the truth--about man, about life, about the existence, life, about the existence of God., A terrifying answer to man's eternal questions, this monumental work, questions, this monumental work remains the crowning achievement of perhaps, crowning achievement of perhaps the finest novelist of all time., From the Paperback edition.] -1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this, are represented in this fabulous volume, breathing an extraordinary variety, , breathing an extraordinary variety of life into 58 different scenes, into 58 different scenes, each of which is accompanied by, which is accompanied by appropriate passage from The Hobbit and, from The Hobbit and The Lord of the Rings and, of the Rings and The Silmarillion] -1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends, none of, his friends, none of which were a nose of high, a nose of high rank., Many are reproduced here (the letters, not noses).] -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection, unique to the Modern Library, gathers seven of, Library, gathers seven of Dostoevsky's key works and shows him, works and shows him to be equally adept at the, equally adept at the short story as with the novel., Exploring many of the same themes as in his longer, as in his longer works, these small masterpieces move from, small masterpieces move from the tender and romantic White Nights, and romantic White Nights, an archetypal nineteenth-century morality tale, nineteenth-century morality tale of pathos and loss, to the, and loss, to the famous Notes from the Underground, a, from the Underground, a story of guilt, ineffectiveness, and uncompromising, guilt, ineffectiveness, and uncompromising cynicism, and the first major work, the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, in The Honest Thief, whose tragedy turns on an inability, turns on an inability to resist crime., Presented in chronological order, in David Magarshack's celebrated translation, this, Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's, definitive edition of Dostoevsky's best stories.] -1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question, the brothers to question their beliefs about each other, religion, about each other, religion, and morality.] +1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort, Karamazov\, the literary effort for which he had been preparing, he had been preparing all his life., Compelling\, profound\, complex\, it is the story of a patricide, story of a patricide and of the four sons who, the four sons who each had a motive for murder, a motive for murder: Dmitry\, the sensualist\, Ivan\, the intellectual, sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning, mystic\, and twisted\, cunning Smerdyakov\, the bastard child., Frequently lurid\, nightmarish\, always brilliant\, the novel plunges the reader, novel plunges the reader into a sordid love triangle\, a, sordid love triangle\, a pathological obsession\, and a gripping courtroom, \, and a gripping courtroom drama., But throughout the whole\, Dostoevsky searhes for the truth--about, for the truth--about man\, about life\, about the existence, life\, about the existence of God., A terrifying answer to man's eternal questions\, this monumental work, questions\, this monumental work remains the crowning achievement of perhaps, crowning achievement of perhaps the finest novelist of all time., From the Paperback edition.] +1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this, are represented in this fabulous volume\, breathing an extraordinary variety, \, breathing an extraordinary variety of life into 58 different scenes, into 58 different scenes\, each of which is accompanied by, which is accompanied by appropriate passage from The Hobbit and, from The Hobbit and The Lord of the Rings and, of the Rings and The Silmarillion] +1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends\, none of, his friends\, none of which were a nose of high, a nose of high rank., Many are reproduced here (the letters\, not noses).] +1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection\, unique to the Modern Library\, gathers seven of, Library\, gathers seven of Dostoevsky's key works and shows him, works and shows him to be equally adept at the, equally adept at the short story as with the novel., Exploring many of the same themes as in his longer, as in his longer works\, these small masterpieces move from, small masterpieces move from the tender and romantic White Nights, and romantic White Nights\, an archetypal nineteenth-century morality tale, nineteenth-century morality tale of pathos and loss\, to the, and loss\, to the famous Notes from the Underground\, a, from the Underground\, a story of guilt\, ineffectiveness\, and uncompromising, guilt\, ineffectiveness\, and uncompromising cynicism\, and the first major work, the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, in The Honest Thief\, whose tragedy turns on an inability, turns on an inability to resist crime., Presented in chronological order\, in David Magarshack's celebrated translation\, this, Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's, definitive edition of Dostoevsky's best stories.] +1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question, the brothers to question their beliefs about each other\, religion, about each other\, religion\, and morality.] ; chunkWithRecursiveChunkingSettingsAndSeparators @@ -234,10 +237,10 @@ FROM books ; book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all his life. Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child. Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and, a gripping courtroom drama. But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God. A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] +1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort for which he had been preparing all his life. Compelling\, profound\, complex\, it is the story of a patricide and of the four sons who each had a motive for murder: Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning Smerdyakov\, the bastard child. Frequently lurid\, nightmarish\, always brilliant\, the novel plunges the reader into a sordid love triangle\, a pathological obsession\, and, a gripping courtroom drama. But throughout the whole\, Dostoevsky searhes for the truth--about man\, about life\, about the existence of God. A terrifying answer to man's eternal questions\, this monumental work remains the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] 1463 | Realms of Tolkien: Images of Middle-earth | Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58 different scenes, each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion 1502 | Selected Passages from Correspondence with Friends | Nikolai Gogol wrote some letters to his friends, none of which were a nose of high rank. Many are reproduced here (the letters, not noses). -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection, unique to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short story as with the novel. Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of existential literature. Among Dostoevsky's prototypical characters is Yemelyan i, n The Honest Thief, whose tragedy turns on an inability to resist crime. Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories.] +1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection\, unique to the Modern Library\, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short story as with the novel. Exploring many of the same themes as in his longer works\, these small masterpieces move from the tender and romantic White Nights\, an archetypal nineteenth-century morality tale of pathos and loss\, to the famous Notes from the Underground\, a story of guilt\, ineffectiveness\, and uncompromising cynicism\, and the first major work of existential literature. Among Dostoevsky's prototypical characters is Yemelyan i, n The Honest Thief\, whose tragedy turns on an inability to resist crime. Presented in chronological order\, in David Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's best stories.] 1985 | Brothers Karamazov | Four brothers reunite in their hometown in Russia. The murder of their father forces the brothers to question their beliefs about each other, religion, and morality. ; diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java index 6a94ca2d392b3..decf5634a724d 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java @@ -358,10 +358,6 @@ public final void test() throws Throwable { "CSV tests cannot currently handle subqueries", testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.SUBQUERY_IN_FROM_COMMAND.capabilityName()) ); - assumeFalse( - "CSV tests cannot currently handle CHUNK function", - testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.CHUNK_FUNCTION_V2.capabilityName()) - ); assumeFalse( "can't use PromQL in csv tests", testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.PROMQL_PRE_TECH_PREVIEW_V7.capabilityName()) From a4d6ce52c9fa87a0f98302a41ec238251b6da647 Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Mon, 8 Dec 2025 16:20:34 -0500 Subject: [PATCH 2/5] Update docs examples --- .../_snippets/functions/examples/chunk.md | 32 +++----------- .../esql/_snippets/lists/string-functions.md | 1 + .../kibana/definition/functions/chunk.json | 3 +- .../esql/kibana/docs/functions/chunk.md | 3 +- .../src/main/resources/chunk.csv-spec | 44 ++++--------------- .../function/scalar/string/Chunk.java | 3 +- 6 files changed, 17 insertions(+), 69 deletions(-) diff --git a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md index ec291cb115e3f..6ed726e4d7d9d 100644 --- a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md +++ b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md @@ -1,39 +1,17 @@ % This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. -**Examples** +**Example** ```{applies_to} stack: preview 9.3.0 ``` ```esql -FROM books -| EVAL chunks = CHUNK(description) +ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) ``` -| book_no:keyword | title:text | chunks:keyword | -| --- | --- | --- | -| 1211 | The brothers Karamazov | In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all his life. Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child. Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and a gripping courtroom drama. But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God. A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition. | -| 1463 | Realms of Tolkien: Images of Middle-earth | Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58 different scenes, each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion | -| 1502 | Selected Passages from Correspondence with Friends | Nikolai Gogol wrote some letters to his friends, none of which were a nose of high rank. Many are reproduced here (the letters, not noses). | -| 1937 | The Best Short Stories of Dostoevsky (Modern Library) | This collection, unique to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short story as with the novel. Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of existential literature. Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, whose tragedy turns on an inability to resist crime. Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories. | -| 1985 | Brothers Karamazov | Four brothers reunite in their hometown in Russia. The murder of their father forces the brothers to question their beliefs about each other, religion, and morality. | - -```{applies_to} -stack: preview 9.3.0 -``` - -```esql -FROM books -| EVAL chunks = CHUNK(description, {"strategy": "sentence", "max_chunk_size": 20, "sentence_overlap": 0}) -``` - -| book_no:keyword | title:text | chunks:keyword | -| --- | --- | --- | -| 1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all his life., Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, : Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child., Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and a, a sordid love triangle, a pathological obsession, and a gripping courtroom drama., But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God., A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] | -| 1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58, volume, breathing an extraordinary variety of life into 58 different scenes, each of which is accompanied by appropriate passage from, , each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] | -| 1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends, none of which were a nose of high rank., Many are reproduced here (the letters, not noses).] | -| 1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection, unique to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept, key works and shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic, , these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and, , an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of, the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of, , and uncompromising cynicism, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, whose tragedy turns on an inability to resist crime., Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories.] | -| 1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other, religion, and morality.] | +| result:keyword | +| --- | +| [It was the best of times\, it was the worst, worst of times\, it was the age of wisdom\, it, \, it was the age of foolishness\, it was the epoch, epoch of belief.] | diff --git a/docs/reference/query-languages/esql/_snippets/lists/string-functions.md b/docs/reference/query-languages/esql/_snippets/lists/string-functions.md index ac5f0a327fadb..db5df3406fb4d 100644 --- a/docs/reference/query-languages/esql/_snippets/lists/string-functions.md +++ b/docs/reference/query-languages/esql/_snippets/lists/string-functions.md @@ -1,5 +1,6 @@ * [`BIT_LENGTH`](../../functions-operators/string-functions.md#esql-bit_length) * [`BYTE_LENGTH`](../../functions-operators/string-functions.md#esql-byte_length) +* [`CHUNK`](../../functions-operators/string-functions.md#esql-chunk) * [`CONCAT`](../../functions-operators/string-functions.md#esql-concat) * [`CONTAINS`](../../functions-operators/string-functions.md#esql-contains) * [`ENDS_WITH`](../../functions-operators/string-functions.md#esql-ends_with) diff --git a/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json b/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json index 95ad4f4c75f67..dd63b55e5cf11 100644 --- a/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json +++ b/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json @@ -30,8 +30,7 @@ } ], "examples" : [ - "FROM books\n| EVAL chunks = CHUNK(description)", - "FROM books\n| EVAL chunks = CHUNK(description, {\"strategy\": \"sentence\", \"max_chunk_size\": 20, \"sentence_overlap\": 0})" + "ROW result = CHUNK(\"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.\", {\"strategy\": \"word\", \"max_chunk_size\": 10, \"overlap\": 1})" ], "preview" : true, "snapshot_only" : false diff --git a/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md b/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md index c5f426e32cdda..6c3ce92272104 100644 --- a/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md +++ b/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md @@ -4,6 +4,5 @@ Use `CHUNK` to split a text field into smaller chunks. ```esql -FROM books -| EVAL chunks = CHUNK(description) +ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) ``` diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec index 717139845f007..da631ea8d16f3 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec @@ -5,45 +5,17 @@ chunkDefaults required_capability: chunk_function_v2 -// tag::chunk-with-field[] -FROM books -| EVAL chunks = CHUNK(description) -// end::chunk-with-field[] -| KEEP book_no, title, chunks -| SORT book_no +// tag::chunk-example[] +ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) +// end::chunk-example[] +| KEEP result | LIMIT 5 ; -// tag::chunk-with-field-result[] -book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | In 1880 Dostoevsky completed The Brothers Karamazov, the literary effort for which he had been preparing all his life. Compelling, profound, complex, it is the story of a patricide and of the four sons who each had a motive for murder: Dmitry, the sensualist, Ivan, the intellectual, Alyosha, the mystic, and twisted, cunning Smerdyakov, the bastard child. Frequently lurid, nightmarish, always brilliant, the novel plunges the reader into a sordid love triangle, a pathological obsession, and a gripping courtroom drama. But throughout the whole, Dostoevsky searhes for the truth--about man, about life, about the existence of God. A terrifying answer to man's eternal questions, this monumental work remains the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition. -1463 | Realms of Tolkien: Images of Middle-earth | Twenty new and familiar Tolkien artists are represented in this fabulous volume, breathing an extraordinary variety of life into 58 different scenes, each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion -1502 | Selected Passages from Correspondence with Friends | Nikolai Gogol wrote some letters to his friends, none of which were a nose of high rank. Many are reproduced here (the letters, not noses). -1937 | The Best Short Stories of Dostoevsky (Modern Library) | This collection, unique to the Modern Library, gathers seven of Dostoevsky's key works and shows him to be equally adept at the short story as with the novel. Exploring many of the same themes as in his longer works, these small masterpieces move from the tender and romantic White Nights, an archetypal nineteenth-century morality tale of pathos and loss, to the famous Notes from the Underground, a story of guilt, ineffectiveness, and uncompromising cynicism, and the first major work of existential literature. Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief, whose tragedy turns on an inability to resist crime. Presented in chronological order, in David Magarshack's celebrated translation, this is the definitive edition of Dostoevsky's best stories. -1985 | Brothers Karamazov | Four brothers reunite in their hometown in Russia. The murder of their father forces the brothers to question their beliefs about each other, religion, and morality. -// end::chunk-with-field-result[] -; - -chunkWithChunkingSettings -required_capability: chunk_function_v2 - -// tag::chunk-with-chunking-settings[] -FROM books -| EVAL chunks = CHUNK(description, {"strategy": "sentence", "max_chunk_size": 20, "sentence_overlap": 0}) -// end::chunk-with-chunking-settings[] -| KEEP book_no, title, chunks -| SORT book_no -| LIMIT 5 -; - -// tag::chunk-with-chunking-settings-result[] -book_no:keyword | title:text | chunks:keyword -1211 | The brothers Karamazov | [In 1880 Dostoevsky completed The Brothers Karamazov\, the literary effort for which he had been preparing all his life., Compelling\, profound\, complex\, it is the story of a patricide and of the four sons who each had a motive, of the four sons who each had a motive for murder: Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic, : Dmitry\, the sensualist\, Ivan\, the intellectual\, Alyosha\, the mystic\, and twisted\, cunning Smerdyakov\, the bastard child., Frequently lurid\, nightmarish\, always brilliant\, the novel plunges the reader into a sordid love triangle\, a pathological obsession\, and a, a sordid love triangle\, a pathological obsession\, and a gripping courtroom drama., But throughout the whole\, Dostoevsky searhes for the truth--about man\, about life\, about the existence of God., A terrifying answer to man's eternal questions\, this monumental work remains the crowning achievement of perhaps the finest novelist of, the crowning achievement of perhaps the finest novelist of all time. From the Paperback edition.] -1463 | Realms of Tolkien: Images of Middle-earth | [Twenty new and familiar Tolkien artists are represented in this fabulous volume\, breathing an extraordinary variety of life into 58, volume\, breathing an extraordinary variety of life into 58 different scenes\, each of which is accompanied by appropriate passage from, \, each of which is accompanied by appropriate passage from The Hobbit and The Lord of the Rings and The Silmarillion] -1502 | Selected Passages from Correspondence with Friends | [Nikolai Gogol wrote some letters to his friends\, none of which were a nose of high rank., Many are reproduced here (the letters\, not noses).] -1937 | The Best Short Stories of Dostoevsky (Modern Library) | [This collection\, unique to the Modern Library\, gathers seven of Dostoevsky's key works and shows him to be equally adept, key works and shows him to be equally adept at the short story as with the novel., Exploring many of the same themes as in his longer works\, these small masterpieces move from the tender and romantic, \, these small masterpieces move from the tender and romantic White Nights\, an archetypal nineteenth-century morality tale of pathos and, \, an archetypal nineteenth-century morality tale of pathos and loss\, to the famous Notes from the Underground\, a story of, the famous Notes from the Underground\, a story of guilt\, ineffectiveness\, and uncompromising cynicism\, and the first major work of, \, and uncompromising cynicism\, and the first major work of existential literature., Among Dostoevsky's prototypical characters is Yemelyan in The Honest Thief\, whose tragedy turns on an inability to resist crime., Presented in chronological order\, in David Magarshack's celebrated translation\, this is the definitive edition of Dostoevsky's best stories.] -1985 | Brothers Karamazov | [Four brothers reunite in their hometown in Russia., The murder of their father forces the brothers to question their beliefs about each other\, religion\, and morality.] -// end::chunk-with-chunking-settings-result[] +// tag::chunk-example-result[] +result:keyword +[It was the best of times\, it was the worst, worst of times\, it was the age of wisdom\, it, \, it was the age of foolishness\, it was the epoch, epoch of belief.] +// end::chunk-example-result[] ; chunkTextWithMatch diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java index 59210fd1ca365..8694360a15958 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java @@ -78,8 +78,7 @@ public class Chunk extends EsqlScalarFunction implements OptionalArgument { The number of chunks returned, and the length of the sentences used to create the chunks can be specified. """, examples = { - @Example(file = "chunk", tag = "chunk-with-field", applies_to = "stack: preview 9.3.0"), - @Example(file = "chunk", tag = "chunk-with-chunking-settings", applies_to = "stack: preview 9.3.0") } + @Example(file = "chunk", tag = "chunk-example", applies_to = "stack: preview 9.3.0") } ) public Chunk( Source source, From 6950d8e0f8e263e947b347294326e0cfcf1de611 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Mon, 8 Dec 2025 21:32:29 +0000 Subject: [PATCH 3/5] [CI] Auto commit changes from spotless --- .../xpack/esql/expression/function/scalar/string/Chunk.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java index 8694360a15958..2629349b95dd9 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/Chunk.java @@ -77,8 +77,7 @@ public class Chunk extends EsqlScalarFunction implements OptionalArgument { Chunk will split a text field into smaller chunks, using a sentence-based chunking strategy. The number of chunks returned, and the length of the sentences used to create the chunks can be specified. """, - examples = { - @Example(file = "chunk", tag = "chunk-example", applies_to = "stack: preview 9.3.0") } + examples = { @Example(file = "chunk", tag = "chunk-example", applies_to = "stack: preview 9.3.0") } ) public Chunk( Source source, From 7291dd68602fefb96d3b04ad6ded6b7c005689c8 Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Tue, 9 Dec 2025 08:28:50 -0500 Subject: [PATCH 4/5] Add MV_EXPAND to CHUNK example --- .../esql/_snippets/functions/examples/chunk.md | 4 +++- .../esql/kibana/definition/functions/chunk.json | 2 +- .../query-languages/esql/kibana/docs/functions/chunk.md | 1 + .../esql/qa/testFixtures/src/main/resources/chunk.csv-spec | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md index 6ed726e4d7d9d..3aeaef2034630 100644 --- a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md +++ b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md @@ -8,10 +8,12 @@ stack: preview 9.3.0 ```esql ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) +| MV_EXPAND result ``` | result:keyword | | --- | -| [It was the best of times\, it was the worst, worst of times\, it was the age of wisdom\, it, \, it was the age of foolishness\, it was the epoch, epoch of belief.] | +| It was the best of times, it was the worst, worst of times, it was the age of wisdom, | +| it, , it was the age of foolishness, it was the epoch, epoch of belief. | diff --git a/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json b/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json index dd63b55e5cf11..4e5a2982c4b5c 100644 --- a/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json +++ b/docs/reference/query-languages/esql/kibana/definition/functions/chunk.json @@ -30,7 +30,7 @@ } ], "examples" : [ - "ROW result = CHUNK(\"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.\", {\"strategy\": \"word\", \"max_chunk_size\": 10, \"overlap\": 1})" + "ROW result = CHUNK(\"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.\", {\"strategy\": \"word\", \"max_chunk_size\": 10, \"overlap\": 1})\n| MV_EXPAND result" ], "preview" : true, "snapshot_only" : false diff --git a/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md b/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md index 6c3ce92272104..06a6ea1225f0d 100644 --- a/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md +++ b/docs/reference/query-languages/esql/kibana/docs/functions/chunk.md @@ -5,4 +5,5 @@ Use `CHUNK` to split a text field into smaller chunks. ```esql ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) +| MV_EXPAND result ``` diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec index da631ea8d16f3..a13851a4b1f0b 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec @@ -7,6 +7,7 @@ required_capability: chunk_function_v2 // tag::chunk-example[] ROW result = CHUNK("It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief.", {"strategy": "word", "max_chunk_size": 10, "overlap": 1}) +| MV_EXPAND result // end::chunk-example[] | KEEP result | LIMIT 5 @@ -14,7 +15,8 @@ ROW result = CHUNK("It was the best of times, it was the worst of times, it was // tag::chunk-example-result[] result:keyword -[It was the best of times\, it was the worst, worst of times\, it was the age of wisdom\, it, \, it was the age of foolishness\, it was the epoch, epoch of belief.] +It was the best of times, it was the worst, worst of times, it was the age of wisdom, +it, , it was the age of foolishness, it was the epoch, epoch of belief. // end::chunk-example-result[] ; From ef1b09be0091120096b312b064c395b48483d715 Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Tue, 9 Dec 2025 08:41:20 -0500 Subject: [PATCH 5/5] fix test --- .../esql/_snippets/functions/examples/chunk.md | 6 ++++-- .../esql/qa/testFixtures/src/main/resources/chunk.csv-spec | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md index 3aeaef2034630..183f5ae0b3322 100644 --- a/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md +++ b/docs/reference/query-languages/esql/_snippets/functions/examples/chunk.md @@ -13,7 +13,9 @@ ROW result = CHUNK("It was the best of times, it was the worst of times, it was | result:keyword | | --- | -| It was the best of times, it was the worst, worst of times, it was the age of wisdom, | -| it, , it was the age of foolishness, it was the epoch, epoch of belief. | +| It was the best of times, it was the worst | +| worst of times, it was the age of wisdom, it | +| , it was the age of foolishness, it was the epoch | +| epoch of belief. | diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec index a13851a4b1f0b..6152bca16e5aa 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/chunk.csv-spec @@ -15,8 +15,10 @@ ROW result = CHUNK("It was the best of times, it was the worst of times, it was // tag::chunk-example-result[] result:keyword -It was the best of times, it was the worst, worst of times, it was the age of wisdom, -it, , it was the age of foolishness, it was the epoch, epoch of belief. +It was the best of times, it was the worst +worst of times, it was the age of wisdom, it +, it was the age of foolishness, it was the epoch +epoch of belief. // end::chunk-example-result[] ;