Page MenuHomePhabricator

Feature Request: full text search of repositories
Closed, ResolvedPublic

Description

Just wanted to get a feel for what is involved in adding the ability to perform full text searches of repositories.

There does appear to be some classes in place for elastic search integration, so I guess that is a potentially viable (and powerful) solution?
The more basic approach would be to use 'hg grep' (or equivalent), which would most likely be slower and more limited but probably easier to implement.

Thoughts?

Event Timeline

kbrownlees updated the task description. (Show Details)Nov 7 2013, 3:36 PM
kbrownlees added a project: Diffusion.
kbrownlees added a subscriber: kbrownlees.
kbrownlees created this task.
kbrownlees raised the priority of this task from to Needs Triage.

This is supported in Git (it just uses git grep). It should be straightforward to extend the implementation to use hg grep for Mercurial. In theory, I suppose we could use plain old grep in SVN, maybe with some massaging to skip .svn directories.

{T2520} (approximately) discusses a more sophisticated solution, where we'd actually build some kind of in-memory index and be able to serve requests more correctly and/or more quickly than via grep. This is probably a long way away, since none of the infrastructure we ship with is really practical for large code bases (ElasticSearch might be, but I don't have much experience with that).

Actually, this already works for Mercurial too. Click "Show Search" on any browse view:

Maybe we should put that panel on the repositroy home page, too, although it's pretty busy already.

(I assume you don't need an SVN version?)

kbrownlees closed this task as Resolved.Nov 7 2013, 4:35 PM
kbrownlees claimed this task.

Awesome, turns out I need to look harder for things!

We do use SVN but I don't think anyone who uses it really cares for this feature.

Thank you again

No problem, let us know if anything else comes up.