fork of indigo with slightly nicer lexgen

search: ensure text_ja is optional (#644)

The `omitempty` logic was probably already working, but this makes it
more explicit and the code more readable.

Thanks Jaz!

authored by bnewbold.net and committed by GitHub 1ffd4cfe 9b28afd7

Changed files
+2 -2
search
+2 -2
search/transform.go
··· 34 34 RecordCID string `json:"record_cid"` 35 35 CreatedAt *string `json:"created_at,omitempty"` 36 36 Text string `json:"text"` 37 - TextJA string `json:"text_ja,omitempty"` 37 + TextJA *string `json:"text_ja,omitempty"` 38 38 LangCode []string `json:"lang_code,omitempty"` 39 39 LangCodeIso2 []string `json:"lang_code_iso2,omitempty"` 40 40 MentionDID []string `json:"mention_did,omitempty"` ··· 186 186 } 187 187 188 188 if containsJapanese(post.Text) { 189 - doc.TextJA = post.Text 189 + doc.TextJA = &post.Text 190 190 } 191 191 192 192 if post.CreatedAt != "" {