Hi, using a c# asp.net page, building a SQL query string to run against an index server catalog:
string SQL = "SELECT doctitle, vpath, Path, Write, Size, Rank ";
SQL += "FROM \"" + strCatalog + "\"..SCOPE() ";
SQL += "WHERE";
SQL += " CONTAINS(Contents, '" + strQP + "') ";
SQL += "AND NOT CONTAINS(Path, '\"_vti_\"') ";
SQL += "AND NOT CONTAINS(FileName, '\".ascx\" OR \".config\" OR \".css\"') ";
SQL += "ORDER BY Rank DESC";
Seems to work fine, except it will return results in the _vti_
directories which I am trying to avoid.
Edit: All but asked question, so to be technical: How can I search the index and have it not return files from the vti folders? Switching to use an ixsso query object is possible, but i'd rather avoid it for this particular instance.