Re: Specifying the document File Type using a filename field

Tech-Archive recommends: Fix windows errors by optimizing your registry



Jack,
While the SQL Server 2000 BOL info is somewhat limited on this topic, I've
attached a SQL script file (Import_FTS_Images.sql) that describes the exact
code necessary to get this to work using TextCopy.exe as the upload method.
Note, the ExtCol char(3) can be either sysname or char(3) or varchar(4) and
this is the equivalent column as your Filename column, so you should ensure
that it is defined the same. The content of Filename or ExtCol should be
"pdf" if defined as char(3) or ".pdf" if it is defined as varchar(4).

Hope that helps!
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/


"Jack" <cawoodm@xxxxxxxxx> wrote in message
news:1123164452.306451.116360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi All
> When creating a Full Text catalog of binary content (e.g. PDF files)
> one must specify the field containing the filename so that the indexer
> knows if a file is PDF or DOC etc.
>
> EXEC sp_fulltext_column 'Document', 'BinaryContent', 'add', 0,
> 'Filename'
>
> Is there any documentation as to how this field should look. In my
> crawler I have 2 fields I could use:
> 1) URL -> http://domin/filename.pdf OR
> 2) Content Type -> application/pdf
> Are these acceptable for the indexer or does it need a field that looks
> like this:
> 1) Filename -> filename.pdf OR
> 2) Extension -> "pdf"
>
> Thanks in advance.
>
> Marc
>


