Discussion:
No expert answers on how to query by directory name?
(too old to reply)
hjpal
2007-03-23 11:55:12 UTC
Permalink
This Code snippet will not give a search match.
Is it not possible to do what I intend to - query directory names?

strQuery = "@all " & target & ""
dim ixQuery ' Index Server query object.
set ixQuery = Server.CreateObject("ixsso.Query")
if (Err.description <> "") Then
Response.Write ("<p><b>Query object Error: " & Err.description &
".</b></p>" & vbCRLF)
Exit sub
end if
ixQuery.AllowEnumeration = True
ixQuery.Columns = "doctitle, vpath, path, filename, size, write,
characterization, rank"
ixQuery.SortBy = "filename[a]"


So when the name "administration" exists in a physical path to at filename I
would expect the file and pathname to be returned from my search
where target = administration or target = administ*

But this is not the case. Only when the word "administration" exists in the
filename og in the file context a match is returned.
Gang_Warily
2007-03-28 00:50:40 UTC
Permalink
Hi

@contents administration & #path *administration*
does seem to work for me.
Seems you can modify a search with #path,
but not use #path as the only search ?

try
@size >0 & #path *administration*
to remove the requirement for 'administration' in the content !

It's a bit devious, but works !
Try
strQuery = "@size >0 & #path *" & target & "*"
or
strQuery = "@size >0 & #vpath *" & target & "*"

HTH
Eric
Post by hjpal
This Code snippet will not give a search match.
Is it not possible to do what I intend to - query directory names?
dim ixQuery ' Index Server query object.
set ixQuery = Server.CreateObject("ixsso.Query")
if (Err.description <> "") Then
Response.Write ("<p><b>Query object Error: " & Err.description &
".</b></p>" & vbCRLF)
Exit sub
end if
ixQuery.AllowEnumeration = True
ixQuery.Columns = "doctitle, vpath, path, filename, size, write,
characterization, rank"
ixQuery.SortBy = "filename[a]"
So when the name "administration" exists in a physical path to at filename I
would expect the file and pathname to be returned from my search
where target = administration or target = administ*
But this is not the case. Only when the word "administration" exists in the
filename og in the file context a match is returned.
Loading...