Question
Using Verity to search source code
I'm writing a help application to keep track of the
development of another (larger) coldfusion application. One of the
components keeps tracks of variable declarations, and to do this I
need to search the source code for instances of the variable name.
I'm using verity but seem to be running into some problems. I've created the collection in administrator using filetypes with extensions .cfm, .cfml, .xml, .html, .htm and WITH subdirectory recursion. It lists approximately 300 files as being indexed, which should be about right.
When I search the collection I'm not getting all the hits I should be. I think the problem is rooted in the fact I need to find substrings of the criteria, which verity doesn't seem to be doing. For example, for a variable someVar it has no problems finding:
someVar
...code... someVar ...code...
but problems seem to arise when looking for things like
# someVar#
I've tried:
<cfsearch collection="rsSourceCollection" name="qSource" criteria="#searchStr#" />
<cfsearch collection="rsSourceCollection" name="qSource" type="explicit" criteria="<wildcard>*#searchStr#*" />
<cfsearch collection="rsSourceCollection" name="qSource" type="explicit" criteria="<wildcard>*'#searchStr#'*" />
... to no avail.
Any help would be greatly appreciated.
Corey
I'm using verity but seem to be running into some problems. I've created the collection in administrator using filetypes with extensions .cfm, .cfml, .xml, .html, .htm and WITH subdirectory recursion. It lists approximately 300 files as being indexed, which should be about right.
When I search the collection I'm not getting all the hits I should be. I think the problem is rooted in the fact I need to find substrings of the criteria, which verity doesn't seem to be doing. For example, for a variable someVar it has no problems finding:
someVar
...code... someVar ...code...
but problems seem to arise when looking for things like
# someVar#
I've tried:
<cfsearch collection="rsSourceCollection" name="qSource" criteria="#searchStr#" />
<cfsearch collection="rsSourceCollection" name="qSource" type="explicit" criteria="<wildcard>*#searchStr#*" />
<cfsearch collection="rsSourceCollection" name="qSource" type="explicit" criteria="<wildcard>*'#searchStr#'*" />
... to no avail.
Any help would be greatly appreciated.
Corey