{"id":20279203,"url":"https://github.com/peterhellberg/tpb-search","last_synced_at":"2025-04-11T06:18:18.644Z","repository":{"id":24864680,"uuid":"28280230","full_name":"peterhellberg/tpb-search","owner":"peterhellberg","description":"Locally index and search database dumps from https://openbay.isohunt.to using the bleve text indexing library","archived":false,"fork":false,"pushed_at":"2015-01-01T21:50:28.000Z","size":282,"stargazers_count":49,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T06:18:11.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterhellberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-20T21:54:40.000Z","updated_at":"2023-09-08T16:53:07.000Z","dependencies_parsed_at":"2022-08-22T19:31:05.465Z","dependency_job_id":null,"html_url":"https://github.com/peterhellberg/tpb-search","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Ftpb-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Ftpb-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Ftpb-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Ftpb-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterhellberg","download_url":"https://codeload.github.com/peterhellberg/tpb-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351422,"owners_count":21089281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T13:28:50.687Z","updated_at":"2025-04-11T06:18:18.625Z","avatar_url":"https://github.com/peterhellberg.png","language":"Go","readme":"# TPB Search\n\n[![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/peterhellberg/tpb-search#license)\n\nLocally index and search database dumps from\n[The Open Bay](http://openbay.isohunt.to/) using the\n[bleve](https://github.com/couchbaselabs/bleve) text indexing library.\n\nBased on the example applications\n[beer-search](https://github.com/blevesearch/beer-search) and\n[bleve-explorer](https://github.com/blevesearch/bleve-explorer)\n\n![Search](http://assets.c7.se/skitch/TPB_Search-20141221-042424.png)\n![Prefix](http://assets.c7.se/skitch/TPB_Search_-_Prefix-20141221-055838.png)\n\n## Requirements\n\nYou need to download an [openbay-db-dump](http://openbay.isohunt.to/files/openbay-db-dump.torrent)\n\nIt should have the following format when gunzipped:\n\n```\n\"Name of the first file\"|54321|f2b2c2e4a786d3924b8922454772d784118e6421|8|music|0|0\n\"Name of the second file\"|9876|27a12d50782e1412bcdec126224da29afb23c293|1|movies|0|0\n```\n\nYou also need to install [LevelDB](https://github.com/google/leveldb)\n\n```\nbrew install leveldb\n```\n\n## Compilation\n\n```\ngit clone git@github.com:peterhellberg/tpb-search.git\ncd tpb-search\nmake deps\nmake\n```\n\n## Usage\n\n```\nUsage of ./tpb-search:\n  -b=800: batch size for indexing\n  -d=\"torrents_mini.csv.gz\": the openbay-db-dump to use\n  -h=\"localhost\": http listen host\n  -i=\"tpb.index\": index path\n  -p=1337: http listen port\n```\n\n### Building an index of the first 10000 rows in the dump:\n\n```bash\n$ GOMAXPROCS=4 make \u0026\u0026 ./tpb-search -l 10000\nrm -f tpb-search assets.go\ngo-bindata -o assets.go -prefix \"assets/\" assets/...\ngo build -tags leveldb -ldflags \"-X main.buildCommit `git rev-parse --short HEAD`\" -o tpb-search .\n2014/12/21 04:45:18 Creating new index...\n2014/12/21 04:45:18 Listening on http://localhost:1337\n2014/12/21 04:45:18 Indexing...\n2014/12/21 04:45:19 Indexed 1000 documents in 1.16s (average 1.16ms/doc)\n2014/12/21 04:45:19 Indexed 2000 documents in 1.47s (average 0.73ms/doc)\n2014/12/21 04:45:20 Indexed 3000 documents in 1.82s (average 0.61ms/doc)\n2014/12/21 04:45:20 Indexed 4000 documents in 2.50s (average 0.63ms/doc)\n2014/12/21 04:45:21 Indexed 5000 documents in 2.91s (average 0.58ms/doc)\n2014/12/21 04:45:21 Indexed 6000 documents in 3.33s (average 0.56ms/doc)\n2014/12/21 04:45:22 Indexed 7000 documents in 3.85s (average 0.55ms/doc)\n2014/12/21 04:45:22 Indexed 8000 documents in 4.79s (average 0.60ms/doc)\n2014/12/21 04:45:23 Indexed 9000 documents in 5.26s (average 0.58ms/doc)\n2014/12/21 04:45:23 Indexed 10000 documents in 5.74s (average 0.57ms/doc)\n2014/12/21 04:45:24 Finished indexing 10000 documents in 6.04s (average 0.60ms/doc)\n2014/12/21 04:45:24 Still listening on http://localhost:1337\n```\n\n## Third party packages\n\n - [bleve](https://godoc.org/github.com/blevesearch/bleve)\n - [bleve/http](https://godoc.org/github.com/blevesearch/bleve/http)\n - [gorilla/mux](https://godoc.org/github.com/gorilla/mux)\n - [levigo](github.com/jmhodges/levigo)\n\n## License\n\n*Copyright (C) 2014 Peter Hellberg*\n\n\u003e Permission is hereby granted, free of charge, to any person obtaining\n\u003e a copy of this software and associated documentation files (the \"Software\"),\n\u003e to deal in the Software without restriction, including without limitation\n\u003e the rights to use, copy, modify, merge, publish, distribute, sublicense,\n\u003e and/or sell copies of the Software, and to permit persons to whom the\n\u003e Software is furnished to do so, subject to the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included\n\u003e in all copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n\u003e OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\u003e IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\u003e DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n\u003e TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n\u003e OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Ftpb-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterhellberg%2Ftpb-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Ftpb-search/lists"}