SearchIndex

AMD: require(["geoscene/rest/knowledgeGraph/SearchIndex"], (SearchIndex) => { /* code goes here */ });
ESM: import SearchIndex from "@geoscene/core/rest/knowledgeGraph/SearchIndex.js";
类: geoscene/rest/knowledgeGraph/SearchIndex
继承于:SearchIndex Accessor
起始版本:GeoScene Maps SDK for JavaScript 4.26
beta

KnowledgeGraph 定义搜索索引。

示例
//structure of a search index in a knowledge graph data model.
{
	"analizers": [
		{
			"name": "text_en"
		}
	],
	"name": "geoscene__search_idx",
	"searchProperties": [
		{
			"key": "Supplier",
			"value": {
				"propertyNames": [
					"name",
					"EmployeeCount",
					"globalid"
				]
			}
		},
		{
			"key": "buys_part",
			"value": {
				"propertyNames": [
					"quantity",
					"globalid"
				]
			}
		},
		{
			"key": "Part",
			"value": {
				"propertyNames": [
					"name",
					"globalid"
				]
			}
		}
	],
	"supportedCategory": "Both"
}

属性概述

所有属性都可以设置、获取和监听。请参阅使用属性主题。
显示继承属性 隐藏继承属性
名称 类型 描述
Object[]

用于搜索期间字符串处理的附加分析器,例如对语言的支持。

更多详情
SearchIndex
String

类的名称。

更多详情
Accessor
String

搜索索引的名称。

更多详情
SearchIndex
Object[]

搜索索引中包含的命名类型及其属性的映射。

更多详情
SearchIndex
String

指定索引是否支持搜索实体、关系或两者。

更多详情
SearchIndex

属性详细信息

analyzers Object[]readonly

用于搜索期间字符串处理的附加分析器,例如对语言的支持。

属性
name String

分析器的名称。

declaredClass Stringreadonly inherited

类的名称。声明的类名称格式化为 geoscene.folder.className

name Stringreadonly

搜索索引的名称。

searchProperties Object[]readonly

搜索索引中包含的命名类型及其属性的映射。

属性
propertyNames String[]

搜索索引中包含的命名类型的属性。

supportedCategory Stringreadonly

指定索引是否支持搜索实体、关系或两者。

可能值"geosceneTypeEntity"|"geosceneTypeRelationship"|"geosceneTypeBoth"

方法概述

显示继承的方法 隐藏继承的方法
名称 返回值类值 描述

添加一个或多个与对象生命周期相关联的句柄

更多详情
Accessor
Boolean

如果存在指定的句柄组,则返回 true。

更多详情
Accessor

移除对象拥有的句柄组。

更多详情
Accessor

方法详细说明

addHandles(handleOrHandles, groupKey)inherited

添加一个或多个与对象的生命周期相关联的句柄。当对象被销毁时,将移除句柄。

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
参数
handleOrHandles WatchHandle|WatchHandle[]

对象销毁后,标记为要移除的句柄。

groupKey *
optional

标识句柄应添加到的组的键。组中的所有句柄稍后都可使用 Accessor.removeHandles() 进行删除。如果未提供键,则句柄将被添加到默认组。

hasHandles(groupKey){Boolean}inherited

如果存在指定的句柄组,则返回 true。

参数
groupKey *
optional

组键。

返回
类型 描述
Boolean 如果存在指定的句柄组,则返回 true
示例
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}
removeHandles(groupKey)inherited

移除对象拥有的句柄组。

参数
groupKey *
optional

要移除的组键或组键的数组或集合。

示例
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

您的浏览器不再受支持。请升级您的浏览器以获得最佳体验。