buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void setRotation (Vector3 dir, Vector3 up) {
tmp.set(up).crs(dir).nor();
tmp2.set(dir).crs(tmp).nor();
rotation.setFromAxes(tmp.x, tmp2.x, dir.x, tmp.y, tmp2.y, dir.y, tmp.z, tmp2.z, dir.z);
updated = false;
}
| public void setRotation (Vector3 dir, Vector3 up) {
tmp.set(up).crs(dir).nor();
tmp2.set(dir).crs(tmp).nor();
rotation.setFromAxes(tmp.x, tmp.y, tmp.z, tmp2.x, tmp2.y, tmp2.z, dir.x, dir.y, dir.z);
updated = false;
}
|
private void assertShardExecutionState(SearchResponse response, int expectedFailures) throws Exception {
ShardSearchFailure[] failures = response.getShardFailures();
if (failures.length != expectedFailures) {
for (ShardSearchFailure failure : failures) {
logger.error("Sha... | private void assertShardExecutionState(SearchResponse response, int expectedFailures) throws Exception {
ShardSearchFailure[] failures = response.getShardFailures();
if (failures.length != expectedFailures) {
for (ShardSearchFailure failure : failures) {
logger.error("Sha... |
private final ESLogger logger = Loggers.getLogger(getClass());
ExternalNode(File path, long seed, SettingsSource settingsSource) {
this(path, null, seed, settingsSource);
}
ExternalNode(File path, String clusterName, long seed, SettingsSource settingsSource) {
if (!path.isDirectory())... | private final ESLogger logger = Loggers.getLogger(getClass());
ExternalNode(File path, long seed, SettingsSource settingsSource) {
this(path, null, seed, settingsSource);
}
ExternalNode(File path, String clusterName, long seed, SettingsSource settingsSource) {
if (!path.isDirectory())... |
@Override public void render (Application app) {
app.getGraphics().getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT);
viewMatrix.setToOrtho2D(0, 0, 480, 320);
spriteBatch.setProjectionMatrix(viewMatrix);
spriteBatch.setTransformMatrix(transformMatrix);
spriteBatch.begin();
spriteBatch.disableBlending();
sprit... | @Override public void render (Application app) {
app.getGraphics().getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT);
viewMatrix.setToOrtho2D(0, 0, 480, 320);
spriteBatch.setProjectionMatrix(viewMatrix);
spriteBatch.setTransformMatrix(transformMatrix);
spriteBatch.begin();
spriteBatch.disableBlending();
sprit... |
public void resize (int width, int height) {
stage.setViewport(width, height, false);
}
| public void resize (int width, int height) {
stage.getViewport().update(width, height, true);
}
|
public void resize (int width, int height) {
stage.setViewport(width, height, true);
}
| public void resize (int width, int height) {
stage.getViewport().update(width, height, true);
}
|
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
if (pointer != 0) return false;
List.this.touchDown(y);
return true;
}
});
}
| public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
if (pointer == 0 && button != 0) return false;
List.this.touchDown(y);
return true;
}
});
}
|
public void draw (Batch batch, float parentAlpha) {
validate();
Color color = getColor();
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
cache.setColor(style.fontColor == null ? c... | public void draw (Batch batch, float parentAlpha) {
validate();
Color color = getColor();
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
cache.setColor(style.fontColor == null ? c... |
@Override public void execute(SearchContext context) throws ElasticSearchException {
if (context.facets() == null) {
return;
}
if (context.queryResult().facets() != null) {
// no need to compute the facets twice, they should be computed on a per context basis
... | @Override public void execute(SearchContext context) throws ElasticSearchException {
if (context.facets() == null) {
return;
}
if (context.queryResult().facets() != null) {
// no need to compute the facets twice, they should be computed on a per context basis
... |
public void testScanScrollWithShardExceptions() throws Exception {
assertAcked(
prepareCreate("test")
// Enforces that only one shard can only be allocated to a single node
.setSettings(ImmutableSettings.builder().put(indexSettings()).put(Shard... | public void testScanScrollWithShardExceptions() throws Exception {
assertAcked(
prepareCreate("test")
// Enforces that only one shard can only be allocated to a single node
.setSettings(ImmutableSettings.builder().put(indexSettings()).put(Shard... |
private static void configureSyncFor(Account account) {
Log.d(TAG, "Trying to configure account for sync...");
ContentResolver.setIsSyncable(account, GITHUB_PROVIDER_AUTHORITY, 1);
ContentResolver.setSyncAutomatically(account, GITHUB_PROVIDER_AUTHORITY, true);
ContentResolver.addPeri... | private static void configureSyncFor(Account account) {
Log.d(TAG, "Trying to configure account for sync...");
ContentResolver.setIsSyncable(account, GITHUB_PROVIDER_AUTHORITY, 1);
ContentResolver.setSyncAutomatically(account, GITHUB_PROVIDER_AUTHORITY, true);
ContentResolver.addPeri... |
@Override public void render () {
// first we update the world. For simplicity
// we use the delta time provided by the Graphics
// instance. Normally you'll want to fix the time
// step.
long start = System.nanoTime();
world.step(Gdx.graphics.getDeltaTime(), 3, 3);
float updateTime = (System.nanoTime() ... | @Override public void render () {
// first we update the world. For simplicity
// we use the delta time provided by the Graphics
// instance. Normally you'll want to fix the time
// step.
long start = System.nanoTime();
world.step(Gdx.graphics.getDeltaTime(), 3, 3);
float updateTime = (System.nanoTime() ... |
public final void handleRequest(RestRequest request, RestChannel channel) throws Exception {
handleRequest(request, channel, usefulHeaders.size() == 0 ? client : new HeadersAndContextCopyClient(client, request, usefulHeaders));
}
| public final void handleRequest(RestRequest request, RestChannel channel) throws Exception {
handleRequest(request, channel, new HeadersAndContextCopyClient(client, request, usefulHeaders));
}
|
protected View initialize(View view) {
view = super.initialize(view);
TypefaceUtils.setOcticons(textView(view, 0));
return view;
}
| protected View initialize(View view) {
view = super.initialize(view);
TypefaceUtils.setOcticons(textView(0));
return view;
}
|
@Override protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
DocumentMapper docMapper = indexService.mapp... | @Override protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
DocumentMapper docMapper = indexService.mapp... |
public void execute(SearchContext context) {
FieldSelector fieldSelector = buildFieldSelectors(context);
InternalSearchHit[] hits = new InternalSearchHit[context.docIdsToLoadSize()];
for (int index = 0; index < context.docIdsToLoadSize(); index++) {
int docId = context.docIdsToL... | public void execute(SearchContext context) {
FieldSelector fieldSelector = buildFieldSelectors(context);
InternalSearchHit[] hits = new InternalSearchHit[context.docIdsToLoadSize()];
for (int index = 0; index < context.docIdsToLoadSize(); index++) {
int docId = context.docIdsToL... |
@Override public void execute(SearchContext context, InternalSearchHit hit, Uid uid, IndexReader reader, int docId) throws ElasticSearchException {
try {
DocumentMapper documentMapper = context.mapperService().type(hit.type());
Map<String, HighlightField> highlightFields = newHashMa... | @Override public void execute(SearchContext context, InternalSearchHit hit, Uid uid, IndexReader reader, int docId) throws ElasticSearchException {
try {
DocumentMapper documentMapper = context.mapperService().documentMapper(hit.type());
Map<String, HighlightField> highlightFields =... |
@BeforeClass public void setupQueryParser() throws IOException {
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.cache.filter.type", "none")
.build();
Index index = new Index("test");
Injector injector = new ModulesBuilder().add(
... | @BeforeClass public void setupQueryParser() throws IOException {
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.cache.filter.type", "none")
.build();
Index index = new Index("test");
Injector injector = new ModulesBuilder().add(
... |
protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh().force(request.force()));
logger.trace("{} ... | protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh().force(request.force()).source("api"));
log... |
protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... | protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... |
protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.... | protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.... |
private void refreshVersioningTable(long time) {
// we need to refresh in order to clear older version values
refresh(new Refresh().force(true));
for (Map.Entry<HashedBytesRef, VersionValue> entry : versionMap.entrySet()) {
HashedBytesRef uid = entry.getKey();
synchro... | private void refreshVersioningTable(long time) {
// we need to refresh in order to clear older version values
refresh(new Refresh().force(true).source("version_table"));
for (Map.Entry<HashedBytesRef, VersionValue> entry : versionMap.entrySet()) {
HashedBytesRef uid = entry.getKe... |
public void run() {
recoveryStatus = new RecoveryStatus();
recoveryStatus.updateStage(RecoveryStatus.Stage.INIT);
try {
logger.debug("starting recovery from {} ...", shardGateway);
shardGateway.recover(indexShouldExists... | public void run() {
recoveryStatus = new RecoveryStatus();
recoveryStatus.updateStage(RecoveryStatus.Stage.INIT);
try {
logger.debug("starting recovery from {} ...", shardGateway);
shardGateway.recover(indexShouldExists... |
private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh().force(true));
Engine.Searcher searcher = shard.acquireSearcher();
try {
Query query = new XConstantScoreQuery(
indexCa... | private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh().force(true).source("percolator_load_queries"));
Engine.Searcher searcher = shard.acquireSearcher();
try {
Query query = new XConstantScoreQuery(
... |
double factor(int docId);
/*
* Licensed to ElasticSearch and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. ElasticSearch licenses this
* file to you under the Apache License, Version 2.0 ... | double factor(int docId);
/*
* Licensed to ElasticSearch and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. ElasticSearch licenses this
* file to you under the Apache License, Version 2.0 ... |
public float getScrollBarWidth () {
return style.vScrollKnob == null || !scrollY ? 0 : style.hScrollKnob.getMinWidth();
}
| public float getScrollBarWidth () {
return style.vScrollKnob == null || !scrollY ? 0 : style.vScrollKnob.getMinWidth();
}
|
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
UpdateSettingsRequest updateSettingsRequest = updateSettingsRequest(Strings.splitStringByCommaToArray(request.param("index")));
updateSettingsRequest.listenerThreaded(false);
updateSettings... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
UpdateSettingsRequest updateSettingsRequest = updateSettingsRequest(Strings.splitStringByCommaToArray(request.param("index")));
updateSettingsRequest.listenerThreaded(false);
updateSettings... |
@Override protected void shardOperationOnReplica(ShardOperationRequest shardRequest) {
IndexShard indexShard = indexShard(shardRequest);
final BulkShardRequest request = shardRequest.request;
Engine.Operation[] ops = new Engine.Operation[request.items().length];
for (int i = 0; i < o... | @Override protected void shardOperationOnReplica(ShardOperationRequest shardRequest) {
IndexShard indexShard = indexShard(shardRequest);
final BulkShardRequest request = shardRequest.request;
Engine.Operation[] ops = new Engine.Operation[request.items().length];
for (int i = 0; i < o... |
private static void connect(Edge in, Edge out) {
assert in != null && out != null;
assert in != out;
// Connecting two Edges by inserting the point at
// dateline intersection and connect these by adding
// two edges between this points. One per direction
if(in.inters... | private static void connect(Edge in, Edge out) {
assert in != null && out != null;
assert in != out;
// Connecting two Edges by inserting the point at
// dateline intersection and connect these by adding
// two edges between this points. One per direction
if(in.inters... |
public void drawDebug (ShapeRenderer shapes) {
shapes.set(ShapeType.Filled);
shapes.setColor(getColor());
shapes.rect(getX(), getY(), getWidth(), getHeight(), getOriginX(), getOriginY(), getScaleX(), getScaleY(),
getRotation());
}
};
shapeActor.setBounds(0, 0, 100, 150);
shapeActor... | public void drawDebug (ShapeRenderer shapes) {
shapes.set(ShapeType.Filled);
shapes.setColor(getColor());
shapes.rect(getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), getScaleX(), getScaleY(),
getRotation());
}
};
shapeActor.setBounds(0, 0, 100, 150);
shapeActor... |
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
// @off
IssueTest.class,
AccelerometerTest.class,
ActionSequenceTest.class,
ActionTest.class,
AlphaTest.class,
Animation3DTest.class,
AnimationTest.class,
AssetManagerTest.class,
AtlasI... | public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
// @off
IssueTest.class,
AccelerometerTest.class,
ActionSequenceTest.class,
ActionTest.class,
AlphaTest.class,
Animation3DTest.class,
AnimationTest.class,
AssetManagerTest.class,
AtlasI... |
@Override public void toJson(JsonBuilder builder, Params params) throws IOException {
toJson(builder, params, null);
}
| @Override public void toJson(JsonBuilder builder, Params params) throws IOException {
toJson(builder, params, JsonMapper.EMPTY_ARRAY);
}
|
public void onFailure(Throwable e) {
try {
channel.sendResponse(new XContentThrowableRestResponse(request, e));
} catch (IOException e1) {
logger.error("Failed to send failure response", e1);
}
}
});
... | public void onFailure(Throwable e) {
try {
channel.sendResponse(new XContentThrowableRestResponse(request, e));
} catch (IOException e1) {
logger.error("Failed to send failure response", e1);
}
}
});
... |
public void refresh(List<AtomicReaderContext> atomicReaderContexts) throws Exception {
// do a quick check for the common case, that all are there
if (refreshNeeded(atomicReaderContexts)) {
synchronized (idReaders) {
if (!refreshNeeded(atomicReaderContexts)) {
... | public void refresh(List<AtomicReaderContext> atomicReaderContexts) throws Exception {
// do a quick check for the common case, that all are there
if (refreshNeeded(atomicReaderContexts)) {
synchronized (idReaders) {
if (!refreshNeeded(atomicReaderContexts)) {
... |
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
// if all are defaults, no sense to write it at all
if (fieldType.stored() == Defaults.FIELD_TYPE.stored() && fieldType.indexed() == Defaults.FIELD_TYPE.indexed()) {
return builder;
}
... | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
// if all are defaults, no sense to write it at all
if (fieldType.stored() == Defaults.FIELD_TYPE.stored() && fieldType.indexed() == Defaults.FIELD_TYPE.indexed()) {
return builder;
}
... |
@Test public void testSingleIndexFirstStartPrimaryThenBackups() {
DefaultShardsRoutingStrategy strategy = new DefaultShardsRoutingStrategy();
logger.info("Building initial routing table");
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberO... | @Test public void testSingleIndexFirstStartPrimaryThenBackups() {
ShardsRoutingStrategy strategy = new ShardsRoutingStrategy();
logger.info("Building initial routing table");
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberOfShards(1).num... |
@Test public void testSingleIndexFirstStartPrimaryThenBackups() {
DefaultShardsRoutingStrategy strategy = new DefaultShardsRoutingStrategy();
logger.info("Building initial routing table");
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberO... | @Test public void testSingleIndexFirstStartPrimaryThenBackups() {
ShardsRoutingStrategy strategy = new ShardsRoutingStrategy();
logger.info("Building initial routing table");
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberOfShards(10).nu... |
public static Mesh loadGdx3D( Graphics graphics, InputStream in, boolean managed )
{
try
{
DataInputStream din = new DataInputStream( new BufferedInputStream( in ) );
int numAttributes = din.readInt();
ArrayList<VertexAttribute> attributes = new ArrayList<VertexAttribute>();
for( int i = 0; i < numAtt... | public static Mesh loadGdx3D( Graphics graphics, InputStream in, boolean managed )
{
try
{
DataInputStream din = new DataInputStream( new BufferedInputStream( in ) );
int numAttributes = din.readInt();
ArrayList<VertexAttribute> attributes = new ArrayList<VertexAttribute>();
for( int i = 0; i < numAtt... |
protected Names buildNames(BuilderContext context) {
return new Names(name, buildIndexName(context), indexName == null ? name : indexName, buildFullName(context));
}
| protected Names buildNames(BuilderContext context) {
return new Names(name, buildIndexName(context), indexName == null ? name : indexName, buildFullName(context), context.path().sourcePath());
}
|
protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {
// we know its low level reader, and matching docId, since that's how we call the highlighter with
SearchLookup lookup = searchContext.lookup();
lookup.setNextReader(reader);
lookup.setN... | protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {
// we know its low level reader, and matching docId, since that's how we call the highlighter with
SearchLookup lookup = searchContext.lookup();
lookup.setNextReader(reader);
lookup.setN... |
protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {
// we know its low level reader, and matching docId, since that's how we call the highlighter with
SearchLookup lookup = searchContext.lookup();
lookup.setNextReader(reader);
lookup.setN... | protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {
// we know its low level reader, and matching docId, since that's how we call the highlighter with
SearchLookup lookup = searchContext.lookup();
lookup.setNextReader(reader);
lookup.setN... |
public boolean sphereInFrustumWithoutNearFar (Vector3 center, float radius) {
for (int i = 0; i < planes.length; i++)
if (planes[i].distance(center) < -radius) return false;
return true;
}
| public boolean sphereInFrustumWithoutNearFar (Vector3 center, float radius) {
for (int i = 2; i < planes.length; i++)
if (planes[i].distance(center) < -radius) return false;
return true;
}
|
public void create () {
super.create();
lights = new Environment();
lights.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.1f, 0.1f, 0.1f, 1.f));
lights.add(
new DirectionalLight().set(0.8f, 0.8f, 0.8f, -0.5f, -1.0f, -0.8f)
);
shaderProvider = new TestShaderProvider();
shaderBatch = new Model... | public void create () {
super.create();
lights = new Environment();
lights.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.1f, 0.1f, 0.1f, 1.f));
lights.add(
new DirectionalLight().set(0.8f, 0.8f, 0.8f, -0.5f, -1.0f, -0.8f)
);
shaderProvider = new TestShaderProvider();
shaderBatch = new Model... |
private synchronized void lazyInitialize() {
if (initialized) {
return;
}
initialized = true;
// if this is not a possible master node or data node, bail, we won't save anything here...
if (!clusterService.localNode().masterNode() && !clusterService.localNode().d... | private synchronized void lazyInitialize() {
if (initialized) {
return;
}
initialized = true;
// if this is not a possible master node or data node, bail, we won't save anything here...
if (!clusterService.localNode().masterNode() && !clusterService.localNode().d... |
public ClusterBlockLevel[] levels() {
return this.levels();
}
| public ClusterBlockLevel[] levels() {
return this.levels;
}
|
protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh().force(request.force()));
logger.debug("Ref... | protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh().force(request.force()));
logger.debug("{} ... |
public synchronized void unload (String fileName) {
// check if it's in the queue
int foundIndex = -1;
for (int i = 0; i < loadQueue.size; i++) {
if (loadQueue.get(i).fileName.equals(fileName)) {
foundIndex = i;
break;
}
}
if (foundIndex != -1) {
toLoad--;
loadQueue.removeIndex(foundIndex... | public synchronized void unload (String fileName) {
// check if it's in the queue
int foundIndex = -1;
for (int i = 0; i < loadQueue.size; i++) {
if (loadQueue.get(i).fileName.equals(fileName)) {
foundIndex = i;
break;
}
}
if (foundIndex != -1) {
toLoad--;
loadQueue.removeIndex(foundIndex... |
public static float intersectLinePlane (float x, float y, float z, float x2, float y2, float z2, Plane plane,
Vector3 intersection) {
Vector3 direction = tmp.set(x2, y2, z2).sub(x, y, z);
Vector3 origin = tmp2.set(x, y, z);
float denom = direction.dot(plane.getNormal());
if (denom != 0) {
float t = -(orig... | public static float intersectLinePlane (float x, float y, float z, float x2, float y2, float z2, Plane plane,
Vector3 intersection) {
Vector3 direction = tmp.set(x2, y2, z2).sub(x, y, z);
Vector3 origin = tmp2.set(x, y, z);
float denom = direction.dot(plane.getNormal());
if (denom != 0) {
float t = -(orig... |
public SuggestionSearchContext.SuggestionContext parse(XContentParser parser, MapperService mapperService) throws IOException {
PhraseSuggestionContext suggestion = new PhraseSuggestionContext(suggester);
XContentParser.Token token;
String fieldName = null;
boolean gramSizeSet = fals... | public SuggestionSearchContext.SuggestionContext parse(XContentParser parser, MapperService mapperService) throws IOException {
PhraseSuggestionContext suggestion = new PhraseSuggestionContext(suggester);
XContentParser.Token token;
String fieldName = null;
boolean gramSizeSet = fals... |
protected GwtFileHandle (Preloader preloader, String fileName, FileType type) {
if (type != FileType.Internal && type != FileType.Classpath) throw new GdxRuntimeException("FileType '" + type + "' Not supported in GWT backend");
this.preloader = preloader;
this.file = fileName.replace('\\', '/');
this.type = ty... | protected GwtFileHandle (Preloader preloader, String fileName, FileType type) {
if (type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' Not supported in GWT backend");
this.preloader = preloader;
this.file = fileName.replace('\\', '/');
this.type = type;
}
|
public FileHandle getFileHandle (String path, FileType type) {
if (type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' not supported in GWT backend");
return new GwtFileHandle(preloader, path, type);
}
@Override
public FileHandle classpath (String path) {
return new GwtFileHandl... | public FileHandle getFileHandle (String path, FileType type) {
if (type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' not supported in GWT backend");
return new GwtFileHandle(preloader, path, type);
}
@Override
public FileHandle classpath (String path) {
throw new GdxRuntimeExc... |
@Override public Facet facet() {
return new InternalHistogramFacet(facetName, fieldName, fieldName, interval, comparatorType, histoProc.counts(), histoProc.totals());
}
| @Override public Facet facet() {
return new InternalCountAndTotalHistogramFacet(facetName, fieldName, fieldName, interval, comparatorType, histoProc.counts(), histoProc.totals());
}
|
@Override public Facet facet() {
return new InternalHistogramFacet(facetName, "_na", "_na", -1, comparatorType, counts, totals);
}
| @Override public Facet facet() {
return new InternalCountAndTotalHistogramFacet(facetName, "_na", "_na", -1, comparatorType, counts, totals);
}
|
public void layout () {
if (!invalidated) return;
invalidated = false;
float regionWidth, regionHeight;
if (patch != null) {
regionWidth = patch.getTotalWidth();
regionHeight = patch.getTotalHeight();
} else if (region != null) {
regionWidth = region.getRegionWidth();
regionHeight = region.getRe... | public void layout () {
if (!invalidated) return;
invalidated = false;
float regionWidth, regionHeight;
if (patch != null) {
regionWidth = patch.getTotalWidth();
regionHeight = patch.getTotalHeight();
} else if (region != null) {
regionWidth = region.getRegionWidth();
regionHeight = region.getRe... |
public void create () {
stage = new Stage(0, 0, false);
font = new BitmapFont();
Gdx.input.setInputProcessor(stage);
container = new Container(null, 0, 0);
stage.addActor(container);
// container.layout.debug = "all";
Container table = new Container(null, 0, 0);
FlickScrollPane scroll = new FlickScr... | public void create () {
stage = new Stage(0, 0, false);
font = new BitmapFont();
Gdx.input.setInputProcessor(stage);
container = new Container(null, 0, 0);
stage.addActor(container);
// container.layout.debug = "all";
Container table = new Container(null, 0, 0);
FlickScrollPane scroll = new FlickScr... |
public BigDoubleArrayList(int pageSize, long initialCapacity) {
super(pageSize);
pages = new double[numPages(initialCapacity)][];
}
| public BigDoubleArrayList(int pageSize, long initialCapacity) {
super(pageSize, null, true);
pages = new double[numPages(initialCapacity)][];
}
|
public BigFloatArrayList(int pageSize, long initialCapacity) {
super(pageSize);
pages = new float[numPages(initialCapacity)][];
}
| public BigFloatArrayList(int pageSize, long initialCapacity) {
super(pageSize, null, true);
pages = new float[numPages(initialCapacity)][];
}
|
protected Recycler<byte[]> newRecycler() {
return new QueueRecycler<byte[]>(RECYCLER_C);
}
| protected Recycler<byte[]> newRecycler() {
return new QueueRecycler<byte[]>(RECYCLER_C, randomIntBetween(5, 10));
}
|
public void onPageSelected(int position) {
ActionBar actionBar = getSupportActionBar();
String gistId = gists.get(position);
Gist gist = store.getGist(gistId);
if (gist == null) {
actionBar.setSubtitle(null);
actionBar.setLogo(null);
actionBar.setI... | public void onPageSelected(int position) {
ActionBar actionBar = getSupportActionBar();
String gistId = gists.get(position);
Gist gist = store.getGist(gistId);
if (gist == null) {
actionBar.setSubtitle(null);
actionBar.setLogo(null);
actionBar.setI... |
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject("_all");
builder.startObject("primaries");
primaries().toXContent(builder, params);
builder.endObject();
builder.startObject("total");
primar... | @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject("_all");
builder.startObject("primaries");
primaries().toXContent(builder, params);
builder.endObject();
builder.startObject("total");
primar... |
@Override public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {
builder.startObject(Fields.INDEXING);
totalStats.toXContent(builder, params);
if (typeStats != null && !typeStats.isEmpty()) {
builder.startObject(Fields.TYPES);
... | @Override public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {
builder.startObject(Fields.INDEXING);
totalStats.toXContent(builder, params);
if (typeStats != null && !typeStats.isEmpty()) {
builder.startObject(Fields.TYPES);
... |
public static void buildBroadcastShardsHeader(XContentBuilder builder, BroadcastOperationResponse response) throws IOException {
builder.startObject("_shards");
builder.field("total", response.totalShards());
builder.field("successful", response.successfulShards());
builder.field("fa... | public static void buildBroadcastShardsHeader(XContentBuilder builder, BroadcastOperationResponse response) throws IOException {
builder.startObject("_shards");
builder.field("total", response.totalShards());
builder.field("successful", response.successfulShards());
builder.field("fa... |
@Override public Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException {
FieldQueryExtension fieldQueryExtension = fieldQueryExtensions.get(field);
if (fieldQueryExtension != null) {
return fieldQueryExtension.query(parseContext, queryText);
}
... | @Override public Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException {
FieldQueryExtension fieldQueryExtension = fieldQueryExtensions.get(field);
if (fieldQueryExtension != null) {
return fieldQueryExtension.query(parseContext, queryText);
}
... |
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token = parser.nextToken();
assert token == XContentParser.Token.FIELD_NAME;
String fieldName = parser.current... | @Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token = parser.nextToken();
assert token == XContentParser.Token.FIELD_NAME;
String fieldName = parser.current... |
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
String fieldName = null;
boolean disableCoord = false;
float boost = 1.0f;
int minimumNumberShouldMatch = 1;
List<S... | @Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
String fieldName = null;
boolean disableCoord = false;
float boost = 1.0f;
int minimumNumberShouldMatch = 1;
List<S... |
public TestShader(final String vertexShader, final String fragmentShader, final long mask, int maxLightsCount) {
if (!Gdx.graphics.isGL20Available())
throw new GdxRuntimeException("This shader requires OpenGL ES 2.0");
currentLights = maxLightsCount > 0 ? new Light[maxLightsCount] : null;
String prefix ... | public TestShader(final String vertexShader, final String fragmentShader, final long mask, int maxLightsCount) {
if (!Gdx.graphics.isGL20Available())
throw new GdxRuntimeException("This shader requires OpenGL ES 2.0");
currentLights = maxLightsCount < 0 ? null : new Light[maxLightsCount];
String prefix ... |
public void postCollection() {
if (collector instanceof XCollector) {
((XCollector) collector).postCollection();
}
for (Collector collector : collectors) {
if (collector instanceof XCollector) {
((XCollector) collector).postCollection();
}
... | public void postCollection() throws IOException {
if (collector instanceof XCollector) {
((XCollector) collector).postCollection();
}
for (Collector collector : collectors) {
if (collector instanceof XCollector) {
((XCollector) collector).postCollectio... |
public TypeParser typeParser(String type) {
return typeParsers.get(Strings.toUnderscoreCase(type));
}
}
Mapper.Builder parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException;
}
| public TypeParser typeParser(String type) {
return typeParsers.get(Strings.toUnderscoreCase(type));
}
}
Mapper.Builder<?,?> parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException;
}
|
@Override protected VersionedMap create() {
return new NonBlockingVersionedMap();
}
| @Override protected VersionedMap create() {
return new ConcurrentVersionedMapLong();
}
|
@BeforeTest public void setUp() throws Exception {
versionedMap = new NonBlockingVersionedMap();
dir = new RAMDirectory();
indexWriter = new IndexWriter(dir, Lucene.STANDARD_ANALYZER, true, IndexWriter.MaxFieldLength.UNLIMITED);
indexWriter.addDocument(doc().add(field("value", "0")).... | @BeforeTest public void setUp() throws Exception {
versionedMap = new ConcurrentVersionedMapLong();
dir = new RAMDirectory();
indexWriter = new IndexWriter(dir, Lucene.STANDARD_ANALYZER, true, IndexWriter.MaxFieldLength.UNLIMITED);
indexWriter.addDocument(doc().add(field("value", "0"... |
public static byte[] encode(byte[] data, int length) throws IOException {
ChunkEncoder enc = new ChunkEncoder(length);
byte[] result = encode(enc, data, length);
// important: may be able to reuse buffers
enc.close();
return result;
}
| public static byte[] encode(byte[] data, int length) throws IOException {
ChunkEncoder enc = new ChunkEncoder(length, BufferRecycler.instance());
byte[] result = encode(enc, data, length);
// important: may be able to reuse buffers
enc.close();
return result;
}
|
@Test public void testSimpleStreams() throws Exception {
BytesStreamOutput out = CachedStreamOutput.cachedBytes();
out.writeBoolean(false);
out.writeByte((byte) 1);
out.writeShort((short) -1);
out.writeInt(-1);
out.writeVInt(2);
out.writeLong(-3);
out.... | @Test public void testSimpleStreams() throws Exception {
BytesStreamOutput out = CachedStreamOutput.popEntry().cachedBytes();
out.writeBoolean(false);
out.writeByte((byte) 1);
out.writeShort((short) -1);
out.writeInt(-1);
out.writeVInt(2);
out.writeLong(-3);
... |
public static void main(String[] args) throws Exception {
Random random = new Random();
Settings settings = settingsBuilder()
.put("cluster.routing.schedule", 200, TimeUnit.MILLISECONDS)
.put("index.engine.robin.refreshInterval", 1, TimeUnit.SECONDS)
... | public static void main(String[] args) throws Exception {
Random random = new Random();
Settings settings = settingsBuilder()
.put("cluster.routing.schedule", 200, TimeUnit.MILLISECONDS)
.put("index.engine.robin.refreshInterval", 1, TimeUnit.SECONDS)
... |
@Override protected ShardFlushResponse shardOperation(ShardFlushRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.flush(new Engine.Flush().refresh(request.refresh()));
return new ... | @Override protected ShardFlushResponse shardOperation(ShardFlushRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.flush(new Engine.Flush().refresh(request.refresh()).full(request.full()))... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.gists);
setTitle(getString(string.gists_title));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
pager.setAdapter(new GistsPagerAdapter(getResources(), getSu... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.pager_with_title);
setTitle(getString(string.gists_title));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
pager.setAdapter(new GistsPagerAdapter(getResourc... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.gist_files);
setTitle(getString(string.gist) + " " + gistId);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
gist = store.getGist(gistId);
pager.se... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.pager_with_title);
setTitle(getString(string.gist) + " " + gistId);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
gist = store.getGist(gistId);
pa... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.issue_dashboard);
setTitle(string.dashboard_issues_title);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
pager.setAdapter(new IssueDashboardPagerAdapter(ge... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.pager_with_title);
setTitle(string.dashboard_issues_title);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
pager.setAdapter(new IssueDashboardPagerAdapter(g... |
public SizeFieldMapper(boolean enabled, FieldType fieldType, PostingsFormatProvider provider, @Nullable Settings fieldDataSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, Defaults.FUZZY_FACTOR,
Defaults.BOOST, fieldType, Defaults.NULL_VALUE, Defaults.IGNORE_MALFORMED, pro... | public SizeFieldMapper(boolean enabled, FieldType fieldType, PostingsFormatProvider provider, @Nullable Settings fieldDataSettings) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP,
Defaults.BOOST, fieldType, Defaults.NULL_VALUE, Defaults.IGNORE_MALFORMED, provider, null, fieldDataS... |
protected TTLFieldMapper(FieldType fieldType, boolean enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider provider, @Nullable Settings fieldDataSettings) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), Defaults.PRECI... | protected TTLFieldMapper(FieldType fieldType, boolean enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider provider, @Nullable Settings fieldDataSettings) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), Defaults.PRECI... |
protected TimestampFieldMapper(FieldType fieldType, boolean enabled, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean parseUpperInclusive,
Explicit<Boolean> ignoreMalformed, PostingsFormatProvider provider, @Nullable Settings field... | protected TimestampFieldMapper(FieldType fieldType, boolean enabled, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean parseUpperInclusive,
Explicit<Boolean> ignoreMalformed, PostingsFormatProvider provider, @Nullable Settings field... |
public void updateViewFor(final Gist gist) {
gistId.getLayoutParams().width = idWidth.get();
String id = gist.getId();
CharSequence description = gist.getDescription();
if (!gist.isPublic() && id.length() > PRIVATE_ID_LENGTH)
id = id.substring(0, PRIVATE_ID_LENGTH) + "…";... | public void updateViewFor(final Gist gist) {
gistId.getLayoutParams().width = idWidth.get();
String id = gist.getId();
CharSequence description = gist.getDescription();
if (!gist.isPublic() && id.length() > PRIVATE_ID_LENGTH)
id = id.substring(0, PRIVATE_ID_LENGTH) + "…";... |
@Override public void close() {
logger.info("closing twitter stream river");
if (stream != null) {
stream.cleanup();
stream.shutdown();
}
}
| @Override public void close() {
logger.info("closing twitter stream river");
if (stream != null) {
stream.cleanUp();
stream.shutdown();
}
}
|
public void testFailure() throws Exception {
client().admin().indices().prepareCreate("twitter").execute().actionGet();
DeleteByQueryResponse response = client().prepareDeleteByQuery("twitter")
.setQuery(QueryBuilders.hasChildQuery("type", QueryBuilders.matchAllQuery()))
... | public void testFailure() throws Exception {
client().admin().indices().prepareCreate("twitter").execute().actionGet();
DeleteByQueryResponse response = client().prepareDeleteByQuery("twitter")
.setQuery(QueryBuilders.hasChildQuery("type", QueryBuilders.matchAllQuery()))
... |
public void onDrawFrame (javax.microedition.khronos.opengles.GL10 gl) {
long time = System.nanoTime();
deltaTime = (time - lastFrameTime) / 1000000000.0f;
lastFrameTime = time;
if (!resume) {
mean.addValue(deltaTime);
} else {
deltaTime = 0;
}
boolean lrunning = false;
boolean lpause = false;
... | public void onDrawFrame (javax.microedition.khronos.opengles.GL10 gl) {
long time = System.nanoTime();
deltaTime = (time - lastFrameTime) / 1000000000.0f;
lastFrameTime = time;
if (!resume) {
mean.addValue(deltaTime);
} else {
deltaTime = 0;
}
boolean lrunning = false;
boolean lpause = false;
... |
public static void main( String[] argv ) {
new JoglApplication( new com.badlogic.gdx.tests.IsometricTileTest(), "Debug Test", 480, 320, false );
}
| public static void main( String[] argv ) {
new JoglApplication( new com.badlogic.gdx.tests.IsometricTileTest(), "Debug Test", 960, 640, false );
}
|
BlobContainer blobContainer(BlobPath path);
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.... | BlobContainer blobContainer(BlobPath path);
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.... |
public static void assertNoTimeout(ClusterHealthResponse response) {
assertThat("ClusterHealthResponse has timed out - returned status: [" + response.getStatus() + "]", response.isTimedOut(), is(false));
}
| public static void assertNoTimeout(ClusterHealthResponse response) {
assertThat("ClusterHealthResponse has timed out - returned: [" + response + "]", response.isTimedOut(), is(false));
}
|
public void draw (Batch batch, float parentAlpha) {
validate();
Drawable background = null;
float offsetX = 0, offsetY = 0;
if (isPressed() && !isDisabled()) {
background = style.down == null ? style.up : style.down;
offsetX = style.pressedOffsetX;
offsetY = style.pressedOffsetY;
} else {
if (is... | public void draw (Batch batch, float parentAlpha) {
validate();
Drawable background = null;
float offsetX = 0, offsetY = 0;
if (isPressed() && !isDisabled()) {
background = style.down == null ? style.up : style.down;
offsetX = style.pressedOffsetX;
offsetY = style.pressedOffsetY;
} else {
if (is... |
public InternalSearchResponse merge(ShardDoc[] sortedDocs, Map<SearchShardTarget, ? extends QuerySearchResultProvider> queryResults, Map<SearchShardTarget, ? extends FetchSearchResultProvider> fetchResults) {
boolean sorted = false;
int sortScoreIndex = -1;
QuerySearchResult querySearchResu... | public InternalSearchResponse merge(ShardDoc[] sortedDocs, Map<SearchShardTarget, ? extends QuerySearchResultProvider> queryResults, Map<SearchShardTarget, ? extends FetchSearchResultProvider> fetchResults) {
boolean sorted = false;
int sortScoreIndex = -1;
QuerySearchResult querySearchResu... |
public Map<String, Facet> facetsAsMap() {
if (facetsAsMap != null) {
return facetsAsMap;
}
Map<String, Facet> facetsAsMap = newHashMap();
for (Facet facet : facets) {
facetsAsMap.put(facet.name(), facet);
}
this.facetsAsMap = facetsAsMap;
... | public Map<String, Facet> facetsAsMap() {
if (facetsAsMap != null) {
return facetsAsMap;
}
Map<String, Facet> facetsAsMap = newHashMap();
for (Facet facet : facets) {
facetsAsMap.put(facet.getName(), facet);
}
this.facetsAsMap = facetsAsMap;
... |
private Actor keyboardFocus, scrollFocus;
public SnapshotArray<TouchFocus> touchFocuses = new SnapshotArray(true, 4, TouchFocus.class);
| private Actor keyboardFocus, scrollFocus;
private SnapshotArray<TouchFocus> touchFocuses = new SnapshotArray(true, 4, TouchFocus.class);
|
protected Event register(Event resource) {
return NewsEventListAdapter.isValid(resource) ? resource : null;
}
};
}
| protected Event register(Event resource) {
return NewsListAdapter.isValid(resource) ? resource : null;
}
};
}
|
public PercolateRequestBuilder setScore(boolean score) {
sourceBuilder().setScore(score);
return this;
}
| public PercolateRequestBuilder setScore(boolean score) {
sourceBuilder().setTrackScores(score);
return this;
}
|
public ClusterState execute(ClusterState currentState) {
DiscoveryNodes newNodes = currentState.nodes().removeDeadMembers(newMembers, master.localNode.id());
DiscoveryNodes.Delta delta = newNodes.delta(currentState.nodes());
if ... | public ClusterState execute(ClusterState currentState) {
DiscoveryNodes newNodes = currentState.nodes().removeDeadMembers(newMembers, master.localNode.id());
DiscoveryNodes.Delta delta = newNodes.delta(currentState.nodes());
if ... |
public Gist call() throws Exception {
GistService service = serviceProvider.get(getContext());
GistStore store = storeProvider.get(getContext());
PageIterator<Gist> pages = service.pagePublicGists(1);
pages.next();
int randomPage = 1 + (int) (Math.random() * ((pages.getLastP... | public Gist call() throws Exception {
GistService service = serviceProvider.get(getContext());
GistStore store = storeProvider.get(getContext());
PageIterator<Gist> pages = service.pagePublicGists(1);
pages.next();
int randomPage = 1 + (int) (Math.random() * ((pages.getLastP... |
public void testBulkUpdate_malformedScripts() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test")
.setSettings(
ImmutableSettings.settingsBuilder()
... | public void testBulkUpdate_malformedScripts() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test")
.setSettings(
ImmutableSettings.settingsBuilder()
.put("index.number_of_shards", 2)
... |
public void testRequiredRoutingWithPathNumericType() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1")
... | public void testRequiredRoutingWithPathNumericType() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1")
.startObject("_routing").field("requi... |
public void testDistanceSortingNestedFields() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
String mapping = XContentFactory.jsonBuilder().startObject().startObject("company")
.startObject("properties")
.startObject("name").field... | public void testDistanceSortingNestedFields() throws Exception {
wipeIndices();
String mapping = XContentFactory.jsonBuilder().startObject().startObject("company")
.startObject("properties")
.startObject("name").field("type", "string").endObject()
.sta... |
public void testSimpleTimestamp() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").startObject("_timestamp").fie... | public void testSimpleTimestamp() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").startObject("_timestamp").field("enabled", true).field("store", "yes").endObject... |
public void testSimpleTTL() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder()
.startObject()
.startO... | public void testSimpleTTL() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder()
.startObject()
.startObject("type1")
.startObject... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.