Skip to content

Commit

Permalink
Revert "add fields param in toxcontent() for doc level query (opensea…
Browse files Browse the repository at this point in the history
…rch-project#549) (opensearch-project#555)"

This reverts commit dcf288d.

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Nov 27, 2023
1 parent 92da659 commit af50b2e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ data class DocLevelQuery(
builder.startObject()
.field(QUERY_ID_FIELD, id)
.field(NAME_FIELD, name)
.field(FIELDS_FIELD, fields.toTypedArray())
.field(QUERY_FIELD, query)
.field(TAGS_FIELD, tags.toTypedArray())
.endObject()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,18 +417,6 @@ class XContentTests {
)
}

@Test
fun `test doc level query toXcontent`() {
val dlq = DocLevelQuery("id", "name", listOf("f1", "f2"), "query", listOf("t1", "t2"))
val dlqString = dlq.toXContent(builder(), ToXContent.EMPTY_PARAMS).string()
val parsedDlq = DocLevelQuery.parse(parser(dlqString))
Assertions.assertEquals(
dlq,
parsedDlq,
"Round tripping Doc level query doesn't work"
)
}

@Test
fun `test alert parsing`() {
val alert = randomAlert()
Expand Down

0 comments on commit af50b2e

Please sign in to comment.