Search: Support partial fields that can returns partial view of the _source #1570

Closed
kimchy opened this Issue Dec 26, 2011 · 0 comments

1 participant

@kimchy
elastic member

Support partial_fields that can return a partial representation of _source based on include and exclude patterns. For example, include only data starts with obj1.obj2:

{
    "query" : {
        "match_all" : {}
    },
    "partial_fields" : {
        "partial1" : {
            "include" : "obj1.obj2.*",
        }
    }
}

And one that will also exclude obj1.obj3:

{
    "query" : {
        "match_all" : {}
    },
    "partial_fields" : {
        "partial1" : {
            "include" : "obj1.obj2.*",
            "exclude" : "obj1.obj3.*"
        }
    }
}

Both include and exclude supports multiple patterns:

{
    "query" : {
        "match_all" : {}
    },
    "partial_fields" : {
        "partial1" : {
            "include" : ["obj1.obj2.*", "obj1.obj4.*"],
            "exclude" : "obj1.obj3.*"
        }
    }
}    
@kimchy kimchy closed this in cc3f444 Dec 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment