locked
How to make Windows Search work with custom HTML META tags? RRS feed

  • Question

  • We are trying to use Windows Search on Windows Server 2012.  We have existing html files that include META tags in the header, something like the following:

    <meta name="MemberName" content="SomeMemberName" />
    

    I want to search for these metadata tags.  We were able to do this using the old Windows Indexing Service with no problem.  With the new Windows Search Service in Windows Server 2012, we are not able to get any results.

    How can we restrict the search to a specific set of HTML files?  What table do we need to query in the SYSTEMINDEX?

    Also, how can we do free text search of the body of the HTML?  This was also supported in the old Indexing Service, which we are trying to replace with the new Search Service.  I need to be able to do both.

    Wednesday, June 10, 2015 8:16 PM

All replies

  • I would appreciate some references to read about this issue. I can communicate with the Windows Search service and submit a query such as:

    SELECT Top 5 System.ItemNameDisplay,SYSTEM.ITEMURL,System.DateModified, System.ItemName, System.Search.AutoSummary,System.Search.GatherTime  FROM SYSTEMINDEX

    and it returns data correctly. But how do I query HTMLs within a given directory and lookup the meta data tags? 

     

    Wednesday, June 10, 2015 9:56 PM
  • Hi there I'm facing the same problem, on the old Indexing Service I would create a Catalog and in the Registry:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\XXXX\Properties]

    "D1B5D3F0-C0B3-11CF-9A92-00A0C908DBF1 MemberName"="31,4,1,1"

    And in the HTML files would have the:

    <meta name="MemberName" content="SomeMemberName" />

    https://msdn.microsoft.com/en-us/library/ms692514(v=vs.85).aspx

    In the Query

    SELECT MemberName,...

    FROM Scope(' SHALLOW TRAVERSAL OF \"c:\\temp\\\"'" ....

    Now with the Windows Search I'm lost, followed this: http://www.thejoyofcode.com/Using_Windows_Search_in_your_applications.aspx

    We know that the IFilter - HTML Filter (nlhtml.dll) is installed and with the extension .htm, using the SearchFilterView.

    What would be QUERY??

    SELECT System.FullText, system.title, system.filename, System.ItemPathDisplay

    FROM SystemIndex WHERE scope='file:" + scope_dir + "'";

    Also, tried this with no luck: http://stackoverflow.com/questions/24874333/how-to-make-windows-search-work-with-custom-html-meta-tags

    Appreciate your help

    Wednesday, April 27, 2016 3:19 PM
  • Hi,

    I'm having the same issue. Were you able to figure out how to work with custom meta tags?

    Appreciate your help.

    Tuesday, August 23, 2016 2:23 PM