I have made a small but significant change to the Freebase Search Plugin I was working on a while ago. I have moved the suggest script over to Google App Engine and should perform a little faster and will be more reliable in the long term (as long as Google does not start charging me exorbitant fees to run the script). It is my first foray into the world of Python, so please forgive me for any petty bugs that might exist in the code.
The script uses the Freebase Python Client API with some modifications. I added an additional method that utilises the Freebase search API. I'll be happy to share with anyone interested in the changes I have made. Just drop me a comment.
Meanwhile, try out the plugin and let me know what you think. Better still, contribute to the social knowledge base and make this an even more useful tool for everyone.
Hi, I noticed that the suggestions don't always fire, not 100% sure how to reproduce the problem but it seems to happen when I type a whole word quickly.
ReplyDeleteHi Will,
ReplyDeleteThanks for the feedback. Yeah, I have noticed this issue since the previous version (suggestions and search functions were scripted in PHP and hosted on my personal website). I thought it might go away with the new script and app hosting, but it hasn't. I'm still trying to figure it out.
I suspect it has to do with the speed at which the results are returned. By the time a search is completed, the search term in the search box differs from the JSON output from the suggestion script.
There was a small issue with the search plugin xml file. Please reinstall the plugin.
ReplyDeleteHowever, I don't think the delayed (sometimes none) suggestions issue is unrelated. I am starting to think that this has to do with the rate a Freebase query result is returned.
Let me try to explain with a simple example. Suppose you were searching the term "Freebase". While you are typing, the search plugin fires the suggestion url and the server-side script then talks to Freebase and performs a search. However, a partial term "Free" would yield more results than something probably more specific like "Freeba". Hence, the latter query result is returned first, followed by the preceding query. Both results are returned to your browser, but the earlier query becomes the last result returned. Unfortunately the query term "Free" no longer matches what was last typed "Freeba". This prevents Firefox from rendering the results correctly.
Does this sound plausible?
Sweet. No problems with the auto-suggest.
ReplyDeleteI tried to get freebase-python playing nicely with GAE a while back, and had trouble with the urlfetch() method.
Please do let me know if you'd like to share your modified client code.
Here you go stan, please refer to this post. And thanks for your feedback.
ReplyDelete