Searching¶
Table of Contents
Introduction¶
Fuze supports a full featured search engine. A query language, Fuze Query Language (FQL), is utilized to perform a search. FQL is described below.
How to Perform a Search¶
The search engine is invoked with the --search
Fuze option, and then FQL follows. The search output is delivered via the format specified with the --format
option.
fuze --search "<FQL>" [--format <json | csv>]
The output format must be specified. It can be specified on the command line as shown above, or it can be specified in the workspace.ini file as shown here. If the workspace.ini file specifies an output format, then --format
is optional. If --format
is specified, it will always take precedence over the workspace.ini specification.
From hereon, the --format
option will not be shown, with the assumption that the output format has been specified in the user’s workspace.ini file.
Fuze Query Language (FQL)¶
FQL is an intuitive and full featured language for searching Fuze. FQL defines the commands that must be included with the --search
option.
The basic structure of FQL is shown below.
fuze --search "< <keyword> <operator> <search_term> >"
The sections below describe the keywords, operators, and search terms in FQL.
Operators¶
The following are the supported operators in FQL (note that not all operators are supported for all keywords):
¶ Operator
Operation
Comments
<
Less Than
<>
Between
Searches between the first value and second value
=
Equality
Equality requires the full value.
>
Greater Than
^
Begins With
~
Contains
¶ Symbol
Meaning
Comments
Less Than
Delimiter between operations
‘
Compound Statement
Delimiter between statements
“
Contains FQL
FQL statements are contained with “”
Keyword: fuzeid
¶
Operators:
=
Search Term: A FuzeID’s (note that the FuzeID must be the full value. Partial FuzeID searches are not supported)
Return: All metadata associated with the FuzeID(s)
Keyword: product
¶
Operators:
= <> ^ ~ > <
Search Term: 1 or more text snippets
Return: Set of FuzeIDs
Keyword: type
¶
Presently only the “build” type is supported
Operators:
= <> ^ ~ > <
Search Term: “type” is one or more of:
build
Return: Set of FuzeIDs
Keyword: username
¶
Operators:
= <> ^ ~ > <
Search Term: 1 or more text snippets
Return: Set of FuzeIDs
Keyword: date
¶
Operators:
= <> ^ ~ > <
Search Term: Date in format: YYYY/MM/DD
Return: Set of FuzeIDs
Keyword: version
¶
Operators:
= <> ^ ~ > <
Search Term: 1 or more text snippets
Return: Set of FuzeIDs
Keyword: commitid
¶
Operators:
= ^ ~
Search Term: 1 or more text snippets
Return: Set of FuzeIDs
Keyword: stage
¶
Operators:
= ^ ~
Search Term: 1 or more text snippets
Return: Set of FuzeIDs
Examples¶
Single FuzeID search:
fuze --search "fuzeid = 190111-131-9962"
Search for FuzeIDs that are either firmware or firmware-v3 products:
fuze --search "product ^ firmware"
Search for FuzeIDs that are released versions of products that contain the word “firmware”:
fuze --search "release ~ firmware"
Search for FuzeIDs that were created by all usernames that contain ‘lastname’:
fuze --search "username ~ lastname"
Search for FuzeIDs from the first 7 days of January 2019:
fuze --search "date <> 2019/01/01 | 2019/1/7"
Search for FuzeIDs after Jan 1, 2019:
fuze --search "date > 2019/01/01"
Compound FQL Statements¶
FQL allows you to create compound statements to further refine your search. Use the ,
delimiter to separate search terms in the FQL statement.
Examples¶
Search for FuzeIDs associated with released firmware after Jan 1, 2019
fuze --search "release = firmware, date > 2019/1/1"
Search for FuzeIDs associated with firmware builds between Jan 1, 2019 and Jan 3, 2019
fuze --search "product = firmware, date <> 2019/1/1 | 2019/1/3"
Search for FuzeIDs associated with builds by user first.last between Jan 1, 2019 and Jan 3, 2019
fuze --search "username = [email protected], date <> 2019/1/1 | 2019/1/3"
FQL Search Results¶
Results are delivered in the user-specified format. Presently, that is either json or csv. If json is specified, the results are delivered to stdout. If csv is specified, the results are in the produced csv file.