1. Primordial API

There's no official offer here bulk API, It's a different way .

POST /infomations/infomations/_update_by_query
JSON Request format 
{
"query": {
"match": {
"status": "UP_SHELF"
}
},
"script": {
"inline": "ctx._source['status'] = 'DOWN_SHELF'"
}
}
POST request / Indexes / Document name /_update_by_query

 Mainly take a look at the following script

ctx._source[ Field name ] = “ value ”;ctx._source[ Field name ] = “ value ”;
If there are more than one, separate them with semicolons .

2.JAVA API operation

        // Cluster pattern , For a link 
Client client = elasticsearchTemplate.getClient();

UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequestBuilder(client);
String name = " Modify the value ";
updateByQuery.source(" Indexes ")
// Query the result set to modify
.filter(QueryBuilders.termQuery("field", 412))
// Modify the operating
.script(new Script( "ctx._source['field']='"+ name+"';ctx._source['field']='"+name+"'"));
// Response result set
BulkByScrollResponse response = updateByQuery.get();
long updated = response.getUpdated();

elasticsearch Bulk changes , Batch update more articles about a field

  1. How to batch modify web pages Update website Save with one click windows View and sort

    Batch open the web pages that need to be modified , Save with one click : A website will consist of many pages , When a lot of updates are needed , If you open and modify one by one , It's going to be inefficient , There are not many changes in the content , And easy to modify , It can be used editplus This kind of small editing software is opened in batches , Batch ...

  2. mysql update sentence , Modify fields ,, Or batch modification of fields

    Update a field , Add a string after it , Do not query the database to get this field value How to add ?? for example : my test surface , There is one user Field , Now I want to add another user's name after it I am here mysql The database writes like this UPDATE ...

  3. oracle Batch update table fields

      ( One ) Replace numbers with Chinese characters First step , Go to check again Use distinct Keyword first de duplicate the field value , There are several situations -- Query the value of the table stop field in the specified interval SELECT DISTINCT T.CLOSE_T ...

  4. Oracle Batch modify field length

    Oracle Batch modify field length SELECT  'alter table '||a.table_name||' MODIFY  '||A.COLUMN_NAME||' VARCHAR2(100);' ...

  5. sql Take the data before and after the comma and batch modify the value of a field

    sql Take the value after the comma SELECT SUBSTRING_INDEX( Field ,) FROM Table name sql Take the value before the comma SELECT SUBSTRING_INDEX( Field ,) FROM Table name Bulk changes UPD ...

  6. mysql Batch modify field method

    One . Formal environmental operation precautions : . Turn off application access or set database read-only mysql Set to read-only method : Read only on : mysql> show global variables like "%read_o ...

  7. SQL Whether the case of a statement is distinguished , Batch modify the case of all fields in all tables of the whole database

    One . introduces SQL Is the statement case sensitive ? Let's start with the following example : example : -->  Create table , insert data : declare @maco table (number int,myvalue ...

  8. mongo And $rename Update the name of a field ( Can be batch )

    $rename Operation logic execution $unset  Old names and new names , And then execute  $set New name run . therefore , Operations may not preserve the order of the fields in the document ;  That is, the renamed field can be moved within the document . 1. Rename field : First level fields Format : db ...

  9. linq Batch modify update

    Bulk changes :var values = Context.Request["values"].JsonDeserialize<Dictionary<string, objec ...

  10. MySQL Batch update the value of a field as a random number

    $arr = []; $str = ''; for ($i=0; $i < 2660; ++$i) { $str .= " WHEN ".$i." THEN &qu ...

Random recommendation

  1. MySQL( nothing GUI) Windows Installation and startup

    1. On the official website http://dev.mysql.com/downloads/ download MySQL Community Server 2. After decompression, it looks like this : 3. find cmd, And start with administrator privileges , must ! Otherwise it didn't ...

  2. use AE How to make the following three loading Dynamic effect ,

    In this issue of ivory painting UED Team sharing , We're going to demonstrate it in detail AE How to make the following three loading Dynamic effect , It involves AE Application of expressions . Value curve adjustment . Speed curve editing and other knowledge . For beginners, there may be a little more information , Hope to pass the video tutorial ...

  3. NBUT 1010 Magic girl (DP)

    [1010] Magic girl The time limit : 1000 ms Memory limit : 65535 K Problem description Some time ago, Xu yuanxuan's great offering and small circle really caught fire . In the black long straight ( Xiaoyan ) Climbing up the stairs to fight against the witch's night , She has a problem and wants to ask for your help . ...

  4. python Function call binding in , Static methods and class methods

    stay C++ In the class , There are two kinds of functions : Ordinary member functions and static member functions , The difference is that member functions are called through class instances , Static member functions are called by class names . Essentially , Member functions will default to this The pointer is passed in as the first parameter , Static member functions don't need to ...

  5. sql commands

    1,DBCC SQLPERF(logspace) https://msdn.microsoft.com/en-us/library/ms189768.aspx 2, 1, LOGINFO(''HAHA ...

  6. jLink V8 debugging exynos 4412 u-boot A few supplements to

    /** ****************************************************************************** * @author    Maox ...

  7. 【 turn 】oracle Of substr Function usage

    [ turn ]oracle Of substr Function usage )     would return 'The' ) value from dual

  8. Spring boot Tool class static property injection and multi environment configuration

    Due to the need to visit MongoDB, But the local development environment can't connect directly to MongoDB, Need to pass through SecureCRT Use 127.0.0.2 Local IP agent . But when the program is deployed to an online production environment , It's directly accessible MongoDB Of , therefore ...

  9. android stdio Error Could not find com.android.tools common 25.2.2

    Error:Could not find com.android.tools:common:25.2.2. Searched in the following locations: file:/D:/ ...

  10. 1.AKATSUKI

    ## 1.AKATSUKI - “ Xiao ”, Japanese cartoon < naruto > And a secret organization in his derivative works . - It was founded to bring peace to our country . ## 2. Team members - Qiu Dongbao - 211606325 ...