Skip to content

Filtering

Huston Hedinger edited this page May 14, 2014 · 6 revisions

##Filtering ######edgeFilters: [array of strings|object] false
not currently implemented. Parameters passed correspond to keys and values in the GraphJSON that alchemy will use to create filters. For Example, if working with the following GraphJSON:

"edges": [
 {
            "source": 95421,
            "target": 714293,
            "label": "acted in"
        },
        {
            "source": 95421,
            "target": 95426,
            "label": "parent of"
        },
        {
            "source": 95421,
            "role": "Devlin Moran",
            "target": 603720,
            "label": "acted in"
        },...]
...}

The user would pass the following object to alchemy.conf.edgeFilters in order to create filters for the "parent of" and "acted in" edges: {caption: ["acted in", "parent of"]}

#####nodeFilters: [array of strings|object] false
not currently implemented. Parameters passed correspond to keys and values in the GraphJSON that alchemy will use to create filters. For Example, if working with the following GraphJSON:

{"nodes": [
        {
            "name": "Making Sandwiches",
            "mid": "/m/09v95qs",
            "label": "Making Sandwiches",
            "node_type": "movie",
            "genre": [
                "Short Film"
            ],
            "type": "movie",
            "id": 670298
        },
        {
            "name": "Academy Award for Actress in a Leading Role",
            "mid": "/m/0gqwc",
            "label": "Academy Award for Actress in a Leading Role",
            "node_type": "award",
            "genre": [],
            "type": "award",
            "id": 593781
        },
        {
            "name": "Religion, Inc.",
            "mid": "/m/0g5q35v",
            "label": "Religion, Inc.",
            "node_type": "movie",
            "genre": [
                "Parody",
                "Comedy"
            ],
            "type": "movie",
            "id": 778069
        },...],
...}

The user would pass the following object to alchemy.conf.nodeFilters in order to create filters for the "award" and "movie" nodes: {type: ["award", "movie"]}

#####edgesTagsFilter: [array of strings|object] false not currently implemented

#####nodesTagsFilter: [array of strings|object] false not currently implemented

Clone this wiki locally