views:

79

answers:

1

Is it possible to dynamically add an mql_filter to constrain results from a Freebase Suggest control?

$(function() {
    $("#button").onclick(function() {
        // add an mql_filter to #film, a Freebase Suggest control
    });

    $("#film").suggest({type:'/film/film'});
});
A: 

You can reinvoke suggest with a different mql_filter:

$(function() {
    $("#button").onclick(function() {
        // add an mql_filter to #film, a Freebase Suggest control
        $("film").suggest({type:'/film/film', 
                           mql_filter: ...});

    });

    $("#film").suggest({type:'/film/film'});
});
daepark
Thanks for the answer! I haven't been able to test it yet because mql_filter is not working for me, even their basic example at http://www.freebase.com/docs/suggest. I posted a question to them and will let you know ASAP.
Wraith
Did you ever get this to work?
Will Moffat