Skip to content

Commit

Permalink
SearchType.Result proper deserialization (#21573)
Browse files Browse the repository at this point in the history
* SearchType.Result proper deserialization

* Removing name, that is not necessary
  • Loading branch information
luk-kaminski authored Feb 10, 2025
1 parent fd314c5 commit 65c33c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import org.graylog.plugins.views.search.searchtypes.MessageList;
import org.graylog.plugins.views.search.searchtypes.events.EventList;
import org.graylog.plugins.views.search.searchtypes.pivot.Pivot;
import org.graylog.plugins.views.search.searchtypes.pivot.PivotResult;
import org.graylog.plugins.views.search.searchtypes.pivot.PivotSort;
import org.graylog.plugins.views.search.searchtypes.pivot.SeriesSort;
import org.graylog.plugins.views.search.searchtypes.pivot.buckets.AutoInterval;
Expand Down Expand Up @@ -191,6 +192,11 @@ protected void configure() {
registerJacksonSubtype(Pivot.class);
registerJacksonSubtype(EventList.class);

//search type results
registerJacksonSubtype(PivotResult.class);
registerJacksonSubtype(MessageList.Result.class);
registerJacksonSubtype(EventList.Result.class);

// pivot specs
registerJacksonSubtype(Values.class);
registerJacksonSubtype(Time.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ default boolean hasStreamCategories() {
* <p>
* The frontend components then make use of the structured data to display it.
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "type",
visible = true)
interface Result {
@JsonProperty("id")
String id();
Expand Down

0 comments on commit 65c33c6

Please sign in to comment.