diff options
| author | nitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-06-30 23:19:17 +0000 |
|---|---|---|
| committer | nitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-06-30 23:19:17 +0000 |
| commit | 8e71e49ea3708c30a4a0d3688cc9d643665d68be (patch) | |
| tree | 256849950bfeec52b6d1f651c1657d3f8cb49cd7 /freebase | |
| parent | 41af1e746bee2881bdde17ca919eb64a25a94c02 (diff) | |
tyler's patch for fcl search
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@155 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'freebase')
| -rwxr-xr-x | freebase/fcl/commands.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/freebase/fcl/commands.py b/freebase/fcl/commands.py index 0fdc283..4b517ec 100755 --- a/freebase/fcl/commands.py +++ b/freebase/fcl/commands.py @@ -686,3 +686,14 @@ def cmd_log(fb, id): print simplejson.dumps(link, indent=2) + +def cmd_search(fb, what): + """Search freebase for "query" and print out 10 matching ids + + %prog search "some query" + """ + + r = fb.mss.search(what, format="ids", limit=10) + for id in r: + print id + |
