searchcode-server icon indicating copy to clipboard operation
searchcode-server copied to clipboard

Add Historical Search

Open boyter opened this issue 8 years ago • 8 comments

Probably the most requested feature is to be able to search through history for the purposes of Auditing.

Use cases for the above.

A user might query "when was this deleted" or "when was this added" A user might want to know "when was this deleted in a deleted file" or "when was this added in an existing file"

boyter avatar Sep 07 '16 22:09 boyter

Current progress sitting in the history branch. Currently it can index all historical data for git repositories and search over it. However its taking longer than expected because it requires a refactor of the javascript. Going to push this out to the next release.

boyter avatar Sep 13 '16 23:09 boyter

Is this feature available in the latest release?

Thanks!

dvisztempacct avatar Aug 06 '19 20:08 dvisztempacct

Hi @dvisztempacct not currently no. Well the code is there but the path to enable it is not currently turned on. It is something I am going to look at again in the near future through.

boyter avatar Aug 06 '19 21:08 boyter

this link is interesting about how to index git history: https://github.com/arafalov/git-to-solr

mcarbonneaux avatar Feb 10 '20 10:02 mcarbonneaux

@boyter Any updates on this? Is this still on your roadmap?

dufferzafar avatar Mar 25 '21 19:03 dufferzafar

@dufferzafar it is... however I am also investigating converting a lot of how searchcode server works into how searchcode works at this point... which would allow me to work on a single codebase. Its still in my mind, just I have not figured out how to achieve it yet.

A lot of it comes down to I have moved most of my efforts from Java to Go, and a lot of the work I have done there is directly applicable to searchcode.

boyter avatar Mar 26 '21 02:03 boyter

Oh, I didn't know about the Java to Go transition. I hope it will still be available as a community edition. Is there anything we can try out now?

dufferzafar avatar Mar 26 '21 05:03 dufferzafar

@dufferzafar I didn't really advertise. What it came down to was I needed to rebuild searchcode.com as the Python codebase it was on was getting very ugly. I half developed searchcode-server java version into being a replacement... but ran into a lot of issues. Not the fault of Java, but more a lot of the things I wanted to include I had written in Go. A good example is the syntax highlighting, and code counting. I have solid libraries of those in Go. So I decided to redo searchcode.com in Go. This was a lot faster to implement than I expected.

The result is that I want to move searchcode-server into Go as well. The catch being a lack of good indexing libraries on the Go side which Java has with Lucene. I am however in the middle of building my own indexing engine now, which is designed for code. With that done I can then move searchcode server across.

I suspect there will still be a community edition, however I am not sure about if the code will be as open as searchcode server currently is. The open model is just not valuable enough it seems, and so it might end up being closed. Which is a pity, but I don't want to donate all my time to something that does not at least help me pay the bills. Especially as very few people contribute at all.

There is nothing to try out now, but I am getting closer to having this all ready.

boyter avatar Mar 28 '21 23:03 boyter