Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/amitsaxena098/OpenKnowledgeStream/llms.txt

Use this file to discover all available pages before exploring further.

The Change class represents a single Wikipedia page change event. It is used as the Kafka message value type and the OpenSearch document type.

Source

package Wikicommon.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class Change {
    private String type;
    private String title;
    @JsonProperty("pageid")
    private Long pageId;
    private List<String> tags;
}

Fields

type
String
The type of change. Common values are edit (an existing page was modified), new (a page was created), and log (a log action was recorded). Maps directly to the type field in the Wikipedia Recent Changes API response.
title
String
The title of the Wikipedia page that was changed. Used as the document ID when indexing the change event into OpenSearch.
pageId
Long
The numeric Wikipedia page identifier. Mapped from the JSON field pageid in the API response via the Jackson annotation @JsonProperty("pageid").
tags
List<String>
A list of change tags associated with the edit. Common values include "mobile edit", "mobile web edit", and "wikieditor". Maps to the tags array in the Wikipedia API response. May be empty if no tags are present.

Example

A fully populated Change document as it appears in Kafka and OpenSearch:
{
  "type": "edit",
  "title": "Albert Einstein",
  "pageid": 736,
  "tags": ["mobile edit", "mobile web edit"]
}

Notes

The @Data annotation from Lombok generates getters, setters, equals, hashCode, and toString implementations at compile time. No boilerplate methods are written manually.
This class is provided by the wiki-common module (com.as:wiki-common:0.0.1-SNAPSHOT). Any module in the pipeline that needs to produce or consume Change objects — including the Kafka producer and the OpenSearch indexer — declares a dependency on wiki-common.

Build docs developers (and LLMs) love