Requesting search of wiki repos #1624

Open
opened 2025-11-02 04:07:12 -06:00 by GiteaMirror · 22 comments
Owner

Originally created by @nathan-sain on GitHub (Mar 14, 2018).

Originally assigned to: @6543 on GitHub.

  • Gitea version (or commit ref):9a5e628 (Gitea Docker container)
  • Git version: 2.15.0
  • Operating system:Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant (Unable to connect)
  • Log gist:

Description

I have enabled indexing of my repos with
REPO_INDEXER_ENABLED = true
in my app.ini
I would like to search my wiki repos like I do my code repos

Originally created by @nathan-sain on GitHub (Mar 14, 2018). Originally assigned to: @6543 on GitHub. <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref):9a5e628 (Gitea Docker container) - Git version: 2.15.0 - Operating system:Linux - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant (Unable to connect) - Log gist: ## Description I have enabled indexing of my repos with REPO_INDEXER_ENABLED = true in my app.ini I would like to search my wiki repos like I do my code repos
GiteaMirror added the type/featureissue/confirmed labels 2025-11-02 04:07:12 -06:00
Author
Owner

@lunny commented on GitHub (Mar 14, 2018):

Currently it will only index code but not related wiki repo.

@lunny commented on GitHub (Mar 14, 2018): Currently it will only index code but not related wiki repo.
Author
Owner

@igsol commented on GitHub (Nov 6, 2018):

@lunny

not related wiki repo.

Ah, how it's pity 😢

@igsol commented on GitHub (Nov 6, 2018): @lunny > not related wiki repo. Ah, how it's pity :cry:
Author
Owner

@zettar commented on GitHub (Nov 6, 2018):

not related wiki repo.

Ah, how it's pity 😢

Second the above.

@zettar commented on GitHub (Nov 6, 2018): > not related wiki repo. >> Ah, how it's pity :cry: Second the above.
Author
Owner

