Solved

Keep getting empty vpath when querying Index Server

Posted on 2004-08-02
2
701 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
[X]
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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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