Searching entries

Grigori Fursin edited this page Jun 5, 2018 · 5 revisions

[ Home ]

Table of Contents

Searching by repo,module or data UOA

It is possible to list CK entries by repository, module and entry alias and UID together with wildcards as follows:

 $ 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 follows:

              '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

Searching by date and time of creation

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
where date is in ISO format (YYYY-MM-DDTHH-MM-SS). However, such search is slightly slower, since it loads info.json from each touched entry

It is possible to search by user-friendly name (description) using the following option (with wildcards):

  • --search_by_name
It is also possible to limit number of returned entries using the following option:
  • --limit_size

Searching by tags and basic string

It is possible to search entries via meta-description match by string or key/value pairs as follows (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"

Searching by matching part of meta

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:


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.

Web-based search demo

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

Questions and comments

You are welcome to get in touch with the CK community if you have questions or comments!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.