Field Types
The Item Filters and Content Filters that are available in the Model Manager search tools can be categorized based on the types of fields that they match on. These field types affect, for example, how the search words specified in a Full Text Search or the field values specified in filters are interpreted when searching the database.
Text Field
A filter on a text field matches search words in a text. Individual “words” in the text are obtained by splitting on spaces, punctuation markers, and other delimiter characters. Examples of text fields are the title and description of a model or file version.
Keyword Field
A filter on a keyword field matches a search word against a string value. Keyword fields are typically found for short, name-like, search data, such as the filename of a model version.
To include spaces in a keyword field’s value, precede each space using a backslash character — see Escaping Reserved Characters.
If you omit the backslash character before a space in the value for a keyword field, the value will be interpreted as two words combined with Boolean AND-logic — see Basic Field Expressions. The search word electrical heating busbar.mph for a filename field is equivalent to electrical AND heating AND busbar.mph — an expression that can never match the filename of a model (a model can have at most one filename). Write electrical\ heating\ busbar.mph instead.
Date Field
A filter on a date field matches against a date and time value. You can specify the date and time format according to the localization rules for the language set in the COMSOL Desktop or according to the ISO-8601 standard format. An example of a date field is the saved date of a model or file version.
Dates and times can either be matched exactly or as an interval. The intervals can be open on one or both sides. See also Range Matching. You can also specify intervals from a select set of date shorthands. This includes, for example, TODAY for the current day and CURRENTWEEK for a date interval covering the current week. See Table 3-6 for the complete list.
Numeric Field
A filter on a numeric field matches on a real or complex scalar value. An example of a numeric field is the last computation time of a study, or a numerical setting or parameter value. The implicit unit used for dimensioned scalar values depends on the context.
Numeric fields can either be matched exactly or by specifying intervals for the real and imaginary parts separately. The intervals can be open on one or both sides. See also Range Matching.
File Size Field
A filter on a file size field is a variant of a real Numeric Field. It matches on a file size value expressed in bytes. An example is the total size of all Built, Computed, and Plotted Data of a model version.
The field value expression is written as a numerical value and a byte unit expression — a unit multiple based on the byte. The supported byte unit expressions are B, KB, MB, GB, and TB. These expressions are defined using the non-standardized but, in the context of computer memory, often conventional binary memory format:
MB = 10242 bytes
GB = 10243 bytes
TB = 10244 bytes
The space between the real value and the byte unit is optional, but if included, the space itself must be preceded by a backslash character — see Escaping Reserved Characters. You may also omit the byte unit expression altogether, in which case the unit is assumed to be in bytes.
Filters on file sizes are typically most useful as ranges. To help with this, the Model Manager search tools will automatically apply transformation rules to such field expression values: A field expression value that is not written as a range will be automatically converted into a range, while a numerical value inside a range will either be suitably decreased or suitably increased depending on if it is a lower bound or an upper bound. These transformation rules align with the rounding rules applied when file sizes are shown in the Model Manager workspace — rounding rules that are typically also found in the system explorers of various operating systems:
These rounding rules imply, for example, that file size values between 1025 bytes and 2048 bytes are all shown as 2 KB in the Model Manager workspace. To match on all item versions shown with these sizes, Model Manager will thus automatically transform the filter expression @fileSize:2KB to @fileSize:[1025 TO 2048]. These rounding rules also guarantee that you will disjointly cover the entire range up to say 4 KB using first @fileSize:[0 TO 2KB] and then @fileSize:[3KB TO 4KB], that is as long as you use the same number of decimal places and the same unit for the upper bound of the first interval and the lower bound of the second interval when splitting an interval into two.
To avoid Model Manager applying any transformation rules, write your field expression value using the B byte unit expression or, equivalently, leave out the byte unit expression altogether.
Boolean Field
A filter on a Boolean field matches on either true or false. An example is whether or not a 1D or 2D component is axisymmetric.
Selection Field
A filter on a selection field is a specialized filter that involves selecting values from a predetermined set. Examples include Item Save Types of models or the user that saved a model or file version.