浏览代码

HUE-7387 [search] New ptypes from Solr 7

ttypes were deprecated in 6 and removed in 7.
Romain Rigaux 8 年之前
父节点
当前提交
dc3314e

+ 3 - 3
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -1546,9 +1546,9 @@ var QueryResult = function (vm, initial) { // Similar to to Notebook Snippet
 };
 
 
-var DATE_TYPES = ['date', 'tdate', 'timestamp'];
-var NUMBER_TYPES = ['int', 'tint', 'long', 'tlong', 'float', 'tfloat', 'double', 'tdouble', 'currency'];
-var FLOAT_TYPES = ['float', 'tfloat', 'double', 'tdouble'];
+var DATE_TYPES = ['date', 'tdate', 'timestamp', 'pdate'];
+var NUMBER_TYPES = ['int', 'tint', 'pint', 'long', 'tlong', 'tlong', 'float', 'tfloat', 'pfloat', 'double', 'tdouble', 'pdouble', 'currency'];
+var FLOAT_TYPES = ['float', 'tfloat', 'pfloat', 'double', 'tdouble', 'pdouble'];
 var GEO_TYPES = ['SpatialRecursivePrefixTreeFieldType'];
 
 var RANGE_SELECTABLE_WIDGETS = ['histogram-widget', 'bar-widget', 'line-widget'];

+ 2 - 12
desktop/libs/indexer/src/indexer/models.py

@@ -37,8 +37,6 @@ FIELD_TYPES = (
   "point",
   "random",
   "string",
-  "tdate",
-  "tdouble",
   "text_ar",
   "text_bg",
   "text_ca",
@@ -76,10 +74,7 @@ FIELD_TYPES = (
   "text_sv",
   "text_th",
   "text_tr",
-  "text_ws",
-  "tfloat",
-  "tint",
-  "tlong"
+  "text_ws"
 )
 
 TEXT_FIELD_TYPES = (
@@ -129,25 +124,20 @@ TEXT_FIELD_TYPES = (
 
 DATE_FIELD_TYPES = (
   "date",
-  "pdate",
-  "tdate"
+  "pdate"
 )
 
 INTEGER_FIELD_TYPES = (
   "int",
-  "tint",
   "pint",
   "long",
-  "tlong",
   "plong"
 )
 
 DECIMAL_FIELD_TYPES = (
   "float",
-  "tfloat",
   "pfloat",
   "double",
-  "tdouble",
   "pdouble",
   "currency"
 )

+ 4 - 4
desktop/libs/indexer/src/indexer/utils.py

@@ -168,10 +168,10 @@ def get_field_types(field_list, iterations=3):
       raise ValueError()
 
   test_fns = [('boolean', test_boolean),
-              ('tint', test_int),
-              ('tlong', int),
-              ('tdouble', float),
-              ('tdate', test_timestamp),
+              ('pint', test_int),
+              ('plong', int),
+              ('pdouble', float),
+              ('pdate', test_timestamp),
               ('string', test_string),
               ('text_general', any)]
   all_field_types = []