File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed
Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,10 @@ public static void setUp() throws Exception {
5151 deleteQuery (TEST_INDEX );
5252 loadBulk ("src/test/resources/accounts.json" );
5353 loadBulk ("src/test/resources/online.json" );
54+ loadBulk ("src/test/resources/phrases.json" );
5455
5556 prepareOdbcIndex ();
5657 loadBulk ("src/test/resources/odbc-date-formats.json" );
57- preparePhraseIndex ();
58- loadBulk ("src/test/resources/phrases.json" );
59-
6058
6159 searchDao = new SearchDao (client );
6260 System .out .println ("Finished the setup process..." );
@@ -137,25 +135,6 @@ public static void prepareOdbcIndex(){
137135 client .admin ().indices ().preparePutMapping (TEST_INDEX ).setType ("odbc" ).setSource (dataMapping ).execute ().actionGet ();
138136 }
139137
140- public static void preparePhraseIndex (){
141- String dataMapping = "{\n " +
142- "\t \" phrase\" :{\n " +
143- "\t \t \" properties\" :{\n " +
144- "\t \t \t \" insert_time\" :{\n " +
145- "\t \t \t \t \" type\" :\" date\" ,\n " +
146- "\t \t \t \t \" format\" : \" {'ts' ''yyyy-MM-dd HH:mm:ss.SSS''}\" \n " +
147- "\t \t \t },\n " +
148- "\t \" phrase\" :{\n " +
149- "\t \" type\" :\" string\" ,\n " +
150- "\t \" index\" :\" not_analyzed\" \n " +
151- "\t }\n " +
152- "\t }\n " +
153- "\t }\n " +
154- "}" ;
155-
156- client .admin ().indices ().preparePutMapping (TEST_INDEX ).setType ("phrase" ).setSource (dataMapping ).execute ().actionGet ();
157- }
158-
159138 public static SearchDao getSearchDao () {
160139 return searchDao ;
161140 }
Original file line number Diff line number Diff line change 11{"index" :{"_type" : " phrase" }}
22{"phrase" : " quick fox" }
33{"index" :{"_type" : " phrase" }}
4- {"phrase" : " quick fox here" }
4+ {"phrase" : " quick fox here" , "insert_time" : " 2014-08-19T07:09:13.434Z " }
55{"index" :{"_type" : " phrase" }}
66{"phrase" : " brown fox" }
77{"index" :{"_type" : " phrase" }}
8- {"phrase" : " fox brown" }
8+ {"phrase" : " fox brown" , "insert_time" : " 2014-08-19T07:09:13.434Z " }
You can’t perform that action at this time.
0 commit comments