@@ -210,8 +210,7 @@ def main():
210
210
refreshSec = 1.0
211
211
else :
212
212
# Turn off refreshes to maximize indexing throughput:
213
- #refreshSec = 100000.0
214
- refreshSec = 1.0
213
+ refreshSec = 100000.0
215
214
send (LOCALHOST , primaryPorts [0 ], "liveSettings" , {'indexName' : 'index' , 'index.ramBufferSizeMB' : 1024. , 'maxRefreshSec' : refreshSec })
216
215
217
216
fields = {'indexName' : 'index' ,
@@ -223,23 +222,23 @@ def main():
223
222
'pick_up_date_time' : {'type' : 'long' , 'search' : True , 'sort' : True },
224
223
'drop_off_date_time' : {'type' : 'long' , 'search' : True , 'sort' : True },
225
224
'passenger_count' : {'type' : 'int' , 'search' : True , 'sort' : True },
226
- 'trip_distance' : {'type' : 'double ' , 'search' : True , 'sort' : True },
227
- 'pick_up_lat' : {'type' : 'double ' , 'search' : True , 'sort' : True },
228
- 'pick_up_lon' : {'type' : 'double ' , 'search' : True , 'sort' : True },
229
- 'drop_off_lat' : {'type' : 'double ' , 'search' : True , 'sort' : True },
230
- 'drop_off_lon' : {'type' : 'double ' , 'search' : True , 'sort' : True },
225
+ 'trip_distance' : {'type' : 'float ' , 'search' : True , 'sort' : True },
226
+ 'pick_up_lat' : {'type' : 'float ' , 'search' : True , 'sort' : True },
227
+ 'pick_up_lon' : {'type' : 'float ' , 'search' : True , 'sort' : True },
228
+ 'drop_off_lat' : {'type' : 'float ' , 'search' : True , 'sort' : True },
229
+ 'drop_off_lon' : {'type' : 'float ' , 'search' : True , 'sort' : True },
231
230
'payment_type' : {'type' : 'atom' , 'sort' : True },
232
231
'trip_type' : {'type' : 'atom' , 'sort' : True },
233
232
'rate_code' : {'type' : 'atom' , 'sort' : True },
234
- 'fare_amount' : {'type' : 'double ' , 'search' : True , 'sort' : True },
235
- 'surcharge' : {'type' : 'double ' , 'search' : True , 'sort' : True },
236
- 'mta_tax' : {'type' : 'double ' , 'search' : True , 'sort' : True },
237
- 'extra' : {'type' : 'double ' , 'search' : True , 'sort' : True },
238
- 'ehail_fee' : {'type' : 'double ' , 'search' : True , 'sort' : True },
239
- 'improvement_surcharge' : {'type' : 'double ' , 'search' : True , 'sort' : True },
240
- 'tip_amount' : {'type' : 'double ' , 'search' : True , 'sort' : True },
241
- 'tolls_amount' : {'type' : 'double ' , 'search' : True , 'sort' : True },
242
- 'total_amount' : {'type' : 'double ' , 'search' : True , 'sort' : True },
233
+ 'fare_amount' : {'type' : 'float ' , 'search' : True , 'sort' : True },
234
+ 'surcharge' : {'type' : 'float ' , 'search' : True , 'sort' : True },
235
+ 'mta_tax' : {'type' : 'float ' , 'search' : True , 'sort' : True },
236
+ 'extra' : {'type' : 'float ' , 'search' : True , 'sort' : True },
237
+ 'ehail_fee' : {'type' : 'float ' , 'search' : True , 'sort' : True },
238
+ 'improvement_surcharge' : {'type' : 'float ' , 'search' : True , 'sort' : True },
239
+ 'tip_amount' : {'type' : 'float ' , 'search' : True , 'sort' : True },
240
+ 'tolls_amount' : {'type' : 'float ' , 'search' : True , 'sort' : True },
241
+ 'total_amount' : {'type' : 'float ' , 'search' : True , 'sort' : True },
243
242
'store_and_fwd_flag' : {'type' : 'atom' , 'sort' : True }}}
244
243
245
244
send (LOCALHOST , primaryPorts [0 ], 'registerFields' , fields )
@@ -248,10 +247,12 @@ def main():
248
247
249
248
send (LOCALHOST , primaryPorts [0 ], "settings" , {'indexName' : 'index' ,
250
249
#'indexSort': [{'field': 'pick_up_lon'}],
251
- 'index.verbose' : True ,
250
+ 'index.verbose' : False ,
252
251
'directory' : 'MMapDirectory' ,
253
252
'nrtCachingDirectory.maxSizeMB' : 0.0 ,
254
- #'index.merge.scheduler.auto_throttle': False,
253
+ 'concurrentMergeScheduler.maxThreadCount' : 4 ,
254
+ 'concurrentMergeScheduler.maxMergeCount' : 9 ,
255
+ 'index.merge.scheduler.auto_throttle' : False ,
255
256
})
256
257
257
258
for id , host , installPath , port , binaryPort in replicaPorts :
@@ -277,7 +278,8 @@ def main():
277
278
replicaStarted = False
278
279
279
280
#docSource = '/lucenedata/nyc-taxi-data/alltaxis.csv.blocks'
280
- docSource = '/b/alltaxis.csv.blocks'
281
+ #docSource = '/b/alltaxis.csv.blocks'
282
+ docSource = '/l/data/alltaxis.csv.blocks'
281
283
if not os .path .exists (docSource ):
282
284
# Not Mike's home computer!
283
285
docSource = 'data/alltaxis.1M.csv.blocks'
0 commit comments