Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add has_parent filter #2243

Closed
martijnvg opened this issue Sep 12, 2012 · 1 comment
Closed

Add has_parent filter #2243

martijnvg opened this issue Sep 12, 2012 · 1 comment

Comments

@martijnvg
Copy link
Member

The has_parent filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest has_parent filter has the same options and works in the same manner as the has_child filter.

This is an experimental filter.

Filter example

{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}  

The parent_type field name can also be abbreviated to type.

Memory considerations

With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue #792

martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Sep 13, 2012
The `has_parent` filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest `has_parent` filter has the same options and works in the same manner as the `has_child` filter.

This is an experimental filter.

Filter example
###################
```
{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}
```
The `parent_type` field name can also be abbreviated to `type`.

Memory considerations
###############
With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue elastic#792
martijnvg added a commit that referenced this issue Sep 13, 2012
The `has_parent` filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest `has_parent` filter has the same options and works in the same manner as the `has_child` filter.

This is an experimental filter.

Filter example
###################
```
{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}
```
The `parent_type` field name can also be abbreviated to `type`.

Memory considerations
###############
With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue #792
martijnvg added a commit that referenced this issue Sep 13, 2012
The `has_parent` filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest `has_parent` filter has the same options and works in the same manner as the `has_child` filter.

This is an experimental filter.

Filter example
###################
```
{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}
```
The `parent_type` field name can also be abbreviated to `type`.

Memory considerations
###############
With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue #792
@kimchy
Copy link
Member

kimchy commented Sep 13, 2012

Pushed.

@kimchy kimchy closed this as completed Sep 13, 2012
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
The `has_parent` filter accepts a query and a parent type. The query is executed in the parent document space, which is specified by the parent type. This filter return child documents which associated parents have matched. For the rest `has_parent` filter has the same options and works in the same manner as the `has_child` filter.

This is an experimental filter.

Filter example
###################
```
{
    "has_parent" : {
        "parent_type" : "blog"
        "query" : {
            "term" : {
                "tag" : "something"
            }
        }
    }
}
```
The `parent_type` field name can also be abbreviated to `type`.

Memory considerations
###############
With the current implementation, all _id values are loaded to memory (heap) in order to support fast lookups, so make sure there is enough mem for it.

This issue originates from issue elastic#792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants