IndicesOptions for DeleteByQueryAction (in ES 5.x)

I need to migrate this code to compatible with ES5.2

es 2.3.3 ver

	new DeleteByQueryRequestBuilder(client, DeleteByQueryAction.INSTANCE).setIndices( //
			indexPrefix + "_" + yyyymmdd, //
			indexPrefix + "_" + DATE_FORMATTER.print(tomorrow.getTimeInMillis())) //
			.setIndicesOptions(IndicesOptions.fromOptions(true, true, false, false)) //
			.setTypes("band") //
			.setQuery(qb) //

so I converted it like below.

es 5.2.2 ver

	BulkIndexByScrollResponse response = DeleteByQueryAction.INSTANCE.newRequestBuilder(client)//
		.source(indexPrefix + "_" + yyyymmdd, indexPrefix + "_" + DATE_FORMATTER.print(tomorrow.getTimeInMillis()))//

But I can not find "setIndicesOptions(...)" alternative at ES 5.2 API.
How can I mute this kind of exception?

Exception in thread "main" [jpl_20170316] IndexNotFoundException[no such index]
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.infe(
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.