Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Keep getting empty vpath when querying Index Server

Posted on 2004-08-02
2
687 Views
Last Modified: 2008-02-26
I'm using Index Server on Windows 2000, and I'm indexing just a subdirectory on my web site. I have the catalog properties set so it knows it's part of the site, and I created a virtual directory in the site for the catalog. When I query my catalog, it finds files containing the search string, and it will tell me the correct directory and path information, but what I need is the vpath information, which is always empty. Any suggestions? This is driving me crazy, and my boss is breathing down my neck to get this solved. Thanks.
0
Comment
Question by:KarenLWilliams
2 Comments
 
LVL 7

Accepted Solution

by:
j2nku earned 500 total points
ID: 11700841
don't know the exact def for vpath but ... if it is a virtual path under your web site, you can get this path from the physical path.

Lets say your search returns a path for the file into the variable FilePath

Example:
'----------------------
FilePath = "C:\Inetpub\wwwroot\web\files\"
' We hope that path to the virtual directory is C:\Inetpub\wwwroot
VirtDir = "C:\Inetpub\wwwroot\"
'Then we can get virtual path to the file using:

if instr(lcase(FilePath),lcase(VirtDir)) > 0 Then vpath = Replace(Replace(FilePath,VirtDir,""),"\","/")

'----------------------

Of course this code is untested but it should help.
0
 
LVL 3

Expert Comment

by:Neil Thompson
ID: 11705451
just for info I've played with Indexing server for a few years and it's never worked for me.

I do the same as j2nku suggests and rewrite the file path.

Regards,
Neil
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question