Skip to content
This repository

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

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

1 participant

Shay Banon
Shay Banon
Owner

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.*"
        }
    }
}    
Shay Banon kimchy closed this in cc3f444 December 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.