Skip to content

Commit

Permalink
revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
janheise committed Nov 6, 2024
1 parent 2b69867 commit 6dd636e
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Strings;
import io.swagger.annotations.ApiParam;
import org.graylog.plugins.views.search.searchtypes.pivot.SortSpec;
import org.graylog2.plugin.Message;
import org.graylog2.plugin.indexer.searches.timeranges.TimeRange;
Expand All @@ -27,15 +26,15 @@
import java.util.Set;
import java.util.stream.Collectors;

public record MessagesRequestSpec(@ApiParam(name = "query", value = "Query (Lucene syntax)", required = true) @JsonProperty("query") String queryString,
@ApiParam(name = "streams", value = "Streams to search") @JsonProperty("streams") Set<String> streams,
@ApiParam(name = "stream_categories", value = "Stream categories") @JsonProperty("stream_categories") Set<String> streamCategories,
@ApiParam(name = "timerange", value = "Timerange for the search", required = true) @JsonProperty("timerange") TimeRange timerange,
@ApiParam(name = "sort", value = "Field to sort on") @JsonProperty("sort") String sort,
@ApiParam(name = "sort_order", value = "Sort order (ASC or DESC)") @JsonProperty("sort_order") SortSpec.Direction sortOrder,
@ApiParam(name = "from", value = "Number of elements to skip") @JsonProperty("from") int from,
@ApiParam(name = "size", value = "Number of results to return") @JsonProperty("size") int size,
@ApiParam(name = "fields", value = "Fields to show from the messages in the result set") @JsonProperty("fields") List<String> fields) implements SearchRequestSpec {
public record MessagesRequestSpec(@JsonProperty("query") String queryString,
@JsonProperty("streams") Set<String> streams,
@JsonProperty("stream_categories") Set<String> streamCategories,
@JsonProperty("timerange") TimeRange timerange,
@JsonProperty("sort") String sort,
@JsonProperty("sort_order") SortSpec.Direction sortOrder,
@JsonProperty("from") int from,
@JsonProperty("size") int size,
@JsonProperty("fields") List<String> fields) implements SearchRequestSpec {


public static final List<String> DEFAULT_FIELDS = List.of("source", "timestamp");
Expand Down

0 comments on commit 6dd636e

Please sign in to comment.