命令行全文索引? [英] Command-line fulltext indexing?

查看:197
本文介绍了命令行全文索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个巨大的,老的,可怕的代码库,使得几乎不可能找到的东西,当你需要它。我们正在努力改进它,肯定...但我经常发现自己做大量递归greps搜索文件的内容,以找到使用的地方。



有没有一个工具,我可以用来构建文本文件的目录中的全文索引,然后从命令行查询?



希望可以运行的东西用户空间,并且不需要守护程序。我们在开发服务器上有很多用户,所以我想要的东西,我可以搜索通过我的代码库的实例。

解决方案

是gid(akaid-utils)的大粉丝:





使用简单:


  1. 使用您喜爱的软件包管理器安装id-utils (例如sudo apt-get install或yum)


  2. cd到源目录的根目录并运行mkid >


  3. 您也可以从命令行使用它。

  4. 或任何其他工具。



We have a huge, old, horrible codebase that makes it nearly impossible to find things when you need it. We're working on improving it, sure... but I often find myself doing massive recursive greps to search through the contents of files to find where things are used.

Is there a tool I can use to build a fulltext index of text files in a directory and then query that from the command-line?

Prefer something that can be run in user-space and doesn't need a daemon. We have many users on our dev server, so I want something that I can search through my instance of the codebase.

解决方案

I'm a big fan of "gid" (aka "id-utils"):

Usage is simple:

  1. Install id-utils with your favorite package manager (e.g. "sudo apt-get install" or "yum")

  2. "cd" to the root of a source directory and run "mkid"

  3. You can use it from the command line

  4. You can also use it from "vim" or any number of other tools.

这篇关于命令行全文索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