Index and search databases
索引和搜索
myBase provides several search utilities, e.g. [Find as you type], [Search with index], [Find partial workds] and [Search with RegExp]. The first two utilities require index data for fast find and support boolean searches; while the [Find partial workds] and [Search with RegExp] are scanning-based and capable of handling regular expressions, and searching for partial words.
myBase提供了多种搜索工具,例如【输入时搜索】,【使用索引数据搜索】,【查找不完整单词】和【正则表达式搜索】。前两种搜索方式是基于索引数据的快速搜索,同时支持布尔逻辑搜索;而【查找不完整单词】和【正则表达式搜索】则是可以支持正则表达式的实时搜索,同时也可以对输入的文字和部分文字进行搜索。
Index data(索引数据)
Before you can use the [Find as you type] and [Search indexes] options, you'll need to first build/update index data. To build/update index, please select the [File - Maintenance - Update indexes] menu item.
【输入时搜索】和【使用索引数据搜索】都是基于索引数据的,所以您需要在使用前创建或更新索引。您可以通过菜单【文件 - 维护 - 更新索引】来创建或更新索引。
Find as you type(输入即时搜索)
The [Find as you type] feature helps search for a phrase as you type. Pressing F3 moves input focus into the edit box whereby you can type in a phrase to seach for.
使用输入时搜索时非常简单和方便的,只需在搜索窗口输入文字,结果就会立即列出。按F3即可把输入光标移到搜索窗口。
Index data is required, please be sure to first build or update index data.
由于【输入时搜索】是基于索引的,所以在使用前一定要先创建或更新索引。
Boolean search(布尔搜索)
Both [Find as you type] and [Advanced search] support the boolean operators (AND, OR, NOT). You can type a search phrase like this: w1 AND w2 OR w3 OR w4 NOT w5. The boolean operators (AND, OR, NOT) can be abbreviated with the equivalent characters (+, |, -) or (&, |, !). Therefore, you can also type the search phrase like this: w1 + w2 | w3 | w4 - w5.
【输入时搜索】和【高级搜索】都支持布尔运算符(AND, OR, NOT)。您输入的搜索字符串可以是w1 AND w2 OR w3 OR w4 NOT w5。对于布尔运算符(AND, OR, NOT),您可使用其缩写形式 (+, |, -) 或者(&, |, !)。所以被搜索的字符串可以写成w1 + w2 | w3 | w4 - w5。
Note that each boolean operator requires a leading space and a trailing space, otherwise it doesn't take effect.
需要注意的是每个布尔运算符后必须有一个空格,否则布尔运算符将被忽略。
Search with RegExp (Search for words or partial words)(使用正则表达式搜索字词或不完整单词)
myBase also implemented the [Use regular expression] option, which allows to search with regular expressions.
myBase在高级搜索中提供了使用正则表达式的选项。
To search with RegExp, please select the [Search - Advanced search] menu item, then enter a regular expression (only pattern string without begining/ending slashes, just like this: wj{2,}soft.com), found items (if any) will be listed in the query results window.
如需使用正则表达式搜索,需要通过菜单【搜索 - 高级搜索】,然后输入正则表达式(无需加入相应开头结尾斜杠,例如:wj{2,}soft.com)来进行搜索。
This utility scans content in the datbase, no index data required.
这种搜索方式不需要使用索引,它是根据条件范围直接实时搜索数据库的内容。
Find in text(查找)
This utility looks into the current HTML content for given text, it behaves like the 'Find' command in Windows Notepad.
这个工具用于查找当前信息条目HTML的内容,它就和Windows写字板里的“查找”功能是类似的。
To find in text content, please select the 'Edit - Find in Text ...' menu item, then type in a word/string/text to find.
您可以通过菜单【编辑 - 查找】访问这个工具,然后输入需要查找的文字。
Search by custom icons(搜索自定义图标)
The [Search - Search with custom icons ...] utility scans the current branch or whole outline tree for those info items having a given custom icon.
这个工具可通过历遍整个大纲树或当前分支获取具有指定自定义图标的节点。您可以通过执行【搜索 - 搜索自定义图标】,然后选择一个图标进行进行搜索。
This utility traverses the outline tree and looks at the custom icons for matched info items, no index data required.
此工具并不需要索引数据的支持,它会历遍所有大纲树的节点去寻找指定的自定义图标。
List all related info items(列出全部关联条目)
The [Search - List all related items ...] utility scans the item links table iteratively for those info items directly or indirectly linked with the current info item. For example, item A is linked with item B only, while item B is linked with item C and D, when you select the [Search - List all related items ...] menu item on item A, all of them (A, B, C and D) are listed out.
这个工具通过查找条目关联表而查找和当前条目直接或间接相关联的的所有条目。例如条目A只和条目B相关联,但条目B又和条目C和条目D相关联,当您对条目A执行菜单【搜索 - 列出全部关联条目】,那么所有A, B, C和D节点将被列出。
This utility looks into the item links table for matched info items, no index data required.
此工具并不需要索引数据的支持,它是通过查找条目关联表而实现。
List recently modified entries(搜索最近修改项)
The [Search - List recently modified entries ...] utility scans the whole database for those entries (info items, item contents, attachments and shortcuts) modified within a specified date period, e.g. today, this week, last week, this month, etc...
这个工具通过指定日期范围(例如:今日,今周,上周,今月等)搜索整个数据库中记录,查找符合条件的记录(包括条目,附件,快捷方式)。要搜索最近修改项,您可通过执行菜单【搜索 - 搜索最近修改项】,然后选择日期范围。
This utility traverses the outline tree and looks at timestamp of each entries, no index data required.
此工具并不需要索引数据的支持。
Search local file system(搜索本地文件系统)
The [Search - Search local file system ...] utility scans all files under a directory for given words or Regular Expressions. You can select to search file names only, or file content, or both.
这个工具使用提供的关键字或正则表达式搜索指定的磁盘目录。您可以搜索文件名字,或者文件内容或者两者都搜索。
To search with RegExp, please be sure to add a pair of slashes surrounding the RegExp pattern string, like this: /pattern/i
如使用正则表达式搜索,需加上相应开头结尾斜杠,例如:/pattern/i
If you choose to search file content, it attempts to parse each documents by utilizing the corresponding document filters installed on the system. It may take much time to parse a large number of documents under a directory, so this utility maintains an internal .nyf database to cache textual content of parsed documents, this way, later searches on the documents could get faster. The cache database is saved in the current user's home directory with the file name "Search file system.nyf", you may remove it at any time as you see fit;
如果选择搜索文件内容,软件会尝试通过安装在系统中的对应Filters来执行。因为【搜索本地文件系统】较为占用时间,所以这个工具拥有自己的nyf数据库存放文件内容的缓存,之后的搜索将会加快搜索速度。这个缓存nyf数据库被保存在用户目录中,文件名为"Search file system.nyf",用户在无需使用是可以自行删除这个文件。
Note that this utility may take quite a while to go through a whole file system, so it's recommended to restrict the search range to the folder as close as possible to the target files.
需要注意的是【搜索本地文件系统】并没有使用索引,搜索整个文件系统可能会耗费大量的时间,所以建议您尽量缩小搜索的范围到最有可能的目录。