Thank you. This is working well. I can now find filenames and content. I
have a question about the query string and finding parts of filename.
"Pink_Panther.gif" I get no results. I think this has to do with the "_" how
can I search for parts of a name. A MSDN article on the search string may
help.
Post by WenJun Zhang[msft]Hi Jerry,
I¡¯ve viewed the files and finished test on them. I created a test catalog,
included your files in it and ran the ASP.net query page to search on it.
Everything worked as expected after I changed the server and catalog name
in query string and the connection string.
System.Data.OleDb.OleDbConnection odbSearch = new
System.Data.OleDb.OleDbConnection("Provider=MSIDXS;Locale
Identifier=1041;");
cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from MyServer.Catalog..scope() where FREETEXT(Contents,'"
+ searchText + "') order by rank desc ";
A problem here is I can only search string ¡°sample¡± in the query because
your files only contain 1 text file New Text Document.txt with string
¡°Sample¡± in it. Searching other strings does not return any records since
the other files are all images or some other types which will not be
included for indexing.
If you also want to search these image files by name, then do not use the
cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from IndexTest..scope() where CONTAINS(All,'" + searchText
+ "') order by rank desc ";
If there are still no records returned, as I mentioned before, please check
the permission on both the file content directory and your catalog
directory. You can temporarly grant local Everyone group with Full Control
on them to test. After any changes, restart Indexing Service and wait for a
moment to let ¡®Docs to Index¡¯ decrease to 0. Then test again and see if
it starts to work.
I look forward to your result. Have a great day.
Sincerely,
WenJun Zhang
Microsoft Online Community Support
==================================================
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.