Add new type SearchIndexField::INDEX_TYPE_SHORT_TEXT
authordcausse <dcausse@wikimedia.org>
Mon, 26 Sep 2016 10:50:23 +0000 (12:50 +0200)
committerdcausse <dcausse@wikimedia.org>
Mon, 26 Sep 2016 10:50:23 +0000 (12:50 +0200)
Useful for short technical strings such as mime types.

Change-Id: If440378f2b7004abed87eca4bbde767212c4b062

includes/search/SearchIndexField.php

index 6806ee5..6b5316f 100644 (file)
@@ -14,6 +14,15 @@ interface SearchIndexField {
        const INDEX_TYPE_DATETIME = 4;
        const INDEX_TYPE_NESTED = 5;
        const INDEX_TYPE_BOOL = 6;
+
+       /**
+        * SHORT_TEXT is meant to be used with short text made of mostly ascii
+        * technical information. Generally a language agnostic analysis chain
+        * is used and aggressive splitting to increase recall.
+        * E.g suited for mime/type
+        */
+       const INDEX_TYPE_SHORT_TEXT = 7;
+
        /**
         * Generic field flags.
         */