buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void testSetSource() throws InterruptedException, ExecutionException { createIndex("test"); ensureYellow(); Map<String, Object> map = new HashMap<String, Object>(); map.put("test_field", "foobar"); IndexRequestBuilder[] builders = new IndexRequestBuilder[] { ...
public void testSetSource() throws InterruptedException, ExecutionException { createIndex("test"); ensureYellow(); Map<String, Object> map = new HashMap<>(); map.put("test_field", "foobar"); IndexRequestBuilder[] builders = new IndexRequestBuilder[] { client()...
private List<String> analyze(Settings settings, String analyzerName, String text) throws IOException { Index index = new Index("test"); Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings), new EnvironmentModule(new Environment(settings)), new IndicesAnalysisModule()).crea...
private List<String> analyze(Settings settings, String analyzerName, String text) throws IOException { Index index = new Index("test"); Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings), new EnvironmentModule(new Environment(settings)), new IndicesAnalysisModule()).crea...
private Version randomVersion(Random random) throws IllegalArgumentException, IllegalAccessException { Field[] declaredFields = Version.class.getDeclaredFields(); List<Field> versionFields = new ArrayList<Field>(); for (Field field : declaredFields) { if ((field.getModifiers() & ...
private Version randomVersion(Random random) throws IllegalArgumentException, IllegalAccessException { Field[] declaredFields = Version.class.getDeclaredFields(); List<Field> versionFields = new ArrayList<>(); for (Field field : declaredFields) { if ((field.getModifiers() & Modif...
public void testNoUIDField() throws IOException { Codec codec = new TestCodec(); Directory d = new RAMDirectory(); IndexWriterConfig config = new IndexWriterConfig(Lucene.VERSION, new WhitespaceAnalyzer(Lucene.VERSION)); config.setCodec(codec); IndexWriter writer = ne...
public void testNoUIDField() throws IOException { Codec codec = new TestCodec(); Directory d = new RAMDirectory(); IndexWriterConfig config = new IndexWriterConfig(Lucene.VERSION, new WhitespaceAnalyzer(Lucene.VERSION)); config.setCodec(codec); IndexWriter writer = ne...
public void testNestedSorting(SortMode sortMode) throws IOException { final String[] values = new String[randomIntBetween(2, 20)]; for (int i = 0; i < values.length; ++i) { values[i] = _TestUtil.randomSimpleString(getRandom()); } final int numParents = scaledRandomIntBetw...
public void testNestedSorting(SortMode sortMode) throws IOException { final String[] values = new String[randomIntBetween(2, 20)]; for (int i = 0; i < values.length; ++i) { values[i] = _TestUtil.randomSimpleString(getRandom()); } final int numParents = scaledRandomIntBetw...
private void test(Data data) throws Exception { Random r = getRandom(); final int numDocs = 1000 + r.nextInt(19000); final List<LongOpenHashSet> values = new ArrayList<LongOpenHashSet>(numDocs); for (int i = 0; i < numDocs; ++i) { final int numValues = data.numValues(r); ...
private void test(Data data) throws Exception { Random r = getRandom(); final int numDocs = 1000 + r.nextInt(19000); final List<LongOpenHashSet> values = new ArrayList<>(numDocs); for (int i = 0; i < numDocs; ++i) { final int numValues = data.numValues(r); fin...
public void testSvValues() throws IOException { int numDocs = 1000000; int numOrdinals = numDocs / 4; Map<Integer, Long> controlDocToOrdinal = new HashMap<Integer, Long>(); OrdinalsBuilder builder = new OrdinalsBuilder(numDocs); long ordinal = builder.nextOrdinal(); f...
public void testSvValues() throws IOException { int numDocs = 1000000; int numOrdinals = numDocs / 4; Map<Integer, Long> controlDocToOrdinal = new HashMap<>(); OrdinalsBuilder builder = new OrdinalsBuilder(numDocs); long ordinal = builder.nextOrdinal(); for (int doc =...
private void assertNumericTokensEqual(ParsedDocument doc, DocumentMapper defaultMapper, String fieldA, String fieldB) throws IOException { assertThat(doc.rootDoc().getField(fieldA).tokenStream(defaultMapper.indexAnalyzer()), notNullValue()); assertThat(doc.rootDoc().getField(fieldB).tokenStream(defa...
private void assertNumericTokensEqual(ParsedDocument doc, DocumentMapper defaultMapper, String fieldA, String fieldB) throws IOException { assertThat(doc.rootDoc().getField(fieldA).tokenStream(defaultMapper.indexAnalyzer()), notNullValue()); assertThat(doc.rootDoc().getField(fieldB).tokenStream(defa...
public void testBytesAndNumericRepresentation() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); String mapping = XContentFactory.jsonBuilder() .startObject() .startObjec...
public void testBytesAndNumericRepresentation() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); String mapping = XContentFactory.jsonBuilder() .startObject() .startObjec...
public void testJSONGeneration() throws IOException { Map<String, Object> vars = new HashMap<String, Object>(); vars.put("template", "filled"); TemplateQueryBuilder builder = new TemplateQueryBuilder("I am a $template string", vars); XContentBuilder content = XContentFactory.jsonBuil...
public void testJSONGeneration() throws IOException { Map<String, Object> vars = new HashMap<>(); vars.put("template", "filled"); TemplateQueryBuilder builder = new TemplateQueryBuilder("I am a $template string", vars); XContentBuilder content = XContentFactory.jsonBuilder(); ...
public void testNestedSorting() throws Exception { List<Document> docs = new ArrayList<Document>(); Document document = new Document(); document.add(createField("field2", 3, Field.Store.NO)); document.add(new StringField("filter_1", "T", Field.Store.NO)); docs.add(document); ...
public void testNestedSorting() throws Exception { List<Document> docs = new ArrayList<>(); Document document = new Document(); document.add(createField("field2", 3, Field.Store.NO)); document.add(new StringField("filter_1", "T", Field.Store.NO)); docs.add(document); ...
public void testNestedSorting() throws Exception { List<Document> docs = new ArrayList<Document>(); Document document = new Document(); document.add(new StringField("field2", "a", Field.Store.NO)); document.add(new StringField("filter_1", "T", Field.Store.NO)); docs.add(docum...
public void testNestedSorting() throws Exception { List<Document> docs = new ArrayList<>(); Document document = new Document(); document.add(new StringField("field2", "a", Field.Store.NO)); document.add(new StringField("filter_1", "T", Field.Store.NO)); docs.add(document); ...
private List<ShardRecoveryResponse> findRecoveriesForTargetNode(String nodeName, List<ShardRecoveryResponse> responses) { List<ShardRecoveryResponse> nodeResponses = new ArrayList<ShardRecoveryResponse>(); for (ShardRecoveryResponse response : responses) { if (response.recoveryState().ge...
private List<ShardRecoveryResponse> findRecoveriesForTargetNode(String nodeName, List<ShardRecoveryResponse> responses) { List<ShardRecoveryResponse> nodeResponses = new ArrayList<>(); for (ShardRecoveryResponse response : responses) { if (response.recoveryState().getTargetNode().getName...
public void testThatLoadingTemplateFromFileWorks() throws Exception { final int iters = scaledRandomIntBetween(5, 20); Set<String> indices = new HashSet<String>(); for (int i = 0; i < iters; i++) { String indexName = "foo" + randomRealisticUnicodeOfLengthBetween(0, 5); ...
public void testThatLoadingTemplateFromFileWorks() throws Exception { final int iters = scaledRandomIntBetween(5, 20); Set<String> indices = new HashSet<>(); for (int i = 0; i < iters; i++) { String indexName = "foo" + randomRealisticUnicodeOfLengthBetween(0, 5); if (...
public void testFacetsAndAggregations() throws Exception { client().admin().indices().prepareCreate("test").execute().actionGet(); ensureGreen(); int numQueries = scaledRandomIntBetween(250, 500); int numUniqueQueries = between(1, numQueries / 2); String[] values = new Strin...
public void testFacetsAndAggregations() throws Exception { client().admin().indices().prepareCreate("test").execute().actionGet(); ensureGreen(); int numQueries = scaledRandomIntBetween(250, 500); int numUniqueQueries = between(1, numQueries / 2); String[] values = new Strin...
public void test() { HashMap<String, Object> scopes = new HashMap<String, Object>(); scopes.put("boost_val", "0.2"); String template = "GET _search {\"query\": " + "{\"boosting\": {" + "\"positive\": {\"match\": {\"body\": \"gift\"}}," + "\"negative\": {\"ter...
public void test() { HashMap<String, Object> scopes = new HashMap<>(); scopes.put("boost_val", "0.2"); String template = "GET _search {\"query\": " + "{\"boosting\": {" + "\"positive\": {\"match\": {\"body\": \"gift\"}}," + "\"negative\": {\"term\": {\"body\"...
public void emptyAggregation() throws Exception { prepareCreate("empty_bucket_idx").addMapping("type", SINGLE_VALUED_FIELD_NAME, "type=integer").execute().actionGet(); List<IndexRequestBuilder> builders = new ArrayList<IndexRequestBuilder>(); for (int i = 0; i < 2; i++) { builder...
public void emptyAggregation() throws Exception { prepareCreate("empty_bucket_idx").addMapping("type", SINGLE_VALUED_FIELD_NAME, "type=integer").execute().actionGet(); List<IndexRequestBuilder> builders = new ArrayList<>(); for (int i = 0; i < 2; i++) { builders.add(client().prep...
public void init() throws Exception { createIndex("idx"); createIndex("idx2"); List<IndexRequestBuilder> builders = new ArrayList<IndexRequestBuilder>(); numDocs = randomIntBetween(3, 20); for (int i = 0; i < numDocs / 2; i++) { builders.add(client().prepareIndex(...
public void init() throws Exception { createIndex("idx"); createIndex("idx2"); List<IndexRequestBuilder> builders = new ArrayList<>(); numDocs = randomIntBetween(3, 20); for (int i = 0; i < numDocs / 2; i++) { builders.add(client().prepareIndex("idx", "type", ""+i...
private void checkExpectedStringTermsFound(SignificantTerms topTerms) { HashMap<String,Bucket>topWords=new HashMap<String,Bucket>(); for (Bucket topTerm : topTerms ){ topWords.put(topTerm.getKey(),topTerm); } assertTrue( topWords.containsKey("haakonsen")); assertT...
private void checkExpectedStringTermsFound(SignificantTerms topTerms) { HashMap<String,Bucket>topWords=new HashMap<>(); for (Bucket topTerm : topTerms ){ topWords.put(topTerm.getKey(),topTerm); } assertTrue( topWords.containsKey("haakonsen")); assertTrue( topWords...
private List<OrderPath.Token> tokens = new ArrayList<OrderPath.Token>(); Tokens add(String name) { tokens.add(new OrderPath.Token(name, name, null)); return this; } Tokens add(String name, String key) { if (Math.random() > 0.5) { toke...
private List<OrderPath.Token> tokens = new ArrayList<>(); Tokens add(String name) { tokens.add(new OrderPath.Token(name, name, null)); return this; } Tokens add(String name, String key) { if (Math.random() > 0.5) { tokens.add(new Orde...
public void testPartiallyUnmappedField() throws ElasticsearchException, IOException { assertAcked(prepareCreate("mapped_idx") .addMapping("type", jsonBuilder().startObject().startObject("type").startObject("properties") .startObject("partially_mapped_byte").field("typ...
public void testPartiallyUnmappedField() throws ElasticsearchException, IOException { assertAcked(prepareCreate("mapped_idx") .addMapping("type", jsonBuilder().startObject().startObject("type").startObject("properties") .startObject("partially_mapped_byte").field("typ...
public void testPostingsHighlighterManyDocs() throws Exception { assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping())); ensureGreen(); int COUNT = between(20, 100); Map<String, String> prefixes = new HashMap<String, String>(COUNT); IndexReques...
public void testPostingsHighlighterManyDocs() throws Exception { assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping())); ensureGreen(); int COUNT = between(20, 100); Map<String, String> prefixes = new HashMap<>(COUNT); IndexRequestBuilder[] ind...
private Set<String> nodeIdsWithIndex(String... indices) { ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); GroupShardsIterator allAssignedShardsGrouped = state.routingTable().allAssignedShardsGrouped(indices, true); Set<String> nodes = new Hash...
private Set<String> nodeIdsWithIndex(String... indices) { ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState(); GroupShardsIterator allAssignedShardsGrouped = state.routingTable().allAssignedShardsGrouped(indices, true); Set<String> nodes = new Hash...
public static AllocationDeciders randomAllocationDeciders(Settings settings, NodeSettingsService nodeSettingsService, Random random) { final ImmutableSet<Class<? extends AllocationDecider>> defaultAllocationDeciders = AllocationDecidersModule.DEFAULT_ALLOCATION_DECIDERS; final List<AllocationDecider...
public static AllocationDeciders randomAllocationDeciders(Settings settings, NodeSettingsService nodeSettingsService, Random random) { final ImmutableSet<Class<? extends AllocationDecider>> defaultAllocationDeciders = AllocationDecidersModule.DEFAULT_ALLOCATION_DECIDERS; final List<AllocationDecider...
public static void assertSearchHits(SearchResponse searchResponse, String... ids) { String shardStatus = formatShardStatus(searchResponse); assertThat("Expected different hit count. " + shardStatus, searchResponse.getHits().hits().length, equalTo(ids.length)); Set<String> idsSet = new HashS...
public static void assertSearchHits(SearchResponse searchResponse, String... ids) { String shardStatus = formatShardStatus(searchResponse); assertThat("Expected different hit count. " + shardStatus, searchResponse.getHits().hits().length, equalTo(ids.length)); Set<String> idsSet = new HashS...
private Map<String, String> processTestLogging(TestLogging testLogging) { if (testLogging == null) { return null; } Map<String, String> map = new HashMap<String, String>(); final String[] loggersAndLevels = testLogging.value().split(","); for (String loggerAndLeve...
private Map<String, String> processTestLogging(TestLogging testLogging) { if (testLogging == null) { return null; } Map<String, String> map = new HashMap<>(); final String[] loggersAndLevels = testLogging.value().split(","); for (String loggerAndLevel : loggersAnd...
protected List<RestTestCandidate> collectTestCandidates(Description rootDescription) throws InitializationError, IOException { String[] paths = resolvePathsProperty(REST_TESTS_SUITE, DEFAULT_TESTS_PATH); Map<String, Set<File>> yamlSuites = FileUtils.findYamlSuites(DEFAULT_TESTS_PATH, paths); ...
protected List<RestTestCandidate> collectTestCandidates(Description rootDescription) throws InitializationError, IOException { String[] paths = resolvePathsProperty(REST_TESTS_SUITE, DEFAULT_TESTS_PATH); Map<String, Set<File>> yamlSuites = FileUtils.findYamlSuites(DEFAULT_TESTS_PATH, paths); ...
public void testExternalVersioning() throws Exception { createIndex("test"); ensureGreen(); IndexResponse indexResponse = client().prepareIndex("test", "type", "1").setSource("field1", "value1_1").setVersion(12).setVersionType(VersionType.EXTERNAL).execute().actionGet(); assertThat(...
public void testExternalVersioning() throws Exception { createIndex("test"); ensureGreen(); IndexResponse indexResponse = client().prepareIndex("test", "type", "1").setSource("field1", "value1_1").setVersion(12).setVersionType(VersionType.EXTERNAL).execute().actionGet(); assertThat(...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
public void run() { Set<String> indicesDeleted = Sets.newHashSet(); if (event.localNodeMaster()) { logger.debug("writing to gateway {} ...", this); StopWatch stopWatch = new StopWatch().start(); try { ...
public void run() { Set<String> indicesDeleted = Sets.newHashSet(); if (event.localNodeMaster()) { logger.debug("writing to gateway {} ...", this); StopWatch stopWatch = new StopWatch().start(); try { ...
private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) { RoutingTableValidation validation = clusterState.routingTable().validate(clusterState.metaData()); ClusterHealthResponse response = new ClusterHealthResponse(clusterName.value(), validation.failure...
private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) { RoutingTableValidation validation = clusterState.routingTable().validate(clusterState.metaData()); ClusterHealthResponse response = new ClusterHealthResponse(clusterName.value(), validation.failure...
public void surfaceCreated(Application app) { String version = graphicPanel.getGL().glGetString( GL.GL_VERSION ); int major = Integer.parseInt("" + version.charAt(0)); int minor = Integer.parseInt("" + version.charAt(2)); if( useGL2 && major >= 2 ) { // FIXME add check wheter gl 2.0 is supported ...
public void surfaceCreated(Application app) { String version = graphicPanel.getGL().glGetString( GL.GL_VERSION ); int major = Integer.parseInt("" + version.charAt(0)); int minor = Integer.parseInt("" + version.charAt(2)); if( useGL2 && major >= 2 ) { // FIXME add check wheter gl 2.0 is supported ...
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer t = new StandardTokenizer(Version.LUCENE_41, reader); return new TokenStreamComponents(t, new ReverseStringFilter(Version.LUCENE_41, new LowerCaseFilter(Version.LUCENE_41, t))); ...
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer t = new StandardTokenizer(Version.LUCENE_41, reader); return new TokenStreamComponents(t, new ReverseStringFilter(Version.LUCENE_41, new LowerCaseFilter(Version.LUCENE_41, t))); ...
public void handleException(TransportException e) { logger.info("failed to get local cluster state for {}, disconnecting...", e, listedNode); transportService.disconnectFromNode(listedNode); ...
public void handleException(TransportException e) { logger.info("failed to get local cluster state for {}, disconnecting...", e, listedNode); transportService.disconnectFromNode(listedNode); ...
public Matrix4 setToWorld (Vector3 position, Vector3 forward, Vector3 up) { tmpForward.set(forward).nor(); right.set(tmpForward).crs(up).nor(); tmpUp.set(right).crs(tmpForward).nor(); this.set(right, tmpUp, tmpForward.scl(-1), position); return this; }
public Matrix4 setToWorld (Vector3 position, Vector3 forward, Vector3 up) { tmpForward.set(forward).nor(); right.set(tmpForward).crs(up).nor(); tmpUp.set(right).crs(tmpForward).nor(); this.set(right, tmpUp, tmpForward, position); return this; }
protected void update(final int position, final RepositoryHeaderItemView view, final Repository repository) { String headerValue = headers.get(repository.getId()); if (headerValue != null) { view.header.setVisibility(VISIBLE); view.headerText.setText(headerValue);...
protected void update(final int position, final RepositoryHeaderItemView view, final Repository repository) { String headerValue = headers.get(repository.getId()); if (headerValue != null) { view.header.setVisibility(VISIBLE); view.headerText.setText(headerValue);...
protected void update(final int position, final RepositoryItemView view, final Repository repository) { StyledText name = new StyledText(); if (!login.equals(repository.getOwner().getLogin())) { int descriptionColor = view.repoName.getResources().getColor( ...
protected void update(final int position, final RepositoryItemView view, final Repository repository) { StyledText name = new StyledText(); if (!login.equals(repository.getOwner().getLogin())) { int descriptionColor = view.repoName.getResources().getColor( ...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
public void clusterChanged(ClusterChangedEvent event) { if (event.state().blocks().disableStatePersistence()) { // reset the current metadata, we need to start fresh... this.currentMetaData = null; return; } MetaData newMetaData = event.state().metaData()...
private @Nullable ValueFormatter formatter;
public Number getKeyAsNumber() { return term; } @Override int compareTerm(Terms.Bucket other) { return Long.compare(term, other.getKeyAsNumber().longValue()); } @Override Object getKeyAsObject() { return getKeyAsNumber(); ...
public TermsAggregator(String name, BucketAggregationMode bucketAggregationMode, AggregatorFactories factories, long estimatedBucketsCount, AggregationContext context, Aggregator parent, BucketCountThresholds bucketCountThresholds, InternalOrder order, SubAggCollectionMode subAggCollectMode) { super(name, b...
public TermsAggregator(String name, BucketAggregationMode bucketAggregationMode, AggregatorFactories factories, long estimatedBucketsCount, AggregationContext context, Aggregator parent, BucketCountThresholds bucketCountThresholds, InternalOrder order, SubAggCollectionMode subAggCollectMode) { super(name, b...
public void onFailure(Throwable t) { onSecondPhaseFailure(t, querySearchRequest, shardIndex, dfsResult, counter); } }); } void onSecondPhaseFailure(Throwable t, QuerySearchRequest querySearchRequest, int shardIndex, DfsSearchResult dfsResu...
public void onFailure(Throwable t) { onSecondPhaseFailure(t, querySearchRequest, shardIndex, dfsResult, counter); } }); } void onSecondPhaseFailure(Throwable t, QuerySearchRequest querySearchRequest, int shardIndex, DfsSearchResult dfsResu...
private void innerFinishHim() throws IOException { sortedShardList = searchPhaseController.sortDocs(firstResults); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, firstResults, firstResults); String scrollId = null; if ...
private void innerFinishHim() throws IOException { sortedShardList = searchPhaseController.sortDocs(request, useSlowScroll, firstResults); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, firstResults, firstResults); String scrollId...
@Inject public NettyHttpServerTransport(Settings settings, NetworkService networkService) { super(settings); this.networkService = networkService; ByteSizeValue maxContentLength = componentSettings.getAsBytesSize("max_content_length", settings.getAsBytesSize("http.max_content_length", new By...
@Inject public NettyHttpServerTransport(Settings settings, NetworkService networkService) { super(settings); this.networkService = networkService; ByteSizeValue maxContentLength = componentSettings.getAsBytesSize("max_content_length", settings.getAsBytesSize("http.max_content_length", new By...
@Inject public NettyMemcachedServerTransport(Settings settings, RestController restController, NetworkService networkService) { super(settings); this.restController = restController; this.networkService = networkService; this.workerCount = componentSettings.getAsInt("worker_count", ...
@Inject public NettyMemcachedServerTransport(Settings settings, RestController restController, NetworkService networkService) { super(settings); this.restController = restController; this.networkService = networkService; this.workerCount = componentSettings.getAsInt("worker_count", ...
public TokenStream tokenStreamValue() { try { allEntries.reset(); // reset the all entries, just in case it was read already return AllTokenStream.allTokenStream(name, allEntries, analyzer); } catch (IOException e) { throw new ElasticSearchException("Failed to cre...
public TokenStream tokenStream(Analyzer analyzer) throws IOException { try { allEntries.reset(); // reset the all entries, just in case it was read already return AllTokenStream.allTokenStream(name, allEntries, analyzer); } catch (IOException e) { throw new Elasti...
private Image squeeze (BufferedImage source, String name) { if (source == null) return null; if (!filter.accept(source)) return null; uncompressedSize += source.getWidth() * source.getHeight(); WritableRaster alphaRaster = source.getAlphaRaster(); if (alphaRaster == null || !settings.stripWhitespace) retu...
private Image squeeze (BufferedImage source, String name) { if (source == null) return null; if (!filter.accept(source)) return null; uncompressedSize += source.getWidth() * source.getHeight(); WritableRaster alphaRaster = source.getAlphaRaster(); if (alphaRaster == null || !settings.stripWhitespace || name....
public static PercolateResponse reduce(PercolateRequest request, AtomicReferenceArray shardsResponses, PercolatorService percolatorService) { int successfulShards = 0; int failedShards = 0; List<PercolateShardResponse> shardResults = null; List<ShardOperationFailedException> shardFa...
public static PercolateResponse reduce(PercolateRequest request, AtomicReferenceArray shardsResponses, PercolatorService percolatorService) { int successfulShards = 0; int failedShards = 0; List<PercolateShardResponse> shardResults = null; List<ShardOperationFailedException> shardFa...
public IOSApplication (ApplicationListener listener, IOSApplicationConfiguration config) { this.listener = listener; this.config = config; } final boolean didFinishLaunching (UIApplication uiApp, NSDictionary options) { Gdx.app = this; this.uiApp = uiApp; // enable or disable screen dimming UIApplicat...
public IOSApplication (ApplicationListener listener, IOSApplicationConfiguration config) { this.listener = listener; this.config = config; } final boolean didFinishLaunching (UIApplication uiApp, NSDictionary options) { Gdx.app = this; this.uiApp = uiApp; // enable or disable screen dimming UIApplicat...
public AppletSound( AppletAudio audio, AppletFileHandle file ) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream( new FileInputStream( file.getFile() ) ); AudioInputStream ain = AudioSystem.getAudioInputStream( fin ); AudioFormat baseFormat ...
public AppletSound( AppletAudio audio, AppletFileHandle file ) throws UnsupportedAudioFileException, IOException { this.audio = audio; InputStream fin = new BufferedInputStream( file.getInputStream() ); AudioInputStream ain = AudioSystem.getAudioInputStream( fin ); AudioFormat baseFormat = ain.getFormat();...
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) { final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ); final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w); return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos(this.w / Math....
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) { final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ); final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w); return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos((float) (this....
public static final String MERGE_SCHEDULER_TYPE_KEY = "index.merge.scheduler.type"; public static final Class<? extends MergeSchedulerProvider> DEFAULT = SerialMergeSchedulerProvider.class;
public static final String MERGE_SCHEDULER_TYPE_KEY = "index.merge.scheduler.type"; public static final Class<? extends MergeSchedulerProvider> DEFAULT = ConcurrentMergeSchedulerProvider.class;
private static final void traverse(FileHandle directory, String base, StringBuffer list) { if(directory.name().equals(".svn")) return; String dirName = directory.toString().replace("\\", "/").replace(base, "") + "/"; System.out.println(dirName); for(FileHandle file: directory.list()) { if(file.isDirectory()...
private static final void traverse(FileHandle directory, String base, StringBuffer list) { if(directory.name().equals(".svn")) return; String dirName = directory.toString().replace("\\", "/").replace(base, "") + "/"; System.out.println(dirName); for(FileHandle file: directory.list()) { if(file.isDirectory()...
public Map<String, Facet> getFacets() { return facetsAsMap; }
public Map<String, Facet> getFacets() { return facetsAsMap(); }
private void writeValue(Object value) throws IOException { if (value == null) { generator.writeNull(); return; } Class type = value.getClass(); if (type == String.class) { generator.writeString((String) value); } else if (type == Integer.cl...
private void writeValue(Object value) throws IOException { if (value == null) { generator.writeNull(); return; } Class type = value.getClass(); if (type == String.class) { generator.writeString((String) value); } else if (type == Integer.cl...
public Query query(QueryParseContext parseContext, String queryText) { String fieldName = queryText; Filter filter = null; MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName); if (smartNameFieldMappers != null) { if (smart...
public Query query(QueryParseContext parseContext, String queryText) { String fieldName = queryText; Filter filter = null; MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName); if (smartNameFieldMappers != null) { if (smart...
protected Query getRangeQuery(String field, String part1, String part2, boolean inclusive) throws ParseException { if ("*".equals(part1)) { part1 = null; } if ("*".equals(part2)) { part2 = null; } currentMapper = null; MapperService.SmartNameFi...
protected Query getRangeQuery(String field, String part1, String part2, boolean inclusive) throws ParseException { if ("*".equals(part1)) { part1 = null; } if ("*".equals(part2)) { part2 = null; } currentMapper = null; MapperService.SmartNameFi...
public Query query(QueryParseContext parseContext, String queryText) { String fieldName = queryText; Filter filter = null; MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName); if (smartNameFieldMappers != null) { if (smar...
public Query query(QueryParseContext parseContext, String queryText) { String fieldName = queryText; Filter filter = null; MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName); if (smartNameFieldMappers != null) { if (smar...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String fieldName = null; String filterName = null; XContentParser.Token token; String currentFieldName = null; while ((toke...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String fieldName = null; String filterName = null; XContentParser.Token token; String currentFieldName = null; while ((toke...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String fieldName = null; String filterName = null; XContentParser.Token token; String currentFieldName = null; while ((toke...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String fieldName = null; String filterName = null; XContentParser.Token token; String currentFieldName = null; while ((toke...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; // default to false, since its using fielddata cache CacheKeyFilter.Key cacheKey = null; String fieldName = null; ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; // default to false, since its using fielddata cache CacheKeyFilter.Key cacheKey = null; String fieldName = null; ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = true; CacheKeyFilter.Key cacheKey = null; String fieldName = null; String from = null; String to = null; ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = true; CacheKeyFilter.Key cacheKey = null; String fieldName = null; String from = null; String to = null; ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token = parser.nextToken(); if (token != XContentParser.Token.FIELD_NAME) { throw new QueryParsingException(parseCon...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token = parser.nextToken(); if (token != XContentParser.Token.FIELD_NAME) { throw new QueryParsingException(parseCon...
protected void doXContentBody(XContentBuilder builder) throws IOException { super.doXContentBody(builder); if (precisionStep != Defaults.PRECISION_STEP) { builder.field("precision_step", precisionStep); } builder.field("format", dateTimeFormatter.format()); if (nu...
protected void doXContentBody(XContentBuilder builder) throws IOException { super.doXContentBody(builder); if (precisionStep != Defaults.PRECISION_STEP) { builder.field("precision_step", precisionStep); } builder.field("format", dateTimeFormatter.format()); if (nu...
public static void main (String[] argv) { // this is only here for me to debug native code faster // new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); // new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image"); // new Sha...
public static void main (String[] argv) { // this is only here for me to debug native code faster // new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); // new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image"); // new Sha...
public void create () { Gdx.audio.newSound(Gdx.files.internal("data/tic.ogg")).play(); }
public void create () { Gdx.audio.newSound(Gdx.files.internal("data/chirp.ogg")).play(); }
public void noPreferenceRandom() throws Exception { client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.number_of_replicas", 1)).execute().actionGet(); ensureGreen(); client().prepareIndex("test", "type1").setSou...
public void noPreferenceRandom() throws Exception { client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.number_of_replicas", 1)).execute().actionGet(); ensureGreen(); client().prepareIndex("test", "type1").setSou...
public MoreLikeThisRequest percentTermsToMatch(float percentTermsToMatch) { return minimumShouldMatch((int) (percentTermsToMatch * 100) + "%"); }
public MoreLikeThisRequest percentTermsToMatch(float percentTermsToMatch) { return minimumShouldMatch(Math.round(percentTermsToMatch * 100) + "%"); }
public MoreLikeThisRequestBuilder setPercentTermsToMatch(float percentTermsToMatch) { return setMinimumShouldMatch((int) (percentTermsToMatch * 100) + "%"); }
public MoreLikeThisRequestBuilder setPercentTermsToMatch(float percentTermsToMatch) { return setMinimumShouldMatch(Math.round(percentTermsToMatch * 100) + "%"); }
public MoreLikeThisFieldQueryBuilder percentTermsToMatch(float percentTermsToMatch) { return minimumShouldMatch((int) (percentTermsToMatch * 100) + "%"); }
public MoreLikeThisFieldQueryBuilder percentTermsToMatch(float percentTermsToMatch) { return minimumShouldMatch(Math.round(percentTermsToMatch * 100) + "%"); }
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.currentName(); ...
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.currentName(); ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); MoreLikeThisQuery mltQuery = new MoreLikeThisQuery(); mltQuery.setSimilarity(parseContext.searchSimilarity()); Analyzer analyzer = null; ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); MoreLikeThisQuery mltQuery = new MoreLikeThisQuery(); mltQuery.setSimilarity(parseContext.searchSimilarity()); Analyzer analyzer = null; ...
public void writeValue (Object value, Class knownType, Class elementType) { try { if (value == null) { writer.value(null); return; } if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class || knownType == Boolean.class || knownType == Float....
public void writeValue (Object value, Class knownType, Class elementType) { try { if (value == null) { writer.value(null); return; } if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class || knownType == Boolean.class || knownType == Float....
public void testNodes() throws Exception { ClusterStateResponse clusterStateResponse = client().admin().cluster().prepareState().clear().setNodes(true).get(); assertThat(clusterStateResponse.getState().nodes().nodes().size(), is(cluster().size())); ClusterStateResponse clusterStateResponseF...
public void testNodes() throws Exception { ClusterStateResponse clusterStateResponse = client().admin().cluster().prepareState().clear().setNodes(true).get(); assertThat(clusterStateResponse.getState().nodes().nodes().size(), is(immutableCluster().size())); ClusterStateResponse clusterState...
protected int minimumNumberOfShards() { return cluster().size(); }
protected int minimumNumberOfShards() { return immutableCluster().size(); }
private void assertAllocatorInstance(Settings settings, Class<? extends ShardsAllocator> clazz) { while (cluster().size() != 0) { cluster().stopRandomNode(); } cluster().startNode(settings); ShardsAllocator instance = cluster().getInstance(ShardsAllocator.class); ...
private void assertAllocatorInstance(Settings settings, Class<? extends ShardsAllocator> clazz) { while (immutableCluster().size() != 0) { cluster().stopRandomNode(); } cluster().startNode(settings); ShardsAllocator instance = cluster().getInstance(ShardsAllocator.cl...
public void onFailure(Throwable e) { e.printStackTrace(); failure.set(e); latch.countDown(); } }); } latch.await(); assertThat(failure.get(), nullValue()); client().admin().indices(...
public void onFailure(Throwable e) { e.printStackTrace(); failure.set(e); latch.countDown(); } }); } latch.await(); assertThat(failure.get(), nullValue()); client().admin().indices(...
public void message(String component, String message) { logger.trace("{} {}: {}", Thread.currentThread().getName(), component, message); }
public void message(String component, String message) { logger.trace("{}: {}", component, message); }
@Inject public TwitterIndexer(IndexerName indexerName, IndexerSettings settings, Client client) { super(indexerName, settings); this.client = client; String user = XContentMapValues.nodeStringValue(settings.settings().get("user"), null); String password = XContentMapValues.nodeStrin...
@Inject public TwitterIndexer(IndexerName indexerName, IndexerSettings settings, Client client) { super(indexerName, settings); this.client = client; String user = XContentMapValues.nodeStringValue(settings.settings().get("user"), null); String password = XContentMapValues.nodeStrin...
public void run () { initialize(listener, config); } }); } catch (Exception e) { throw new GdxRuntimeException("Creating window failed", e); } } else { initialize(listener, config); } } void initialize (ApplicationListener listener, JoglApplicationConfiguration config) { JoglNa...
public void run () { initialize(listener, config); } }); } catch (Exception e) { throw new GdxRuntimeException("Creating window failed", e); } } else { initialize(listener, config); } } void initialize (ApplicationListener listener, JoglApplicationConfiguration config) { JoglNa...
public QueryFacetExecutor(Query query) { this.query = query; Filter possibleFilter = extractFilterIfApplicable(query); if (possibleFilter != null) { this.filter = possibleFilter; } else { this.filter = new QueryWrapperFilter(query); } }
public QueryFacetExecutor(Query query) { this.query = query; Filter possibleFilter = extractFilterIfApplicable(query); if (possibleFilter != null) { this.filter = possibleFilter; } else { this.filter = Queries.wrap(query); } }
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer t = new StandardTokenizer(Version.LUCENE_41, reader); return new TokenStreamComponents(t, new ReverseStringFilter(Version.LUCENE_41, new LowerCaseFilter(Version.LUCENE_41, t))); ...
protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer t = new StandardTokenizer(Version.LUCENE_41, reader); return new TokenStreamComponents(t, new ReverseStringFilter(Version.LUCENE_41, new LowerCaseFilter(Version.LUCENE_41, t))); ...
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticSearchException { for (ScriptFieldsContext.ScriptField scriptField : context.scriptFields().fields()) { scriptField.script().setNextReader(hitContext.reader()); scriptField.script().setNextDocId(hitCon...
public void hitExecute(SearchContext context, HitContext hitContext) throws ElasticSearchException { for (ScriptFieldsContext.ScriptField scriptField : context.scriptFields().fields()) { scriptField.script().setNextReader(hitContext.readerContext()); scriptField.script().setNextDocId...
public ProgressBar (float min, float max, float stepSize, boolean vertical, ProgressBarStyle style) { if (min > max) throw new IllegalArgumentException("max must be > min. min,max: " + min + ", " + max); if (stepSize <= 0) throw new IllegalArgumentException("stepSize must be > 0: " + stepSize); setStyle(style); ...
public ProgressBar (float min, float max, float stepSize, boolean vertical, ProgressBarStyle style) { if (min > max) throw new IllegalArgumentException("min must be > max: " + min + " > " + max); if (stepSize <= 0) throw new IllegalArgumentException("stepSize must be > 0: " + stepSize); setStyle(style); this.m...
public void processMap (File inputDir, File outputDir, Settings settings) throws IOException { FileHandle inputDirHandle = new FileHandle(inputDir.getAbsolutePath()); File[] files = inputDir.listFiles(new TmxFilter()); for (File file : files) { map = TiledLoader.createMap(new FileHandle(file.getAbsolutePath(...
public void processMap (File inputDir, File outputDir, Settings settings) throws IOException { FileHandle inputDirHandle = new FileHandle(inputDir.getAbsolutePath()); File[] files = inputDir.listFiles(new TmxFilter()); for (File file : files) { map = TiledLoader.createMap(new FileHandle(file.getAbsolutePath(...
static public enum Type { touchDown, touchUp, touchDragged, touchMoved, enter, exit, scrolled, keyDown, keyUp, keyTyped }
static public enum Type { touchDown, touchUp, touchDragged, mouseMoved, enter, exit, scrolled, keyDown, keyUp, keyTyped }
public void handle (Event event); }
public boolean handle (Event event); }
public CullableActor (String name, Texture texture, OrthographicCamera camera) { super(new TextureRegion(texture), Scaling.none, Align.CENTER, name); this.camera = camera; }
public CullableActor (String name, Texture texture, OrthographicCamera camera) { super(new TextureRegion(texture), Scaling.none, Align.CENTER); this.camera = camera; }
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); if (useStage) { stage.act(Gdx.graphics.getDeltaTime()); stage.getSpriteBatch().disableBlending(); Group root = stage.getRoot(); Array<Actor> actors = root.getActors(); // for(int i = 0; i < actors.size(); i++) { // actors.get(i).rotatio...
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); if (useStage) { stage.act(Gdx.graphics.getDeltaTime()); stage.getSpriteBatch().disableBlending(); Group root = stage.getRoot(); Array<Actor> actors = root.getChildren(); // for(int i = 0; i < actors.size(); i++) { // actors.get(i).rotat...
public static ImmutableMap<String, BlobMetaData> buildVirtualBlobs(ImmutableBlobContainer container, ImmutableMap<String, BlobMetaData> blobs, @Nullable Map<String, String> cachedMd5) { // create a set of all the actual files based on .md5 extension Set<String> names = Sets.newHashSet(); for...
public static ImmutableMap<String, BlobMetaData> buildVirtualBlobs(ImmutableBlobContainer container, ImmutableMap<String, BlobMetaData> blobs, @Nullable Map<String, String> cachedMd5) { // create a set of all the actual files based on .md5 extension Set<String> names = Sets.newHashSet(); for...
public void render (final Renderable renderable) { if (currentMaterial != renderable.material) { currentMaterial = renderable.material; if (!currentMaterial.has(BlendingAttribute.Type)) context.setBlending(false, GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); if (!currentMaterial.has(ColorAttribute.Di...
public void render (final Renderable renderable) { if (currentMaterial != renderable.material) { currentMaterial = renderable.material; if (!currentMaterial.has(BlendingAttribute.Type)) context.setBlending(false, GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); if (!currentMaterial.has(ColorAttribute.Di...
@Override 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); l...
@Override 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); l...
@Override 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); l...
@Override 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); l...
public RecoverySettings(Settings settings, NodeSettingsService nodeSettingsService) { super(settings); this.fileChunkSize = componentSettings.getAsBytesSize("file_chunk_size", settings.getAsBytesSize("index.shard.recovery.file_chunk_size", new ByteSizeValue(512, ByteSizeUnit.KB))); this.tra...
public RecoverySettings(Settings settings, NodeSettingsService nodeSettingsService) { super(settings); this.fileChunkSize = componentSettings.getAsBytesSize("file_chunk_size", settings.getAsBytesSize("index.shard.recovery.file_chunk_size", new ByteSizeValue(512, ByteSizeUnit.KB))); this.tra...
@Override public void create () { //for(int i = 0; i < 4; i++) { model[0] = G3dLoader.loadStillModel(Gdx.files.internal("data/test_section_01.dae.g3d")); lightMaps[0] = new Texture(Gdx.files.internal("data/world_blobbie_lm_01.jpg"), true); model[1] = G3dLoader.loadStillModel(Gdx.files.internal("data/test_...
@Override public void create () { //for(int i = 0; i < 4; i++) { model[0] = G3dLoader.loadStillModel(Gdx.files.internal("data/test_section_01.dae.g3d")); lightMaps[0] = new Texture(Gdx.files.internal("data/world_blobbie_lm_01.jpg"), true); model[1] = G3dLoader.loadStillModel(Gdx.files.internal("data/test_...
public FieldMetadata (Field field) { this.field = field; int index = (ClassReflection.isAssignableFrom(ObjectMap.class, field.getType()) || ClassReflection.isAssignableFrom( Map.class, field.getType())) ? 1 : 0; this.elementType = field.getElementType(index); } }
public FieldMetadata (Field field) { this.field = field; int index = (ClassReflection.isAssignableFrom(ObjectMap.class, field.getType()) || ClassReflection.isAssignableFrom( HashMap.class, field.getType())) ? 1 : 0; this.elementType = field.getElementType(index); } }
public UidField(String name, String uid, long version) { super(name, UidFieldMapper.Defaults.UID_FIELD_TYPE); this.uid = uid;
public UidField(String name, String uid, long version) { super(name, UidFieldMapper.Defaults.FIELD_TYPE); this.uid = uid;
public PostingsFormat getPostingsFormatForField(String field) { PostingsFormatProvider postingsFormat = mapperService.indexName(field).mapper().postingFormatProvider(); return postingsFormat != null ? postingsFormat.get() : defaultPostingFormat; }
public PostingsFormat getPostingsFormatForField(String field) { PostingsFormatProvider postingsFormat = mapperService.indexName(field).mapper().postingsFormatProvider(); return postingsFormat != null ? postingsFormat.get() : defaultPostingFormat; }
public Term createIndexNameTerm(BytesRef value) { return new Term(indexName, value); } } Names names(); // LUCENE 4 UPGRADE Consider replacing these all with fieldType() and letting consumer pick and choose boolean indexed(); boolean tokenized(); boolean stored()...
public Term createIndexNameTerm(BytesRef value) { return new Term(indexName, value); } } Names names(); // LUCENE 4 UPGRADE Consider replacing these all with fieldType() and letting consumer pick and choose boolean indexed(); boolean tokenized(); boolean stored()...
public void testUidField() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); DirectoryReader directoryReader = DirectoryReader.open(writer, true); AtomicReader atomicReader = SlowCompositeReaderWrapp...
public void testUidField() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); DirectoryReader directoryReader = DirectoryReader.open(writer, true); AtomicReader atomicReader = SlowCompositeReaderWrapp...