The Setting Namespace Field
The Setting Namespace Field
System configuration settings in Elastic Path are identified by a path-like structure. For example, the store theme setting is identified by COMMERCE/STORE/theme. The path-like structure is intended to allow hierarchical setting definitions. Note that this is a purely logical organization and does not represent how settings are physically stored; settings are stored in a single, non-hierarchical relation in the database.
To query for a setting by its path, use the Namespacefield. The following query matches the COMMERCE/STORE/theme setting:
FIND Configuration WHERE Namespace = 'COMMERCE/STORE/theme'
You can also specify partial paths. To match all settings that begin with a particular path, you must specify the path up to and including the slash character.
For example, the following query matches all settings whose path begins with COMMERCE/STORE:
FIND Configuration WHERE Namespace = 'COMMERCE/STORE/'
In this case, there are 17 settings that match this partial path.
For a more refined search, you can use the % character in the last part of the path. The following query matches all settings immediately under COMMERCE/STORE that begin with the letter "s".
FIND Configuration WHERE Namespace = 'COMMERCE/STORE/s%'
This matches the two immediate children of COMMERCE/STORE that begin with "s": COMMERCE/STORE/storefrontUrl and COMMERCE/STORE/seoEnabled.