This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.icgc.dcc.etl.staging.function; | |
import static com.google.common.base.Stopwatch.createStarted; | |
import static com.google.common.collect.Iterables.toArray; | |
import static org.icgc.dcc.common.core.util.FormatUtils.formatCount; | |
import static org.icgc.dcc.common.core.util.FormatUtils.formatPercent; | |
import static org.icgc.dcc.common.core.util.Splitters.TAB; | |
import java.io.Serializable; | |
import java.util.Iterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Description: | |
# Example that shows how using a `facet_filter` with a `nested` filter fails to return `nested` facet terms. | |
# Remove index if it exists already | |
curl -XDELETE http://localhost:9200/nested | |
# Create a fresh index | |
curl -XPOST http://localhost:9200/nested |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Clean | |
curl -XDELETE 'http://localhost:9200/null?pretty' | |
# Create index | |
curl -XPOST 'http://localhost:9200/null?pretty' | |
# Create mapping | |
curl -XPOST 'http://localhost:9200/null/type/_mapping?pretty' -d ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Description: | |
# Example that shows how applying a `match_all` `nested` query will exclude hits that do not have nested documents. | |
# This may be related to ElasticSearch's `NestedQueryParser` and it's use of Lucene's `ToParentBlockJoinQuery` | |
# | |
# See: | |
# - https://github.com/elasticsearch/elasticsearch/blob/0.90/src/main/java/org/elasticsearch/index/query/NestedQueryParser.java | |
# - http://lucene.apache.org/core/4_3_0/join/org/apache/lucene/search/join/package-summary.html | |
# - http://lucene.apache.org/core/4_3_0/join/org/apache/lucene/search/join/ToParentBlockJoinQuery.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.UnknownHostException; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.BasicDBObjectBuilder; | |
import com.mongodb.CommandResult; | |
import com.mongodb.DB; | |
import com.mongodb.DBObject; | |
import com.mongodb.Mongo; | |
import com.mongodb.MongoClient; | |
import com.mongodb.MongoClientURI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.OutputStream; | |
import java.io.Serializable; | |
import java.util.Comparator; |