How to seach for <code> or <summary> ?

Subscribe to How to seach for <code> or <summary> ? 3 posts, 3 voices

 
Avatar haathi 1 post

I was looking for some sample code that had .Net XML comments with the element. However, when I typed <code> in the search the results I got were without the < and >. I tried to put it in quotes "<code>" and searched again. No luck. Finally I tried to escape the < and > by using "&lt;code&gt;" (without the quotes) and still it failed. Can one of the koders.com developers tell me how I can search inside code for XML nodes/elements such as <code> or <summary> or <seealso> Thanks -Shiva

 
Avatar MikeGammarino 17 posts

After doing some testing, I don’t believe there is a way to search for the exact string you are looking for. We use Lucene as our backend and those specific characters are not supported as being “escapable”. See Lucene documentation at the bottom of this page. Sorry I couldn’t be of more help.

 
Avatar JohnHunter 2 posts

This is crazy! How can you be a code repository search engine and not allow searching for special characters that are likely to be in the code. I have similar issues when searching for specific tags in an .aspx file (i.e. <asp:literal>