#379 Add Code search

Open
opened 1 week ago by davidak · 9 comments
davidak commented 1 week ago
Collaborator

Gitea now suports it with elastic search.

https://github.com/go-gitea/gitea/pull/10273

I don't know it it works well and is usable. It seem not to be activated on https://try.gitea.io/

Gitea now suports it with elastic search. https://github.com/go-gitea/gitea/pull/10273 I don't know it it works well and is usable. It seem not to be activated on https://try.gitea.io/
davidak added the
enhancement
label 1 week ago
Poster

Gitea has had code search for a while, it was just 1.13 that introduced being able to use ES. Codesearch is not available in any form on try.gitea.io as people love to push giant repos to it and eat up all our disk space (hence the notice that repos may disappear at any time), and having codesearch would only increase the resources needed.

Gitea has had code search for a while, it was just 1.13 that introduced being able to use ES. Codesearch is not available in any form on try.gitea.io as people love to push giant repos to it and eat up all our disk space (hence the notice that repos may disappear at any time), and having codesearch would only increase the resources needed.
Poster

While I use Gitea codesearch on the daily, for codeberg an alternative could be to set up an install of https://about.sourcegraph.com/ as it is significantly more robust and more featureful. The non-enterprise edition is licensed as Apache 2.

While I use Gitea codesearch on the daily, for codeberg an alternative could be to set up an install of https://about.sourcegraph.com/ as it is significantly more robust and more featureful. The non-enterprise edition is licensed as Apache 2.
hw commented 4 days ago
Poster
Owner

Interesting, ... do you imagine some kind of integration, or running it side-by-side?

Interesting, ... do you imagine some kind of integration, or running it side-by-side?
Poster

I see it as running side-by-side, however to make integration easier I could send a customization PR to codeberg that would swap out the standard code search text box with it opening up results in sourcegraph, and also add a button for something like "open this repo in sourcegraph".

Whichever way is decided (enabling code search via bleve, es, or connecting to a sourcegraph install) will add additional effort for the infra team though, so while one way may be better in terms of accuracy and usability, we should also take into account those managing the infra so as not to cause burnout.

I see it as running side-by-side, however to make integration easier I could send a customization PR to codeberg that would swap out the standard code search text box with it opening up results in sourcegraph, and also add a button for something like "open this repo in sourcegraph". Whichever way is decided (enabling code search via bleve, es, or connecting to a sourcegraph install) will add additional effort for the infra team though, so while one way may be better in terms of accuracy and usability, we should also take into account those managing the infra so as not to cause burnout.
duggalsu commented 4 days ago
Poster

It would be great to have this feature! It would significantly boost productivity on codeberg for me. I am happy with whatever works best for the devs.

It would be great to have this feature! It would significantly boost productivity on codeberg for me. I am happy with whatever works best for the devs.
hw commented 3 days ago
Poster
Owner

@6543 : do you have any gut feeling how sourcegraph compares to the elasticsearch index in terms of storage requirements?

@6543 : do you have any gut feeling how sourcegraph compares to the elasticsearch index in terms of storage requirements?
Poster
Owner

@techknowlogick

I assume the ES instance could run on a different server, right?

@techknowlogick I assume the ES instance could run on a different server, right?
6543 commented 1 day ago
Poster
Collaborator

@ashimokawa can be configured as you wish ...

@hw sadly I dont have any real-world-data since I didn't hat tested big instances with neither both of them :/

why not just test it with codeberg's test instance and look ow mouch each take?

@ashimokawa can be configured as you wish ... @hw sadly I dont have any real-world-data since I didn't hat tested big instances with neither both of them :/ why not just test it with codeberg's test instance and look ow mouch each take?
hw commented 1 day ago
Poster
Owner

why not just test it with codeberg's test instance and look ow mouch each take?

Running such tests (in a dedicated VM for isolation) is high on the todo list.

> why not just test it with codeberg's test instance and look ow mouch each take? Running such tests (in a dedicated VM for isolation) is high on the todo list.
Sign in to join this conversation.
No Milestone
No Assignees
6 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.