Unable to delete child documents by query that uses "has parent" (ES 1.4.1)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to delete child documents by query that uses "has parent" (ES 1.4.1)

Ron Sher
Hi,

I'm using the query below in my search to find all users without parents.
The search works as expected, but delete by query fails with has_parent] query and filter unsupported in delete_by_query api

I've searched and it seems that it should be supported.

Anything that I'm missing?

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "user.service_id": "12345"
          }
        },
        {
          "filtered": {
            "filter": {
              "not": {
                "filter": {
                  "has_parent": {
                    "query": {
                      "match_all": {}
                    },
                    "parent_type": "account"
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d57b6443-1221-4109-a654-1a36c3b05d70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to delete child documents by query that uses "has parent" (ES 1.4.1)

Nikolas Everett
You should try posting this on https://discuss.elastic.co/ . This email list has been deprecated in favor of using that. There are settings that make it function almost the same way the mailing list functioned.

On Thu, Aug 27, 2015 at 3:39 AM, Ron Sher <[hidden email]> wrote:
Hi,

I'm using the query below in my search to find all users without parents.
The search works as expected, but delete by query fails with has_parent] query and filter unsupported in delete_by_query api

I've searched and it seems that it should be supported.

Anything that I'm missing?

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "user.service_id": "12345"
          }
        },
        {
          "filtered": {
            "filter": {
              "not": {
                "filter": {
                  "has_parent": {
                    "query": {
                      "match_all": {}
                    },
                    "parent_type": "account"
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d57b6443-1221-4109-a654-1a36c3b05d70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd19UzYzgsXYhccTcZiDKje5aRRwq6vDpiB_DXSGe71zNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to delete child documents by query that uses "has parent" (ES 1.4.1)

Ron Sher

On Thu, Aug 27, 2015 at 4:25 PM, Nikolas Everett <[hidden email]> wrote:
You should try posting this on https://discuss.elastic.co/ . This email list has been deprecated in favor of using that. There are settings that make it function almost the same way the mailing list functioned.

On Thu, Aug 27, 2015 at 3:39 AM, Ron Sher <[hidden email]> wrote:
Hi,

I'm using the query below in my search to find all users without parents.
The search works as expected, but delete by query fails with has_parent] query and filter unsupported in delete_by_query api

I've searched and it seems that it should be supported.

Anything that I'm missing?

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "user.service_id": "12345"
          }
        },
        {
          "filtered": {
            "filter": {
              "not": {
                "filter": {
                  "has_parent": {
                    "query": {
                      "match_all": {}
                    },
                    "parent_type": "account"
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d57b6443-1221-4109-a654-1a36c3b05d70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/f3FhMBZ1U1Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd19UzYzgsXYhccTcZiDKje5aRRwq6vDpiB_DXSGe71zNQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKHuyJqNnbus7orqLaJNZ5eQb7aeeppX95OodFGdsZeN-ofTdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.