-
Notifications
You must be signed in to change notification settings - Fork 0
Searching entries
[ Home ]
It is possible to list CK entries by repository, module and entry alias and UID together with wildcards as following:
$ ck list (repo_uoa):(module_uoa):(data_uoa)
For example, it is possible to list all shared benchmarks via
$ ck pull repo:ctuning-programs $ ck list program $ ck list program:*susan*
The same function can be invoked from the modules as following:
r=ck.access({'action':'list', 'repo_uoa':UOA or wildcard, 'module_uoa':UOA or wildcard, 'data_uoa':UOA or wildcard}) if r['return']>0: return r lst=r['lst'] # List of entries in a special format import json # Print list ck.out(json.dumps(lst, indent=2)) # to understand its structure
It is also possible to list entries when the following constraints are met using the following options:
- --add_if_date_before - add only entries with date before this date
- --add_if_date_after - add only entries with date after this date
- --add_if_date - add only entries with this date
It is possible to search by user-friendly name (description) using the following option (with wildcards):
- --search_by_name
- --limit_size
It is possible to search entries via meta-description match by string or key/value pairs as following (note that it is slow because meta.json of each entry is loaded, unless you use ElasticSearch indexing for CK):
$ ck search (repo_uoa):(module_uoa):(data_uoa) tags="tags separated by comma" search_string="regular expression"
More complex search should be performed using dictionary in special format:
$ ck search program: @input.json
where input.json file contains search_dict dictionary to be matched:
{ "search_dict":{ "program_name":"caffe" } }
See all CK search function API via:
$ ck search --help
Such search can be very slow since it involves loading meta-description for each entry and recursive search through each key/value pair for each local repository.
You can find CK-powered search demo in the live CK repository.
You can also try it on your machine via
$ ck pull repo:ck-web $ ck start web $ firefox http://localhost:3344
CK development is coordinated by the non-profit cTuning foundation and dividiti