Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / July 2007

Tip: Looking for answers? Try searching our database.

Syntax Question: Query by File Extension

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jack - 12 Jul 2007 12:59 GMT
In my catalog of photos the following query returns all jpegs
(correct):
#filename *.jpg
And this returns 1 result (correct)
#filename *.jpeg
However this returns nothing (incorrect):
#filename *.|(jpeg|,jpg|)
...unless I add another filename query (correct):
#filename *.|(jpeg|,jpg|) AND @filename "bikes"

Why does it not want to filter multple file extensions?
Hilary Cotter - 12 Jul 2007 13:32 GMT
I think this is an indexing services question. In this case you need to set
AllowEnumeration=true and do the following:

set objQuery=CreateObject("Ixsso.query")
objQuery.Query="{prop name=FileName}{regex}"& chr(34) & "*.|(jpeg|,jpg|)" &
chr(34) &" {/regex}{/prop}"

objQuery.Columns="FileName,vpath, write"
objQuery.MaxRecords=300
objQuery.AllowEnumeration=-1
set objRecordSet=objQuery.CreateRecordSet("nonsequential")
while not objRecordSet.Eof
wscript.echo objRecordSet.Fields(0) + " "+objRecordSet.Fields(1) +"
"+CSTR(objRecordSet.Fields(2) )
objRecordSet.MoveNext
wend

Signature

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

> In my catalog of photos the following query returns all jpegs
> (correct):
[quoted text clipped - 7 lines]
>
> Why does it not want to filter multple file extensions?
Jack - 12 Jul 2007 14:32 GMT
> I think this is an indexing services question. In this case you need to set
> AllowEnumeration=true
I'd maintain that the behaviour is inconsistent but you are correct
AllowEnumeration=true solves the problem. My concern is that this
option is a performance hit which is only really necessary in certain
obscure cases.
Jack - 12 Jul 2007 14:34 GMT
> I think this is an indexing services question. In this case you need to set
> AllowEnumeration=true and do the following:
Looks like I'll have to do:
If InStr(Query, "#")>0 And InStr(Query, "@")=0 Then Q.AllowEnumeration
= True
for optimal performance
Hilary Cotter - 12 Jul 2007 16:56 GMT
Not really. Indexing services is designed to provide web and file system
indexing. You are telling it with the @ query look only in indexed
documents. By default if you are looking for file system properties it
consult the index, if you want a complete list it will do the grep only if
allowenumeration is set to true.

Signature

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

>> I think this is an indexing services question. In this case you need to
>> set
[quoted text clipped - 3 lines]
> = True
> for optimal performance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.