Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Just a proof of concept to index a git repo in elastic search

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 example.rb
Octocat-spinner-32 gitelasticsearch.rb
README.md

GitElasticSearch

Just a proof of concept small library to index a git repo in elastic search

  • uses grit and tire

as per default Grit behaviour it gets the current master

Could be useful with gitlabhq

Installation

bundle install

You should have a local elastic search running.

Usage:

# Inits with a full path to a local git repository
repo_index = GitElasticSearch.new("/Users/git/repositories/gitlabhq.git")  
# Inits elastic search index       
repo_index.init!
# Indexes the repo                 
repo_index.index!

To search the code:

Tire.search repo_index.index_name do
   query do
     string 'mysearchterm'
   end             
end

You can look at example.rb

Todo

Well basically everything, but let's start with writing some tests and then different branches, adding the commit messages, make elastic search configurable and other fun stuff

Licence

BSD Copyright Ori Pekelman, AF83 2011

Something went wrong with that request. Please try again.