Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query on filter only (without searchphrase) #89

Closed
quasarea opened this issue Mar 21, 2017 · 6 comments
Closed

Query on filter only (without searchphrase) #89

quasarea opened this issue Mar 21, 2017 · 6 comments

Comments

@quasarea
Copy link

It could be good to be able for query on filter only, like:
http://localhost:8080/?lan=C%2B%2B&repo=Test

So it would end up listing all the files of specified language in repo,

Could do some overview of unknowns, and also be used in overviews to link % of languages to actual results for the repo.

@boyter
Copy link
Owner

boyter commented Mar 21, 2017

Certainly something to consider adding. I can see this being useful in some instances.

@boyter
Copy link
Owner

boyter commented Jun 14, 2017

Might be worth doing this though a literal search option, which passes back the query as a lucene query and runs that. Would mean having to know the lucene syntax however.

@boyter
Copy link
Owner

boyter commented Aug 30, 2017

@quasarea Ok this is now sitting in master.

If you take the latest copy and build you should be able to achieve this. Note it will require a rebuild of the index though.

This will only currently work on the Ajax interface (non HTML only one). On the bottom right in filter options there will be a new checkbox "Literal Search" click it an your searches will run as literal searches against the index.

So for example a search for the following with literal search enabled,

fn:data* AND rn:sear* AND ln:jav*

will search for filenames starting with data and with the repositoryname starting with sear and for the language starting with jav

I still need to add documentation for this and run it through some testing but if you could provide feedback that would be helpful.

@boyter
Copy link
Owner

boyter commented Aug 30, 2017

Oh to search for things with spaces in the name the space are replaced with _ so to search for language Bourne Again Shell you would search for

ln:bourne_again_shell

@boyter
Copy link
Owner

boyter commented Sep 7, 2017

@quasarea Sitting in master if you want to give it a go.

@quasarea
Copy link
Author

works lovely, thanks 👍

@boyter boyter closed this as completed Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants