From: Adam Wight Date: Thu, 25 Oct 2018 21:57:01 +0000 (-0700) Subject: Add docstrings for text search index field types X-Git-Tag: 1.34.0-rc.0~3588^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=861d7187689eef19a32299e6bf5c254d56a859e5;p=lhc%2Fweb%2Fwiklou.git Add docstrings for text search index field types Change-Id: Icd34ec79db4d8fd024a82045aaa9bedb6556caa8 --- diff --git a/includes/search/SearchIndexField.php b/includes/search/SearchIndexField.php index 6f3b207848..daeb5f5148 100644 --- a/includes/search/SearchIndexField.php +++ b/includes/search/SearchIndexField.php @@ -4,10 +4,22 @@ * @since 1.28 */ interface SearchIndexField { - /** + /* * Field types */ + /** + * TEXT fields are suitable for natural language and may be subject to + * analysis such as stemming. + * + * Read more: + * https://wikimediafoundation.org/2018/08/07/anatomy-search-token-affection/ + * https://wikimediafoundation.org/2018/09/13/anatomy-search-variation-under-nature/ + */ const INDEX_TYPE_TEXT = 0; + /** + * KEYWORD fields are indexed without any processing, so are appropriate + * for e.g. URLs. The content will often consist of a single token. + */ const INDEX_TYPE_KEYWORD = 1; const INDEX_TYPE_INTEGER = 2; const INDEX_TYPE_NUMBER = 3;