简体   繁体   中英

Elastic Search How to retrieve the data if any changes made to a particular database column using Low Level Rest Client

Using Elastic search 7.0.1 /spring Boot/REST API/Java 8 Versions can anyone help me in resolving the issue. ?

I am able to create an index document which are status is ACTIVE.

@RestController
public class Search Controller {``
@GetMapping("/retrieve")
public String retrieve (String id) {
Request request=new Request("GET", index Name +"/_search");
..
 }
}

But if a document has updated to inactive status those documents should not be visible only Active documents should visible but it is not happening. How to perform re Index the document through Rest API with low Level Rest Client. using Elastic search 7.0.x

Elasticsearch doesn't have columns like a database, so the answer here will depend on exactly what you want to find has changed

there is the _version field that is automatically updated when a document has a change made to it, and you can define that yourself using version_type . or you can use something like https://www.elastic.co/guide/en/elasticsearch/reference/7.15/version.html those are both document level though

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM