Solved

Keep getting empty vpath when querying Index Server

Posted on 2004-08-02
2
656 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:NeilT
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now