跳转至

foundryts.search.ontology

foundryts.search.ontology(name, should_normalize=False, force_analyze=False)

Creates an Ontology property reference for search.

Use this for creating an Ontology property that you can compare values to in Search.series().

  • Parameters:
  • name (str) – Name of the Ontology property as it appears in the Ontology.
  • should_normalize (bool , optional *(*default is False )) – Whether to normalize the name of the Ontology property.
  • force_analyze (bool , optional) – (DEPRECATED) Whether to reference raw properties. (default is False).
  • Returns: The Ontology property reference that can be used in Search.series.
  • Return type: Property

:::callout{theme="success" title="See Also"} Search.series() :::

Examples

>>> from foundryts.search import ontology
>>> ontology('some-property-name')
Property['some-property-name']
>>> fts.search.series(ontology('my_prop') == 'my_value')
NodeCollection([...](1000))

中文翻译


foundryts.search.ontology

foundryts.search.ontology(name, should_normalize=False, force_analyze=False)

创建用于搜索的 Ontology(本体)属性引用。

使用此函数可创建一个 Ontology 属性,以便在 Search.series() 中与该属性的值进行比较。

  • 参数:
  • name (str) – Ontology 属性在 Ontology 中显示的名称。
  • should_normalize (bool , 可选 *(*默认值为 False )) – 是否对 Ontology 属性名称进行规范化处理。
  • force_analyze (bool , 可选) – (已弃用)是否引用原始属性。(默认值为 False)。
  • 返回值: 可在 Search.series 中使用的 Ontology 属性引用。
  • 返回类型: Property

:::callout{theme="success" title="另请参阅"} Search.series() :::

示例

>>> from foundryts.search import ontology
>>> ontology('some-property-name')
Property['some-property-name']
>>> fts.search.series(ontology('my_prop') == 'my_value')
NodeCollection([...](1000))