oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Ability to use custom grouping names in the URL to search within that group directly #1974

Open Suwadith opened 6 years ago

Suwadith commented 6 years ago

Currently in OpenGrok we are able to search within a particular group of modules using the grouping feature.

But what it does is, it adds all the module names to the URL and then it searches within that range. So it creates a huge string. I'm not worried about that but I want to be able to skip the initial page of OpenGrok and use the URL directly to go to the results page directly by passing the search value onto the URL.

Current URL Looks like this http://localhost:8080/source/search?project=project=p1&project=p2&project=p3........&q=XXXX&defs=&refs=&path=&hist=&type=

I want to make it work like this If there is a group named "client modules" I want to be able to search it with something like this http://localhost:8080/source/search/client_modules&q=XXXX&defs=&refs=&path=&hist=&type=

Within that client_module String I want all the appropriate modules to be bundled within. I hope doing something like this with the select all option will also be useful.

That way I'll be able to connect another one of my apps with this so that the user doesn't have to go through the whole selection and searching process, He'll just be able to go directly to the results page.

Can this be done?

Thanks.

vladak commented 6 years ago

Definitely viable to expand the group to list of projects (however I'd use http://localhost:8080/source/search?group=client_modules&q=XXXX&defs=&refs=&path=&hist=&type=) however I am not sure if there could not be any UI fallout.

mindaugasrukas commented 6 years ago

We have an issues with long URL's as we have thousands of repos. I also would like to have a way to search through all (10k) repos. Something like build in group all: http://localhost:8080/source/search?group=all&q=XXXX&defs=&refs=&path=&hist=&type=