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

Issues with searching for identifiers in C++ namespaces #188

Closed
sschuberth opened this issue Jul 3, 2018 · 14 comments
Closed

Issues with searching for identifiers in C++ namespaces #188

sschuberth opened this issue Jul 3, 2018 · 14 comments
Assignees
Labels

Comments

@sschuberth
Copy link

On your internal searchcode instance we're having trouble searching for C++ identifiers that include a namespace, they are not found. To compare, I tried to search for "std::cout" on the public instance, which returns some results:

https://searchcode.com/?q=std%3A%3Acout

But interestingly, e.g. a search for "std::vector" returns a 500 error on the first try:

https://searchcode.com/?q=std%3A%3Avector

image

I seems to make a difference whether you directly click the above search URL for the first time, or whether you enter "std::vector" at https://searchcode.com/ and then click "search". The latter seems to work. Very odd...

@boyter
Copy link
Owner

boyter commented Jul 3, 2018

Actually the public instance is a separate codebase entirely compared to the local one searchcode server. I do have a public searchcode server instance at http://demo.searchcodeserver.com/ however it is only running over about 20 repositories. I am in the process of merging the codebases though and hopefully at some point in the next few months they will be running 90% the same code.

Can you provide a list of terms you are searching for and files that you belive should match. I can then improve the index pipeline to take these into account.

@boyter boyter self-assigned this Jul 3, 2018
@sschuberth
Copy link
Author

sschuberth commented Jul 4, 2018

Sure. As one example, I'd expect http://demo.searchcodeserver.com/?q=PhysicsServer%3A%3Aget_singleton to match the 16 instances of "PhysicsServer::get_singleton" in https://github.com/godotengine/godot/blob/master/scene/3d/area.cpp (turning on "Literal Search" does not make a difference).

@boyter
Copy link
Owner

boyter commented Jul 4, 2018

Cheers. Ill look into that now.

@boyter
Copy link
Owner

boyter commented Jul 4, 2018

image

Should be resolved with 964616a

@sschuberth
Copy link
Author

Great, thanks for the quick fix! When will this get deployed to demo.searchcodeserver.com for some further testing?

@boyter
Copy link
Owner

boyter commented Jul 4, 2018

Probably in the next day or two. I want to do some more local testing before I actually publish it.

@boyter
Copy link
Owner

boyter commented Jul 24, 2018

Long time coming but published to demo.searchcodeserver.com for further testing.

@sschuberth
Copy link
Author

Hmm, thanks, but is the change really live yet? http://demo.searchcodeserver.com/?q=PhysicsServer%3A%3Aget_singleton from my comment above still returns no matches...

@boyter
Copy link
Owner

boyter commented Jul 24, 2018

It is still in the process of indexing http://demo.searchcodeserver.com/repository/list/ so likely it will turn up in a while. I should upgrade the server it is running on to speed these up. Ill notify you here when its actually done.

@sschuberth
Copy link
Author

Ah, sorry for not looking at the indexing status myself. Thanks!

@sschuberth
Copy link
Author

But wait, is seems https://github.com/godotengine/godot/ is gone from the list?

@boyter
Copy link
Owner

boyter commented Jul 24, 2018

Yes it is for the moment. I will be adding it back soonish.

@boyter
Copy link
Owner

boyter commented Jul 24, 2018

http://demo.searchcodeserver.com/?q=PhysicsServer%3A%3Aget_singleton

appears to work as expected now.

http://demo.searchcodeserver.com/?q=std%3A%3Astring

also appears to be as expected.

@sschuberth
Copy link
Author

Indeed, great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants