Discussion:
Search from asxp page not working
(too old to reply)
Jerry C
2006-09-29 18:59:01 UTC
Permalink
Raw Message
I have a catalog that I created on a directory on the local machine. I can
get results from the Indexing service mmc. using the advanced query and
@filename=*.txt so I think the catalog is working. I am using code from the
article ID 820105 although it is a c# rendition. I do not get any results.
the query line is:

cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from scope() where FREETEXT( '" + searchText + "') order by
rank desc ";

The connection string is:
("Provider=\"MSIDXS.1\";Data Source=\"CDCat\";");

This will return results from the System catalog


Thank you
--
Jerry
Hilary Cotter
2006-09-30 22:34:09 UTC
Permalink
Raw Message
can you try this.

cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from CDCAT..scope() where FREETEXT( '" + searchText + "')
order by rank desc ";
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
Post by Jerry C
I have a catalog that I created on a directory on the local machine. I can
get results from the Indexing service mmc. using the advanced query and
@filename=*.txt so I think the catalog is working. I am using code from the
article ID 820105 although it is a c# rendition. I do not get any results.
cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from scope() where FREETEXT( '" + searchText + "') order by
rank desc ";
("Provider=\"MSIDXS.1\";Data Source=\"CDCat\";");
This will return results from the System catalog
Thank you
--
Jerry
WenJun Zhang[msft]
2006-10-02 06:18:02 UTC
Permalink
Raw Message
Hi Jerry,

As Hilary stated, you should specify the remote indexing server and catalog
name in your query like:

select ... from SERVERNAME.CATALOGNAME..Scope() where ...

Please check if it works. If there is any futher issue, please update here.

Have a nice day.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
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
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jerry C
2006-10-02 12:20:02 UTC
Permalink
Raw Message
Thank you for the replys. I tried the new query line and still no retrun
values.

new query:

cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from cdxxxxx.CDCat..scope() where FREETEXT( '" + searchText
+ "') order by rank desc ";

I still can get results from the System catalog but not the catalog that I
created.

Thank you,
--
Jerry
Post by WenJun Zhang[msft]
Hi Jerry,
As Hilary stated, you should specify the remote indexing server and catalog
select ... from SERVERNAME.CATALOGNAME..Scope() where ...
Please check if it works. If there is any futher issue, please update here.
Have a nice 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.
WenJun Zhang[msft]
2006-10-03 09:46:48 UTC
Permalink
Raw Message
Hi Jerry,

Please further check the permission of the problematic catalog's
catalog.wci directory(hidden). For test purpose, you may temporarily grant
Everyone group with Read permission on it and restart indexing service.

Also you can properly query the catalog with the query form of indexing
service mmc, right? Have you tried deploying the ASP.net application on the
server locally to test? Another possible cause is the ASP.net identity
(Networking Service or ASPNET) doesn't have permission on the indexed
files. Indexing Service will check ACL to determine if the user has right
on the indexed content. If not, it doesn't return the results.

Please update any findings or test result here for us to move on.

Have a nice day.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
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
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jerry C
2006-10-03 13:46:02 UTC
Permalink
Raw Message
WenJun,

Thank you for the reply. I checked the security and the accounts have
permission.

I am now trying to search only one directory on the local machine as before
in the dir is one .txt file and several graphic files. I have checked Index
Files with unknown extenstion. and want to search the filenames by using all
or part of the filename. I still cannot get any return results.

Thank you,
--
Jerry
Post by WenJun Zhang[msft]
Hi Jerry,
Please further check the permission of the problematic catalog's
catalog.wci directory(hidden). For test purpose, you may temporarily grant
Everyone group with Read permission on it and restart indexing service.
Also you can properly query the catalog with the query form of indexing
service mmc, right? Have you tried deploying the ASP.net application on the
server locally to test? Another possible cause is the ASP.net identity
(Networking Service or ASPNET) doesn't have permission on the indexed
files. Indexing Service will check ACL to determine if the user has right
on the indexed content. If not, it doesn't return the results.
Please update any findings or test result here for us to move on.
Have a nice 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.
WenJun Zhang[msft]
2006-10-05 09:37:09 UTC
Permalink
Raw Message
Hi Jerry,

I'd like to build a local repro of your problem to further assist on the
troubleshooting. Could you please send your sample ASP.net application and
some sample files need to be included in the catalog to reproduce the
problem?

Please feel free to email me directly at: ***@online.microsoft.com
(remove online.) . We may work offline on this issue and post the result
back to the newsgroup since it appears to become a bit tough currently.

I look forward to your message.

Have a nice day.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
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
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
WenJun Zhang[msft]
2006-10-09 10:22:29 UTC
Permalink
Raw Message
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
FreeText search. A text-matching search like CONTAINS will be the way to go:


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

==================================================

Get notification to my posts through email? Please refer to:
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
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jerry C
2006-10-09 14:10:02 UTC
Permalink
Raw Message
WenJun,

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.


I can search for "Text" in the file name "New Text Document.txt" and get
results but when I search for Bart in "Bart_Simpson_2.gif" or Pink in
"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.
--
Jerry
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.
WenJun Zhang[msft]
2006-10-10 09:08:34 UTC
Permalink
Raw Message
Hi Jerry,

You are welcome. The answer to your new question is using Word Prefix
Match. You can search for ¡°Bart*¡± or ¡°Pink*¡± in the query string.
Please refer to:

CONTAINS Predicate
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/ht
ml/ixrefqls_61v7.asp

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
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
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
guyeggos
2009-01-05 23:56:02 UTC
Permalink
Raw Message
I am hoping you can help me as well. I am deploying a web site (an employee
Intranet) to two web servers. Indexing Services / catalog is set up on each
server. I am able to query each web servers and get consistent results.
Except... One web server returns the characterization / abstract and one does
not. The web pages are identical. As far as I can tell, the indexing
services / catalogs are identical. I have compared everything between the
two servers that I can think of and am making no progress. Any suggestions?
Loading...