{"id":15442848,"url":"https://github.com/ozlerhakan/solring","last_synced_at":"2025-04-19T20:03:16.177Z","repository":{"id":46209925,"uuid":"423244421","full_name":"ozlerhakan/solring","owner":"ozlerhakan","description":"🔍 A tiny Solr import tool to save records of custom queries from Solr to local storage","archived":false,"fork":false,"pushed_at":"2021-11-06T17:26:47.000Z","size":8,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-18T13:16:21.864Z","etag":null,"topics":["converter","import","python","python3","solr","solr-client","solr-search","solrcloud","tool","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozlerhakan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-31T19:41:35.000Z","updated_at":"2023-03-04T06:13:37.000Z","dependencies_parsed_at":"2022-09-19T10:10:51.933Z","dependency_job_id":null,"html_url":"https://github.com/ozlerhakan/solring","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fsolring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fsolring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fsolring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozlerhakan%2Fsolring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozlerhakan","download_url":"https://codeload.github.com/ozlerhakan/solring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587784,"owners_count":19986628,"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":["converter","import","python","python3","solr","solr-client","solr-search","solrcloud","tool","utility"],"created_at":"2024-10-01T19:30:45.414Z","updated_at":"2025-03-03T00:32:15.043Z","avatar_url":"https://github.com/ozlerhakan.png","language":"Python","readme":"# Solring\n\nSolring is an easy-to-use import tool from solr to local storage. By supporting various options we can create custom\nqueries and save from a running Solr server to a file.\n\n## How it works\n\n```\n$ pip install solring==0.0.2\n\n$ solring --help  \nusage: Solring.py [-h] [--version] --url URL [--output OUTPUT]\n                  [--save_format {csv,txt}] --core CORE [--rows ROWS] [-fl FL]\n                  [-q Q] [-fq FQ] [--score] [--qt QT]\n                  {group} ...\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --version             show program's version number and exit\n  --url URL, -u URL     The host:port of the running solr.\n  --output OUTPUT, -o OUTPUT\n                        Output file name.\n  --save_format {csv,txt}, -sf {csv,txt}\n                        File type of saved records. Default is txt.\n  --core CORE, -c CORE  The core/collection in solr.\n  --rows ROWS, -r ROWS  The number of row numbers returned. By default, Solr\n                        returns 5 batches at a time to save records.\n  -fl FL                Field list to retrieve. By default, Solr returns the\n                        id field.\n  -q Q                  Search query. By default, Solr returns all records.\n  -fq FQ                Filter queries.\n  --score               Learn score of each record in a score field.\n  --qt QT               solr request handle to query on, default is '/select'.\n\ngroup command:\n  {group}               group help\n```\n\nThe group command parameters:\n\n```\n$ solring group --help\nusage: Solring.py group [-h] --group_fl GROUP_FL --group_agg\n                        {mean,min,max,count} --group_column GROUP_COLUMN\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --group_fl GROUP_FL   The field(s) we want to use to group by.\n  --group_agg {mean,min,max,count}\n                        Aggregation functions to use in group by. Default is\n                        count.\n  --group_column GROUP_COLUMN\n                        The field(s) where we want to aggregate.\n```\n\nCreate a custom query where the query we search for is 'boat', we have two filter queries, and we only need to know\ntheir ids and titles as follows:\n\n```\nsolring --url http://127.0.0.1:8983\\ \n -c boats \\\n -fq \"cabin:[6 TO *]\" \\\n -fq harbors:marmaris \\\n -q boat \\\n -fl id,title,boat_size,group_id\n\n$ ls \noutput.txt\n```\n\nLet's now aggregate the above request with group options. We can learn the min and max of boats_size of each group:\n\n```\nsolring --url http://127.0.0.1:8983\\ \n -c boats \\\n -fq \"cabin:[6 TO *]\" \\\n -fq harbors:marmaris \\\n -q boat \\\n -r 100 \\\n -fl id,title,boat_size,group_id \\\n -o groupby_boats \\\n group --group_agg min --group_agg max --group_column boat_size --group_fl group_id\n\n$ ls æ\ngroupby_boats.txt\n```\n## LICENSE\n\nMIT\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozlerhakan%2Fsolring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozlerhakan%2Fsolring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozlerhakan%2Fsolring/lists"}