Elasticsearch DSL Query for Update

xxestter

I understand that I am able to update a particular document by http://localhost:9200/[index_name]/[index_type]/[_id], but I have document where the _id has # symbols which Sense couldn't find them.

Understand that the Query DSL will be able to perform a search where I am able to indicate the _id not in the URL. Resource: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html

Can I check with you, how can I do the same for updating document?

Val

If you don't want to put the ID in the URL, the only option you have is to use the update by query API, like this:

POST index/_update_by_query
{
  "query": {
    "ids": {
      "values": ["2323#23423"]
    }
  },
  "script": {
    "source": "do some update here"
  }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Elasticsearch DSL query with specific Output

From Dev

Mix DSL and URI query in Elasticsearch

From Dev

Range or missing - ElasticSearch - Query DSL

From Dev

Confusions about the Elasticsearch json dsl query structure

From Dev

Elasticsearch DSL query from an SQL statement

From Dev

elasticsearch-dsl-py query formation

From Dev

Django-Elasticsearch-DSL Nested Range Query

From Dev

How to rewrite ElasticSearch DSL query with the Java API

From Dev

Using Elasticsearch DSL Query with Hadoop Mapreduce

From Dev

Using elasticsearch dsl query with multiple indices

From Dev

Mapping logical queries to elasticsearch query DSL

From Dev

How to write java code for elasticsearch DSL query

From Dev

Query DSL elasticsearch doesn't work

From Dev

Exclude term in elasticsearch_dsl filter query

From Dev

Elasticsearch DSL query - Get all matching results

From Dev

Update a field of document using DSL query

From Dev

Update By Query in Elasticsearch using Java

From Dev

Update By Query in Elasticsearch using Java

From Java

What is the difference between must and filter in Query DSL in elasticsearch?

From Dev

how to log or print python elasticsearch-dsl query that gets invoked

From Dev

Elasticsearch DSL with multiple multi_match query in ruby

From Dev

how to find the nearest / closest number using Query DSL in elasticsearch

From Dev

Can i change below mysql query into elasticsearch dsl?

From Dev

Is there a way to update all documents by query in Elasticsearch 1.5?

From Dev

How to update multiple documents that match a query in elasticsearch

From Dev

Elasticsearch DSL : Multiple aggregations

From Dev

Elasticsearch DSL: Aggregation

From Dev

NPE while executing Update By Query in Elasticsearch using Java

From Dev

Select document field with parameter in elasticsearch update by query API

Related Related

  1. 1

    Elasticsearch DSL query with specific Output

  2. 2

    Mix DSL and URI query in Elasticsearch

  3. 3

    Range or missing - ElasticSearch - Query DSL

  4. 4

    Confusions about the Elasticsearch json dsl query structure

  5. 5

    Elasticsearch DSL query from an SQL statement

  6. 6

    elasticsearch-dsl-py query formation

  7. 7

    Django-Elasticsearch-DSL Nested Range Query

  8. 8

    How to rewrite ElasticSearch DSL query with the Java API

  9. 9

    Using Elasticsearch DSL Query with Hadoop Mapreduce

  10. 10

    Using elasticsearch dsl query with multiple indices

  11. 11

    Mapping logical queries to elasticsearch query DSL

  12. 12

    How to write java code for elasticsearch DSL query

  13. 13

    Query DSL elasticsearch doesn't work

  14. 14

    Exclude term in elasticsearch_dsl filter query

  15. 15

    Elasticsearch DSL query - Get all matching results

  16. 16

    Update a field of document using DSL query

  17. 17

    Update By Query in Elasticsearch using Java

  18. 18

    Update By Query in Elasticsearch using Java

  19. 19

    What is the difference between must and filter in Query DSL in elasticsearch?

  20. 20

    how to log or print python elasticsearch-dsl query that gets invoked

  21. 21

    Elasticsearch DSL with multiple multi_match query in ruby

  22. 22

    how to find the nearest / closest number using Query DSL in elasticsearch

  23. 23

    Can i change below mysql query into elasticsearch dsl?

  24. 24

    Is there a way to update all documents by query in Elasticsearch 1.5?

  25. 25

    How to update multiple documents that match a query in elasticsearch

  26. 26

    Elasticsearch DSL : Multiple aggregations

  27. 27

    Elasticsearch DSL: Aggregation

  28. 28

    NPE while executing Update By Query in Elasticsearch using Java

  29. 29

    Select document field with parameter in elasticsearch update by query API

HotTag

Archive