Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
val jsonBuilder = new MapJSONBuilder()
val indexerSettings = new IndexerSettings(
"cache.user_marker",
"id,map_id,map_name,marker_name,num_markers,num_likes,num_comments,lat,lon",
"",
"id",
"maps",
"marker",
jsonBuilder,
1000
)
val mappingFile: String = "json/map_mapping.json"
val indexFile: String = "json/map_index.json"
def index() {
val startTime = System.nanoTime()
println("Deleting Index")
IndexingUtils.deleteIndex(this.client, this.indexerSettings.indexName)
Thread.sleep(1000)
println("Creating Index")
IndexingUtils.createIndex(this.client, this.indexerSettings.indexName, this.indexFile)
Thread.sleep(2000)
println("Creating Mapping")
IndexingUtils.createMapping(this.client, this.indexerSettings.indexName, this.indexerSettings.indexType, this.mappingFile)
Thread.sleep(1000)
println("Indexing Maps")
val bulkIndexer = new BulkIndexer(this.client,this.indexerSettings)
bulkIndexer.process()
val totalTime = (System.nanoTime - startTime) / 1000000000
Thread.sleep(1000)
println("Total Indexing Time: " + totalTime + " seconds.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.