indexing - 站点核心内容搜索中的搜索索引刷新和搜索索引重建有什么区别
问题描述
谁能告诉我两者之间的区别我可以看到执行时间方面的区别,但我想要从功能角度来看的区别。
void Rebuild();
void Rebuild(IndexingOptions indexingOptions);
Task RebuildAsync(IndexingOptions indexingOptions, CancellationToken cancellationToken);
void Refresh();
void Refresh(IIndexable indexableStartingPoint, IndexingOptions indexingOptions);
void Refresh(IIndexable indexableStartingPoint);
Task RefreshAsync(IIndexable indexableStartingPoint, IndexingOptions indexingOptions, CancellationToken cancellationToken);
void Update(IEnumerable<IndexableInfo> indexableInfo);
void Update(IEnumerable<IIndexableUniqueId> indexableUniqueIds);
void Update(IEnumerable<IIndexableUniqueId> indexableUniqueIds, IndexingOptions indexingOptions);
void Update(IIndexableUniqueId indexableUniqueId);
void Update(IIndexableUniqueId indexableUniqueId, IndexingOptions indexingOptions);
解决方案
重建:如果您进行了任何更改,例如...更改 schema.xml。更改就像您添加了一个字段并更改了一个字段的字段类型。在这种情况下,您需要重建索引以反映更改。
刷新:如果您想添加更多或更新现有索引的数据。你会刷新它。例如:您使用了 Solr 的 DIH 功能并索引了一个数据库。如果数据库的数据被添加或修改值,需要在 Solr 索引中刷新。您将在此处通过调用 Solr 的 Delta 导入来使用刷新。
更新:您可以通过传递文档的唯一 ID 来指定要更新的文档以及要更新的所有字段,以防您需要更新任何特定字段。
注意:我没有使用上面的 api。我建议您阅读 api 文档并阅读有关特定 api 的更多信息。
推荐阅读
- python - 使用 cv2.imshow 显示 np.int32 的 numpy 数组
- python - 将 Python 文件作为可执行文件运行与从命令行运行之间的区别?
- javascript - 从 POST 路由更新文本文件 - nodejs
- c++ - 尝试在 usr/local/include 中桥接 yices 库时,Pybind11 中的分段错误
- regex - greedy-but-not-too-greedy regex:需要排除最后出现的可选字符
- python - Django 表单:在 clean() 中访问cleaned_data - 不起作用?
- git - Unity - Git LFS - 新存储库上的“此存储库超出其数据配额”
- mysql - 'myname'@'%' 可以远程访问 mysql 服务器,但不能使用 'myname'@'123.456.489.%'
- f# - 如何从 F# 中的另一个可区分联合初始化一个可区分联合?
- javascript - 将数组转换为 Set 的时间复杂度 (Big-O)