Search syntax(搜索语法)¶
Object Explorer supports search across all objects and their properties. To help you find what you need, this page describes search syntax for the global search bar.
Quotation marks¶
By default, individual words entered into the search bar will be searched for independently of each other. For example, searching yellow cab will return all objects with property values that match either yellow or cab.
This behavior can be altered using quotation marks. Searching Object Explorer for "yellow cab" will return all objects that have the exact phrase yellow cab in one or more property values. Searching for phrases like this will typically yield fewer results than searching for individual words.
Logical operators (not/and/or)¶
The operators NOT, AND, and OR can be used to enhance text search in Object Explorer.
Join operators¶
Use AND and OR as join operators to compound two different search criteria. Specifically, you can use AND to search for an item that satisfies both criteria, while OR searches for those that satisfy at least one criterion. For example, to search for taxi rides that involve both Manhattan and Brooklyn, you can search for Manhattan AND Brooklyn. Similarly, to search for taxi rides that involve either Manhattan or Brooklyn, search for Manhattan OR Brooklyn.
Negation operators¶
Unlike the join operators applied to multiple criteria at once (such as dogs AND cats or vanilla OR chocolate), the NOT operator applies to a single criteria to search for elements that do not satisfy the criteria.
For example, if you search for NOT Brooklyn, then Object Explorer returns results for all searches except those that mention Brooklyn. The NOT operator can also be applied to compounded criteria. Alternatively, searching for NOT (Manhattan OR Brooklyn) returns all search results except those that mention Brooklyn or Manhattan.
Combining operators¶
Phrases created using quotation marks can also be incorporated into a search. For example, "yellow cab" AND Manhattan is a valid expression.
Logical operators can also be structured into more complex expressions using parentheses. For example, this search returns objects which do not reference Manhattan but do reference either yellow or green cabs: ("yellow cab" OR "green cab") AND (NOT Manhattan).
Wildcards¶
?: A question mark can be used to replace a single character- Searching for
qu?ckwould return results forquick,quack,qu4ck, and so on *: An asterisk can be used to replace zero or more characters- Searching for
bro*would return results forbro,brother,broadcasting, and so on - Leading wildcards are also supported: searching for
*smithwould return results forsmith,Goldsmith,Blacksmith, and so on. Leading wildcards require the Enable leading wildcards render hint to be enabled on the string property in the Ontology Manager. For more information, see Render hints.
:::callout{theme="neutral"}
Combined leading-and-trailing wildcards (*term*) are not supported. You can use either a leading wildcard (*term) or a trailing wildcard (term*), but not both at the same time. If you need to perform queries of this kind, consider using an alternative tool such as Contour.
:::
For a detailed explanation of how text search works across the platform, including analyzer behavior and search capabilities in Workshop and the Functions API, see Understanding text search.
Fuzzy searching¶
Use the ~ operator at the end of a search term to perform a "fuzzy" match for similar terms and also exact matches. For example, quikc~ would return results for quick and quack.
中文翻译¶
搜索语法¶
对象浏览器(Object Explorer)支持跨所有对象及其属性进行搜索。为帮助您快速定位所需内容,本文档将介绍全局搜索栏的搜索语法。
引号¶
默认情况下,搜索栏中输入的不同单词会独立进行搜索。例如,搜索 yellow cab 将返回所有属性值匹配 yellow 或 cab 的对象。
使用引号可改变此行为。在对象浏览器中搜索 "yellow cab" 时,将返回至少一个属性值中包含精确短语 yellow cab 的所有对象。此类短语搜索通常比单个单词搜索返回的结果更少。
逻辑运算符(NOT/AND/OR)¶
NOT、AND 和 OR 运算符可用于增强对象浏览器中的文本搜索。
连接运算符¶
使用 AND 和 OR 作为连接运算符,可组合两个不同的搜索条件。具体而言,AND 用于搜索同时满足两个条件的项目,而 OR 则搜索满足至少一个条件的项目。例如,要搜索同时涉及曼哈顿(Manhattan)和布鲁克林(Brooklyn)的出租车行程,可搜索 Manhattan AND Brooklyn。同理,要搜索涉及曼哈顿或布鲁克林的出租车行程,可搜索 Manhattan OR Brooklyn。
否定运算符¶
与同时应用于多个条件的连接运算符(如 dogs AND cats 或 vanilla OR chocolate)不同,NOT 运算符仅应用于单个条件,用于搜索不满足该条件的元素。
例如,搜索 NOT Brooklyn 时,对象浏览器将返回除提及布鲁克林之外的所有搜索结果。NOT 运算符也可应用于组合条件。或者,搜索 NOT (Manhattan OR Brooklyn) 将返回除提及布鲁克林或曼哈顿之外的所有搜索结果。
组合运算符¶
使用引号创建的短语也可整合到搜索中。例如,"yellow cab" AND Manhattan 是一个有效的表达式。
逻辑运算符还可通过括号构建更复杂的表达式。例如,以下搜索将返回不提及曼哈顿但提及黄色或绿色出租车的对象:("yellow cab" OR "green cab") AND (NOT Manhattan)。
通配符¶
?:问号可用于替换单个字符- 搜索
qu?ck将返回quick、quack、qu4ck等结果 *:星号可用于替换零个或多个字符- 搜索
bro*将返回bro、brother、broadcasting等结果 - 也支持前导通配符:搜索
*smith将返回smith、Goldsmith、Blacksmith等结果。前导通配符需要在本体管理器(Ontology Manager)中为字符串属性启用启用前导通配符(Enable leading wildcards)渲染提示。更多信息请参见渲染提示。
:::callout{theme="neutral"}
不支持前后通配符组合(*term*)。您可以使用前导通配符(*term)或后导通配符(term*),但不能同时使用两者。如需执行此类查询,建议使用其他工具,例如Contour。
:::
有关平台文本搜索的详细说明(包括分析器行为以及 Workshop 和 Functions API 中的搜索功能),请参见理解文本搜索。
模糊搜索¶
在搜索词末尾使用 ~ 运算符可执行"模糊"匹配,查找相似词以及精确匹配。例如,quikc~ 将返回 quick 和 quack 的结果。