New issue 11 by klokie: Would be nice to be able to filter the data before
it is sent to the API
http://code.google.com/p/freebase-suggest/issues/detail?id=11
Hi, there doesn't seem to be an easy way to intercept the form input before
it is sent to the public API. It would be great if I could, for example,
return false from the "fb-textchange" event handler in order to prevent the
autocompletion event from occurring. For example, if the form input is a
URL or URN I probably don't want to submit it to FreeBase since I'm
virtually guaranteed an empty result set.
I'd prefer not to "destroy" the instance since that would also require
unbinding multiple event handlers, and then recreating the instance and
rebinding them when the field changes again.
Thanks
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
That sounds useful, but note there is at least one case where URLs are
valid/useful
input - when they represent Freebase topics. Then it's basically an
alternate form of
the ID which is easier to cut & paste in some circumstances.
tfmorris is right, freebase suggest service recognizes freebase topic URLs
and it's possible it will support other
URLs as well. If I am understanding you correctly, you basically want a
hook for you to examine the input value
before letting suggest submit the query? Or if you want free form text and
NOT require the user to select
something from the suggest list, there is an option you can pass to suggest
{"soft": true}. This allows the input to
behave normally within a form field. For example in a search box, with
soft=true, you can intercept the select
event or have the user submit the free form text to your own search service.