Forum

HomeHomeCoreCoreGeneralGeneralSearch questionSearch question
Previous
 
Next
New Post
4/20/2012 2:20 PM
 

Hi,


I would like to know if OWS can search "in" a file.  I need to search through MS Word and PDF files not located under the DNN structure.  Can OWS do this?  Any ideas otherwise?

New Post
4/20/2012 3:42 PM
 


I do not think OWS can do this internally, however I was able to accomplish this with the following:


Synopsis:

  1. Install MS Indexing Service on the webserver
  2. Create a catalog (index server); 
  3. Create a link between SQL server and Index Server (TSQL sp_AddLinkedServer)
  4. Query as per usual in OWS!!  That's right:  a "regular" query!

Sample TSQL to create the link between services:


EXECUTE sp_AddLinkedServer [ServerName]
'Index Services', 
'MSIDXS', 
'[CatalogName]'




Sample query for OWS:


SELECT *
FROM OpenQuery([ServerName],
'SELECT Directory, FileName, DocAuthor, Size, Create
FROM SCOPE()
WHERE CONTAINS( Contents, ''[StringToFind]'' ) ' )



[ServerName] can be any string you chose

[CatalogName] is the name you used when creating the Catalog

[StringToFind] is the string you are searching for;


Mind the single and double quotes.


As far as I can tell, Creating virtual directories in IIS is optional; I didn't and everything still worked.


There may be (and when I say "may be" I mean "are") some security concerns; know what you are doing; use at your own risk.

Installing Index Server

http://support.microsoft.com/kb/954822 

Creating a catalog

http://support.microsoft.com/kb/308202 

Textual Searches on File Data

http://technet.microsoft.com/en-us/li... 


sp_addlinkedserver (Transact-SQL)
http://msdn.microsoft.com/en-us/libra... 
http://msdn.microsoft.com/en-us/libra... 

How to use an ASP.NET application to query an Indexing Service catalog by using Visual Basic .NET
http://support.microsoft.com/kb/820105  
 
I'm not on this forum regularly so if you have a question it may be awhile before I get back to you.

New Post
4/20/2012 4:27 PM
 
The fields that are available may vary, however I made a list of those I encountered. I have one folder/catalog that has all of these, and another with only a small portion. I didn't have time to find out why, but I suspect these are an aggregate of all the document properties present on each document. Varying document/properties may cause the list to change. I am certain there are a few from the OS, such as name and size which will be consistent across all documents though. 


Fields:

A_Href
Access
AllocSize
Attrib
Charactgerization
ClassID
Create
Directory
DocAppName
DocAuthor
DocCharCount
DocComments
DocCompany
DocCreatedTm
DocEditTime
DocKeywords
DocLastAuthor
DocLastPrinted
DocLastSavedTm
DocLineCount
DocParaCount
DocPartTitles
DocRevNumber
DocSecurity
DocSubject
DocTemplate
DocTitle
DocWordCount
FileIndex
Filename
Path
ShortFilename
Size
USN
Write

New Post
5/18/2012 8:46 AM
 
I also was able to integrate OWS with Microsoft Search service (server 2008). Along with the latest Adobe PDF reader (to get their search API), this is a real sweet way to search a library of PDF documents without much code at all.
New Post
12/30/2015 4:50 PM
 
Hi WSSDA, I created a new topic: http://www.openwebstudio.com/Community/Forums/tabid/55/forumid/1/threadid/27649/scope/posts/Default.aspx which is very much related to yours. I thought I'd leave a message here so you can have a look :) Thanks, Ken
Previous
 
Next
HomeHomeCoreCoreGeneralGeneralSearch questionSearch question


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share