UpdateSemanticSearchIndex

UpdateSemanticSearchIndex[index,source]

updates the SemanticSearchIndex[] index with the data in source.

UpdateSemanticSearchIndex[index,{source1, }]

updates the SemanticSearchIndex[] index with the collection of sources sourcei.

UpdateSemanticSearchIndex[index,{source1 val1, }]

associates the new source sourcei to the value vali.

更多信息和选项

  • UpdateSemanticSearchIndex 用更多数据扩展现有的 SemanticSearchIndex,扩大索引的存储和搜索能力.
  • Valid index specifications are:
  • "name"a string matching a named semantic search index
    SemanticSearchIndex[]a valid SemanticSearchIndex object
  • source 可取的值有:
  • "string"纯字符串
    File["path"]单个文件
    URL["url"]"url" 的文本表示
    CloudObject[]云对象
    LocalObject[]本地对象
    ContentObject[]a content object
    {source1,source2,}list of sources
  • If index contains annotated sources, each new source should be annotated the same way. »
  • Possible ways to specify annotations include:
  • {source1val1,}a list of sources and associated values
    {source1,}{val1,}a rule between sources and values
  • Accepted forms of annotation values vali include:
  • "string"字符串标签
    <|"tag1"v1,|>标记和元数据组成的关联
  • UpdateSemanticSearchIndex supports the following options:
  • MethodAutomatic关于方法的详细信息
    ProgressReporting$ProgressReporting是否报告计算的进度
  • 可用 Method<|opt1val1|> 给出详细选项. opti 可取的值包括:
  • "ContextPadding"minimal overlap between chunks
    "MaximumItemLength"maximum length of a text chunk
    "MinimumItemLength"minimum length of a text chunk
    "SplitPattern"Automaticwhere to split long strings
  • The automatic "SplitPattern" tries to split a source text in paragraphs, newlines and words to create chunks between "MinimumItemLength" and "MaximumItemLength".

范例

打开所有单元关闭所有单元

基本范例  (2)

创建语义搜索索引:

更新索引,包含新的源:

Update an index with multiple new sources:

范围  (6)

Data Sources  (3)

Update an index with a string:

Update an index with a file:

Update an index with a URL:

Annotations  (3)

Update an index that has labels:

Update an index with tags in an Association:

Update an index with multiple tags in an Association:

应用  (1)

Create an index with the default split pattern:

Update the index with an input that requires a different splitting technique:

属性和关系  (1)

The feature extractor used by UpdateSemanticSearchIndex is inherited from the index:

Retrieve the feature extractor:

可能存在的问题  (1)

Create an index with labels:

Attempting to update the index using a source without labels will fail:

New indices must include the relevant metadata:

Wolfram Research (2024),UpdateSemanticSearchIndex,Wolfram 语言函数,https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html (更新于 2025 年).

文本

Wolfram Research (2024),UpdateSemanticSearchIndex,Wolfram 语言函数,https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html (更新于 2025 年).

CMS

Wolfram 语言. 2024. "UpdateSemanticSearchIndex." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2025. https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html.

APA

Wolfram 语言. (2024). UpdateSemanticSearchIndex. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html 年

BibTeX

@misc{reference.wolfram_2025_updatesemanticsearchindex, author="Wolfram Research", title="{UpdateSemanticSearchIndex}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html}", note=[Accessed: 25-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_updatesemanticsearchindex, organization={Wolfram Research}, title={UpdateSemanticSearchIndex}, year={2025}, url={https://reference.wolfram.com/language/ref/UpdateSemanticSearchIndex.html}, note=[Accessed: 25-March-2025 ]}