begin 666 Import_FTS_Images.sql
M#0IU<V4@<'5B<PT*9V\-"FEF(&5X:7-T<R H<V5L96-T("H@9G)O;2!S>7-O
M8FIE8W1S('=H97)E(&ED(#T@;V)J96-T7VED*"=&5%-486)L92<I*0T*("!D
M<F]P('1A8FQE($944U1A8FQE#0IG;PT*#0I#4D5!5$4@5$%"3$4@1E135&%B
M;&4@* T*("!+97E#;VP):6YT($E$14Y42519("@Q+#$I($Y/5"!.54Q,( T*
M(" @($-/3E-44D%)3E0@1E135&%B;&5?2418(%!224U!4ED@2T59($-,55-4
M15)%1"P-"B @5&5X=$-O; ET97AT($Y53$PL#0H@($EM86=E0V]L"6EM86=E
M($Y53$PL#0H@($5X=$-O; EC:&%R*#,I($Y53$PL("TM(&-A;B!B92!E:71H
M97(@<WES;F%M92!O<B!C:&%R*#,I#0H@(%1I;653=&%M<$-O; ET:6UE<W1A
M;7 @3E5,3" -"BD@3TX@6U!224U!4EE=#0IG;PT*#0H-"BTM($EN<V5R="!D
M871A+BXN("A.;W1E.B!);FET86QI>FEN9R!)34%'12!C;VQU;6X@=VET:" P
M>$9&1D9&1D9&(&9O<B!U<V4@=VET:"!497AT0V]P>2YE>&4I#0I)3E-%4E0@
M1E135&%B;&4@=F%L=65S*"=497-T(%1%6%0@1&%T82!F;W(@<F]W(#$G+" P
M>$9&1D9&1D9&+" G9&]C)RP@3E5,3"D-"DE.4T525"!&5%-486)L92!V86QU
M97,H)U1E<W0@5$585"!$871A(&9O<B!R;W<@,B<L(#!X1D9&1D9&1D8L("=X
M;',G+"!.54Q,*0T*24Y315)4($944U1A8FQE('9A;'5E<R@G5&5S="!415A4
M($1A=&$@9F]R(')O=R S)RP@,'A&1D9&1D9&1BP@)W!P="<L($Y53$PI#0I)
M3E-%4E0@1E135&%B;&4@=F%L=65S*"=497-T(%1%6%0@1&%T82!F;W(@<F]W
M(#0G+" P>$9&1D9&1D9&+" G='AT)RP@3E5,3"D-"DE.4T525"!&5%-486)L
M92!V86QU97,H)U1E<W0@5$585"!$871A(&9O<B!R;W<@-2<L(#!X1D9&1D9&
M1D8L("=H=&TG+"!.54Q,*0T*24Y315)4($944U1A8FQE('9A;'5E<R@G5&5S
M="!415A4($1A=&$@9F]R(')O=R V)RP@,'A&1D9&1D9&1BP@)W!D9B<L($Y5
M3$PI#0I)3E-%4E0@1E135&%B;&4@=F%L=65S*"=497-T(%1%6%0@1&%T82!F
M;W(@<F]W(#<G+" P>$9&1D9&1D9&+" G>&UL)RP@3E5,3"D-"F=O#0H-"@T*
M+2T@4V5L96-T(&1A=&$-"E-%3$5#5" J(&9R;VT@1E135&%B;&4-"F=O#0H-
M"@T*9&5C;&%R92! <75E<GD@=F%R8VAA<B@R,# I#0HM+2!);G-E<G0@2%1-
M3%]F:6QE+FAT;2!I;G1O(%)O=R U("$A#0HM+2!.3U1%.B!%;G-U<F4@=&AE
M(&-O<G)E8W0@<&%T:"!F;W(@=&5X=&-O<'DN97AE(2$-"G-E="! <75E<GD@
M/2 G1#I<35-344PX,%Q-4U-13"1344PX,%Q":6YN7'1E>'1C;W!Y("]S("<K
M0$!S97)V97)N86UE*R<@+W4@<V$@+W @+V0@<'5B<R O="!&5%-486)L92 O
M8R!);6%G94-O;" O9B!$.EQ344Q&:6QE<UQ3:&EL;VA</$A434Q?9FEL93XN
M:'1M("]I("]K(#4P,# @+W<@(G=H97)E($ME>4-O;#TU(B<-"G!R:6YT($!Q
M=65R>0T*97AE8R!M87-T97(N+GAP7V-M9'-H96QL($!Q=65R>0T*9V\-"@T*
M9&5C;&%R92! <75E<GD@=F%R8VAA<B@R,# I#0HM+2!);G-E<G0@35-?5V]R
M9"YD;V,@:6YT;R!2;W<@,2 A(0T*<V5T($!Q=65R>2 ]("=$.EQ-4U-13#@P
M7$U34U%,)%-13#@P7$)I;FY<=&5X=&-O<'D@+W,@)RM 0'-E<G9E<FYA;64K
M)R O=2!S82 O<" O9"!P=6)S("]T($944U1A8FQE("]C($EM86=E0V]L("]F
M($0Z7$I+86YE7$1O8W-</$U37U=O<F0^+F1O8R O:2 O:R U,# P("]W(")W
M:&5R92!+97E#;VP],2(G#0IP<FEN="! <75E<GD-"F5X96,@;6%S=&5R+BYX
M<%]C;61S:&5L;"! <75E<GD-"F=O#0H-"BTM(%-E;&5C="!D871A#0I314Q%
M0U0@*B!F<F]M($944U1A8FQE#0IG;PT*#0H-"BTM($9422 -"G5S92!P=6)S
M#0IG;PT*97AE8R!S<%]F=6QL=&5X=%]D871A8F%S92 G96YA8FQE)R -"F=O
M#0IE>&5C('-P7V9U;&QT97AT7W-E<G9I8V4@)V-L96%N7W5P)PT*#0HM+2!$
M<F]P($9422P@:68@;F5C97-S87)Y+BXN#0IE>&5C('-P7V9U;&QT97AT7W1A
M8FQE("=&5%-486)L92<L)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"<\<V5A<F-H7W=O<F1?:&5R93XG*2!O<F1E
M<B!B>2!+97E#;VP@#0IG;PT*#0H-"BTM($-O;F9I<FT@1E0@4')O<&5R=&EE
M<RXN+@T*=7-E('!U8G,-"F=O#0IS<%]H96QP7V9U;&QT97AT7V-A=&%L;V=S
M("=&5%-#871A;&]G)R -"F=O#0IS<%]H96QP7V9U;&QT97AT7W1A8FQE<R G
M1E130V%T86QO9R<@( T*9V\-"G-P7VAE;'!?9G5L;'1E>'1?8V]L=6UN<R G
M1E135&%B;&4G#0IG;PT*4T5,14-4(&9U;&QT97AT8V%T86QO9W!R;W!E<G1Y
M*"=&5%-#871A;&]G)RP@)U!O<'5L871E4W1A='5S)RD@#0IG;PT*#0HM+2!2
M96UO=F4@1E0@26YD97AE<R F($-A=&%L;V<@)B!T86)L92XN#0H-"F5X96,@
M<W!?9G5L;'1E>'1?=&%B;&4@)T944U1A8FQE)RPG9')O<"<-"@T*97AE8R!S
M<%]F=6QL=&5X=%]#871A;&]G("=&5%-#871A;&]G)RPG9')O<"<-"@T*9')O
4<"!T86)L92!&5%-486)L90T*#0H`
`
end

.



Relevant Pages

  • Re: sqlplus: Help with Spooling (path and file questions)
    ... I'm trying to figure out how to create path and filename ... for the spool command in sqlplus. ... SQL> column date_column new_value today ... Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - ...
    (comp.databases.oracle.server)
  • Parameters in Execute SQL Task properties
    ... I am working on a DTS job to do some file manipulation and renaming and so on in preparation for picking up a file from an FTP source. ... Later on, after I do my file manipulation, I want to write out to a sql table the value in this golbal variable called filedate. ... the parameter is equal to the text filename. ... variable is a second parameter, which is the counter I set with the ...
    (microsoft.public.sqlserver.dts)
  • Re: import excel spreadsheet to sql via vb or java script
    ... turn it into that format. ... dateformat to the filename. ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ...
    (microsoft.public.sqlserver.dts)
  • Re: changing query source
    ... The problem is Excel is somehow, somewhere, storing the old filename. ... When I go into the SQL, I can edit the FROM statement, and when I save ...
    (microsoft.public.excel.worksheet.functions)
  • Specifying the document File Type using a filename field
    ... When creating a Full Text catalog of binary content (e.g. PDF files) ... one must specify the field containing the filename so that the indexer ... Are these acceptable for the indexer or does it need a field that looks ...
    (microsoft.public.sqlserver.fulltext)