Skip to content

Search/filtered-stream operators pages list deprecated language codes (Indonesian inid, Hebrew iwhe) #307

Description

@tcaldwell-x

Problem

The supported-languages tables on the search and filtered-stream operator pages list deprecated ISO 639-1 codes that the lang: operator rejects:

Language Docs say API accepts
Indonesian in id
Hebrew iw he

A request such as GET /2/tweets/search/all?query=lang:in fails validation with:

Invalid language specifier 'in'. Language specifier must be one of [..., id, ..., he, ...]

Query validation has required the canonical BCP-47 codes since 2020; the docs were never updated. This was reported by an enterprise customer (Emplifi) who was blocked trying to filter Indonesian posts.

Affected pages

Requested change

  1. In the supported-languages tables, change Indonesian from in to id and Hebrew from iw to he on both pages (and localized copies).
  2. Add a note that the lang response field still returns the legacy codes ("lang": "in" for Indonesian, "lang": "iw" for Hebrew) while the lang: operator requires the canonical codes (id, he). Filtering with lang:id matches all Indonesian posts, including those returned with "lang": "in" — no data is missed. Documenting this explicitly will prevent confusion, since the mismatch is intentional and stable (changing the response field would break existing consumers).

Background

Indonesian's ISO 639-1 code changed from in to id in 1989 (likewise Hebrew iwhe). The language classifier and response rendering use Java's legacy Locale.getLanguage() codes, while search query validation requires canonical BCP-47 tags. Both codes are indexed, so matching is unaffected — only the operator input and the docs are strict/stale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions