GroupDocs.Search 允许您在 PDF 文件中执行搜索,从而在 Node.js via Java 应用程序中精细化结果。
- 定义搜索索引的存储文件夹。
- 选择包含 PDF 文件的文件夹。
- 设置其他搜索参数。
- 运行搜索并分析结果。
GroupDocs.Search 允许您在 PDF 文件中执行搜索,从而在 Node.js via Java 应用程序中精细化结果。
const searchLib = require('@groupdocs/groupdocs.search')
// 指定搜索索引存储的目录
const index = new searchLib.Index("c:/MyIndex");
// 选择包含要搜索文档的文件夹
index.add("c:/MyDocuments");
// 启用同音词搜索以查找发音相似的单词
const options = new searchLib.SearchOptions();
options.setUseHomophoneSearch(true);
// 运行复杂的搜索查询
const result = index.search("metis", options);
GroupDocs.Search for Node.js via Java 提供强大的文本搜索和索引工具,支持 70 多种文档格式,便于查找和组织信息。
在多个文档类型中定位文本,包括 PDF、Word 文档、PowerPoint 演示文稿和电子表格。使用精确匹配、模糊搜索和通配符以获得精细结果。
通过创建结构化索引加快搜索速度,使从大型文档集合中检索信息更加容易。
在不同语言的文档中进行搜索,自动识别各种单词形式和键盘布局。
调整搜索选项,如区分大小写、日期过滤和单词排除,以获得精确结果。
const searchLib = require('@groupdocs/groupdocs.search')
// 设置搜索索引的目录
const index = new searchLib.Index("c:/MyIndex");
// 提供文档存储的文件路径
index.add("c:/MyDocuments");
// 输入受保护文件的密码
index.getDictionaries().getDocumentPasswords().add("protected.pdf", '123456');
// 启用模糊搜索以检测相似单词
const options = new searchLib.SearchOptions();
options.getFuzzySearch().setEnabled(true);
options.getFuzzySearch().setFuzzyAlgorithm(new searchLib.SimilarityLevel(0.8));
// 提取搜索结果
const result = index.search("Loarem", options);
// 处理并审查结果
console.log('Documents: ' + result.getDocumentCount());
console.log('Occurrences: ' + result.getOccurrenceCount());
GroupDocs.Search 支持超过 70 种文件格式,包括办公文档,确保快速和准确的搜索并支持索引。