@stale[bot] commented on GitHub (Jan 5, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 5, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@fangchin commented on GitHub (Jan 5, 2019):

Indexing wiki and having an effective search function definitely helps with the use of a software, especially something as promising as gitea. Please give this ticket more consideration that it deserves.

@fangchin commented on GitHub (Jan 5, 2019): Indexing wiki and having an effective search function definitely helps with the use of a software, especially something as promising as gitea. Please give this ticket more consideration that it deserves.
Author
Owner

@stale[bot] commented on GitHub (Mar 6, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 6, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@mrsdizzie commented on GitHub (Mar 6, 2019):

Agree this feature is sorely missing and makes the wiki not very useable in lots of real world situations (lots of documentation/text isn't practical without search). It is almost more usable to use the regular code view to store the wiki/md files where you get access to search but loose the few wiki features like page dropdown and _sidebar/_footer

Having a search here would make the wiki feature exponentially more useful :)

@mrsdizzie commented on GitHub (Mar 6, 2019): Agree this feature is sorely missing and makes the wiki not very useable in lots of real world situations (lots of documentation/text isn't practical without search). It is almost more usable to use the regular code view to store the wiki/md files where you get access to search but loose the few wiki features like page dropdown and _sidebar/_footer Having a search here would make the wiki feature exponentially more useful :)
Author
Owner

@oscarlofwenhamn commented on GitHub (Mar 28, 2019):

This would be a very useful feature indeed!

@oscarlofwenhamn commented on GitHub (Mar 28, 2019): This would be a very useful feature indeed!
Author
Owner

@paolo-rendano commented on GitHub (Aug 28, 2019):

Any progress on this? Search on wiki is a must for this kind of tool.

Thanks
Paolo

@paolo-rendano commented on GitHub (Aug 28, 2019): Any progress on this? Search on wiki is a must for this kind of tool. Thanks Paolo
Author
Owner

@guillep2k commented on GitHub (Aug 28, 2019):

Could it be implemented with bleve, like the other searches? Any objections with an implementation like that? I guess the Wiki is just markdown code, so I think it shouldn't be too difficult to implement.

@guillep2k commented on GitHub (Aug 28, 2019): Could it be implemented with bleve, like the other searches? Any objections with an implementation like that? I guess the Wiki is just markdown code, so I think it shouldn't be too difficult to implement.
Author
Owner

@oscarlofwenhamn commented on GitHub (Aug 28, 2019):

The wikis being just (afaik) rendered code, it definitely feels like it should be able to be done in a similar fashion.

@oscarlofwenhamn commented on GitHub (Aug 28, 2019): The wikis being just (afaik) rendered code, it definitely feels like it should be able to be done in a similar fashion.
Author
Owner

@MasterDimmy commented on GitHub (Dec 22, 2020):

requesting for this

@MasterDimmy commented on GitHub (Dec 22, 2020): requesting for this
Author
Owner

@nauevg commented on GitHub (Jun 23, 2021):

Any updates on this?

@nauevg commented on GitHub (Jun 23, 2021): Any updates on this?
Author
Owner

@Abyss777 commented on GitHub (May 26, 2022):

Very useful feature. Any plans to implement this?

@Abyss777 commented on GitHub (May 26, 2022): Very useful feature. Any plans to implement this?
Author
Owner

@johand77 commented on GitHub (Aug 22, 2022):

Would definitely love this feature. That makes the wiki a much more powerfull tool for documentation.

@johand77 commented on GitHub (Aug 22, 2022): Would definitely love this feature. That makes the wiki a much more powerfull tool for documentation.
Author
Owner

@theobjectivedad commented on GitHub (Sep 7, 2022):

I'd love to see this on the roadmap!

@theobjectivedad commented on GitHub (Sep 7, 2022): I'd love to see this on the roadmap!
Author
Owner

@ivptr commented on GitHub (Feb 18, 2023):

Any update on this?

@ivptr commented on GitHub (Feb 18, 2023): Any update on this?
Author
Owner

@Darthagnon commented on GitHub (Sep 9, 2023):

I, too, would love to see this on the roadmap - I currently maintain a company wiki within Gitea, but the lack of search is sorely missing.

@Darthagnon commented on GitHub (Sep 9, 2023): I, too, would love to see this on the roadmap - I currently maintain a company wiki within Gitea, but the lack of search is sorely missing.
Author
Owner

@RyanGreenup commented on GitHub (Oct 13, 2023):

Like a few others have mentioned, I too create a separate code repository and use it as a wiki. However, the analyzer uses keyword rather than standard 1 making the search less ideal (e.g. python returns results but the query python list does not, see generally 2 ).

Long-term there needs to be a separate indexer for the wiki but for an easy workaround one can change the analyzer used in the source:

sed -i  's!analyzer/keyword!analyzer/standard!'  modules/indexer/code/bleve/bleve.go

I put together this Dockerfile if anybody wants to use it:

FROM codeberg.org/forgejo/forgejo:1.20


# Install Go (needed because alpine currently has 1.20)
RUN wget 'https://go.dev/dl/go1.21.3.linux-amd64.tar.gz'
RUN tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin/:$PATH"
ENV CGO_ENABLED=1

# Install dependencies
RUN apk update; apk add make nodejs npm gcc musl-dev

# Get the source and patch it
RUN git clone https://codeberg.org/forgejo/forgejo --depth=1
RUN sed -i  's!analyzer/keyword!analyzer/standard!'  forgejo/modules/indexer/code/bleve/bleve.go

# Build it
RUN cd forgejo; make clean-all
RUN cd forgejo; make frontend
RUN cd forgejo; go build contrib/environment-to-ini/environment-to-ini.go
RUN cd forgejo; TAGS="bindata sqlite sqlite_unlock_notify" make -j1

# Install it
RUN install -Dm755 forgejo/gitea -t /usr/local/bin/
@RyanGreenup commented on GitHub (Oct 13, 2023): Like a few others have mentioned, I too create a separate code repository and use it as a wiki. However, the analyzer uses [`keyword`](https://github.com/blevesearch/bleve/blob/master/analysis/analyzer/keyword/keyword.go) rather than [`standard`](https://github.com/blevesearch/bleve/blob/master/analysis/analyzer/standard/standard.go) [^1] making the search less ideal (e.g. `python` returns results but the query `python list` does not, see generally [^3]). Long-term there needs to be a separate indexer for the wiki but for an easy workaround one can change the analyzer used in the source: ```sh sed -i 's!analyzer/keyword!analyzer/standard!' modules/indexer/code/bleve/bleve.go ``` I put together this `Dockerfile` if anybody wants to use it: <details> ```dockerfile FROM codeberg.org/forgejo/forgejo:1.20 # Install Go (needed because alpine currently has 1.20) RUN wget 'https://go.dev/dl/go1.21.3.linux-amd64.tar.gz' RUN tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz ENV PATH="/usr/local/go/bin/:$PATH" ENV CGO_ENABLED=1 # Install dependencies RUN apk update; apk add make nodejs npm gcc musl-dev # Get the source and patch it RUN git clone https://codeberg.org/forgejo/forgejo --depth=1 RUN sed -i 's!analyzer/keyword!analyzer/standard!' forgejo/modules/indexer/code/bleve/bleve.go # Build it RUN cd forgejo; make clean-all RUN cd forgejo; make frontend RUN cd forgejo; go build contrib/environment-to-ini/environment-to-ini.go RUN cd forgejo; TAGS="bindata sqlite sqlite_unlock_notify" make -j1 # Install it RUN install -Dm755 forgejo/gitea -t /usr/local/bin/ ``` </details> [^1]: https://codeberg.org/forgejo/forgejo/src/branch/v1.21/forgejo/modules/indexer/code/bleve/bleve.go#L29 [^3]: https://bleveanalysis.couchbase.com/static/
Author
Owner

@0e39bf7b commented on GitHub (Nov 19, 2023):

Hello! Are there any plans on this feature?

@0e39bf7b commented on GitHub (Nov 19, 2023): Hello! Are there any plans on this feature?
Author
Owner

@RyanGreenup commented on GitHub (Feb 10, 2024):

In hindsight I'm not sure if my last workaround worked very well, I'd need to review it.

What needs to be done to implement this? If someone with more experience in this codebase can list some achievable steps, I'm happy to help out in any way I can.

As it stands I'm using a separate Meilisearch Bar and fzf + bleve, I'd rather just use the integrated bleve.

@RyanGreenup commented on GitHub (Feb 10, 2024): In hindsight I'm not sure if my [last workaround](https://github.com/go-gitea/gitea/issues/3670#issuecomment-1760782455) worked very well, I'd need to review it. What needs to be done to implement this? If someone with more experience in this codebase can list some achievable steps, I'm happy to help out in any way I can. As it stands I'm using a separate Meilisearch Bar and [fzf + bleve](https://gitlab.com/RyanGreenup/note_taking), I'd rather just use the integrated bleve.
Author
Owner

@6543 commented on GitHub (Mar 12, 2024):

suggestions how to expose it to the ui are welcome to #29726 ;)

@6543 commented on GitHub (Mar 12, 2024): suggestions how to expose it to the ui are welcome to #29726 ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1624