Skip to content

arafalov/git-to-solr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-to-solr

Index git history into a Solr repository. Represents commit's content (file changed, etc) as nested documents. Tested against Solr 4.9 .

Inspired by Gary Sieling's solr-git and JGit-Cookbook.

Start Solr server by running java -Dsolr.solr.home=<project-root>/solr -jar start.jar from Solr distribution's example directory.

bin/solr create_core -c git -d ~/Projects/git-to-solr/solr/collection1/

To build the jar, you need to use Apache Maven and run mvn clean compile assembly:single at the top of the directory (where pom.xml is)

Query examples: https://localhost:8983/solr/git/select?q={!parent+which%3D%22type%3Acommit%22}diffType%3AADD&wt=json&indent=true&fl=*,[child%20parentFilter=type:commit] (decoded) https://localhost:8983/solr/git/select?q={!parent which="type:commit"}diffType:ADD&wt=json&indent=true&fl=*,[child parentFilter=type:commit]

Show commit (parents) that have ADD operations in them, include all nested children (whether they are ADD or MODIFY or whatever).

?Possible

  • Average number of different operations (ADD/MODIFY) per commit

About

Index git history into a Solr repository

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published