Resolve host names from hosts file while running Windows indexing queries RRS feed

  • General discussion

  • We are using Windows indexing queries against remote server where folders are indexed.
    Example - \\pni6p1893\Server\FilesIndexed 

    On client, host file(C:\Windows\System32\drivers\etc) entries are made in this manner

    <IP address> myserverhost   -> <IP address> is of host pni6p1893

    I) In one of use case, our queries are happening as "select system.itemurl from 'myserverhost.systemindex' where scope = 'file:\\myserverhost\Server\FilesIndexed'" and we see that query does not return any results.
    II) But query return result if we use query as "select system.itemurl from '<IP address>.systemindex' where scope = 'file:\\<IP address>\Server\FilesIndexed'"

    Looks like queries are unable to resolve entries in host file in first case above.

    Any work around for this? how windows can resolve the host name using host files? are there any APIs?


    Friday, April 13, 2018 12:57 PM