public JSONObject deleteBy(@NonNull Query query, RequestOptions requestOptions) throws AlgoliaException {
    """
	Deletes all records matching the query.
	
	@param query the query string
	@throws AlgoliaException
    """
        try {
            return client.postRequest("/1/indexes/" + encodedIndexName + "/deleteByQuery", query.getParameters(), new JSONObject().put("params", query.build()).toString(), false, requestOptions);
        } catch (JSONException e) {
            e.printStackTrace();
            return null;
        }
    }
public JSONObject deleteBy(@NonNull Query query, RequestOptions requestOptions) throws AlgoliaException {
        try {
            return client.postRequest("/1/indexes/" + encodedIndexName + "/deleteByQuery", query.getParameters(), new JSONObject().put("params", query.build()).toString(), false, requestOptions);
        } catch (JSONException e) {
            e.printStackTrace();
            return null;
        }
    }
public JSONObject deleteBy ( @ NonNull Query query , RequestOptions requestOptions ) throws AlgoliaException { try { return client . postRequest ( "/1/indexes/" + encodedIndexName + "/deleteByQuery" , query . getParameters ( ) , new JSONObject ( ) . put ( "params" , query . build ( ) ) . toString ( ) , false , requestOptions ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; return null ; } }
Deletes all records matching the query.

@param query the query string
@throws AlgoliaException
Deletes all records matching the query .