Ask a Question related to ASP Database, Design and Development.
-
Alan #1
Combining Index Server and SQL Server search results
I'm just about to start a project that needs to combine the results of a SQL
Server query with the results of an Index Server query. The basic idea is
that the user enters/selects a bunch of search criteria on a form. Most of
the criteria selected by the user will be used to select records from the
database - standard WHERE clause stuff - but the user can also enter
free-text that should be searched for in associated uploaded documents. The
documents are sitting in the file-system with file-name pointers only stored
in the database (not the document). Only records where the associated
free-text is found in the documents should be returned. I'm new to Index
Server and am wondering how is this done. Any good references/tutes?
ASP 3.0
IIS 5.0
Windows 2000 Server
SQL Server 2000
Cheers,
Alan
Alan Guest
-
Query of Queries Combining Results
I have a question related to query of queries and unions/joins. Below are my two queries and the output from them. What I need to do is join the... -
Query in Index Server: @filename search problem
I try to do some search in ASP using the filename on an Index server Catalog. The filename begin with date (2001_06_13.html). I do some search with... -
Newb query: index.htm & index.php & the server default
The problem I'm trying to solve is as follows: The website has two subdirectories: /ordinary and /phpstuff. Users typing hostname/ordinary get the... -
Microsoft Index Server
Hi, I have an ASP.Net application and I want to have a search section on it. Does anyone know if... 1 Can I call Microsoft Index Server to... -
Index Server
I have Index Server searching a directory of HTML files. I have set a few custom META tags in these HTML files so that these tags show up in the... -
Alan #2
Combining Index Server and SQL Server search results
I'm just about to start a project that needs to combine the results of a SQL
Server query with the results of an Index Server query. The basic idea is
that the user enters/selects a bunch of search criteria on a form. Most of
the criteria selected by the user will be used to select records from the
database - standard WHERE clause stuff - but the user can also enter
free-text that should be searched for in associated uploaded documents. The
documents are sitting in the file-system with file-name pointers only stored
in the database (not the document). Only records where the associated
free-text is found in the documents should be returned. I'm new to Index
Server and am wondering how is this done. Any good references/tutes?
ASP 3.0
IIS 5.0
Windows 2000 Server
SQL Server 2000
Cheers,
Alan
Alan Guest
-
Manohar Kamath [MVP] #3
Re: Combining Index Server and SQL Server search results
There are some good references in the Index server documentation itself, or
on MSDN. I have done index queries using Oledb driver for Index server, but
not combined with SQL server.
One idea is to create a linked server from SQL Server -- not sure if this is
even possible. But if it is, then you could query them together and combine
results.
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
The above article has precisely what you are looking for -- querying index
server from a SQL server. Just add another query and union the results.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...SQL> I'm just about to start a project that needs to combine the results of aThe> Server query with the results of an Index Server query. The basic idea is
> that the user enters/selects a bunch of search criteria on a form. Most of
> the criteria selected by the user will be used to select records from the
> database - standard WHERE clause stuff - but the user can also enter
> free-text that should be searched for in associated uploaded documents.stored> documents are sitting in the file-system with file-name pointers only> in the database (not the document). Only records where the associated
> free-text is found in the documents should be returned. I'm new to Index
> Server and am wondering how is this done. Any good references/tutes?
>
> ASP 3.0
> IIS 5.0
> Windows 2000 Server
> SQL Server 2000
>
> Cheers,
>
> Alan
>
>
Manohar Kamath [MVP] Guest
-
Manohar Kamath [MVP] #4
Re: Combining Index Server and SQL Server search results
There are some good references in the Index server documentation itself, or
on MSDN. I have done index queries using Oledb driver for Index server, but
not combined with SQL server.
One idea is to create a linked server from SQL Server -- not sure if this is
even possible. But if it is, then you could query them together and combine
results.
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
The above article has precisely what you are looking for -- querying index
server from a SQL server. Just add another query and union the results.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...SQL> I'm just about to start a project that needs to combine the results of aThe> Server query with the results of an Index Server query. The basic idea is
> that the user enters/selects a bunch of search criteria on a form. Most of
> the criteria selected by the user will be used to select records from the
> database - standard WHERE clause stuff - but the user can also enter
> free-text that should be searched for in associated uploaded documents.stored> documents are sitting in the file-system with file-name pointers only> in the database (not the document). Only records where the associated
> free-text is found in the documents should be returned. I'm new to Index
> Server and am wondering how is this done. Any good references/tutes?
>
> ASP 3.0
> IIS 5.0
> Windows 2000 Server
> SQL Server 2000
>
> Cheers,
>
> Alan
>
>
Manohar Kamath [MVP] Guest
-
John Kane #5
Re: Combining Index Server and SQL Server search results
Alan,
Manohar, here's an example of both a local IS for the files and UNION'ed
with SQL FTS:
use master
go
EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
go
-- test IS query
select * from OpenQuery(Monarch, 'Select Directory,
FileName, size, Create, Write From SCOPE() Where size <= 200')
go
-- MSIDXS combined or UNIONed with SQL FTS query...
select * from titles where contains(*, 'books')
union
select * from OpenQuery(Monarch,
'select Directory, FileName, size, Create, Write
from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
Regards,
John
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...or> There are some good references in the Index server documentation itself,but> on MSDN. I have done index queries using Oledb driver for Index server,is> not combined with SQL server.
>
> One idea is to create a linked server from SQL Server -- not sure if thiscombine> even possible. But if it is, then you could query them together andis> results.
>
> [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
>
> The above article has precisely what you are looking for -- querying index
> server from a SQL server. Just add another query and union the results.
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...> SQL> > I'm just about to start a project that needs to combine the results of a> > Server query with the results of an Index Server query. The basic ideaof> > that the user enters/selects a bunch of search criteria on a form. Mostthe> > the criteria selected by the user will be used to select records from> The> > database - standard WHERE clause stuff - but the user can also enter
> > free-text that should be searched for in associated uploaded documents.> stored> > documents are sitting in the file-system with file-name pointers only>> > in the database (not the document). Only records where the associated
> > free-text is found in the documents should be returned. I'm new to Index
> > Server and am wondering how is this done. Any good references/tutes?
> >
> > ASP 3.0
> > IIS 5.0
> > Windows 2000 Server
> > SQL Server 2000
> >
> > Cheers,
> >
> > Alan
> >
> >
>
John Kane Guest
-
John Kane #6
Re: Combining Index Server and SQL Server search results
Alan,
Manohar, here's an example of both a local IS for the files and UNION'ed
with SQL FTS:
use master
go
EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
go
-- test IS query
select * from OpenQuery(Monarch, 'Select Directory,
FileName, size, Create, Write From SCOPE() Where size <= 200')
go
-- MSIDXS combined or UNIONed with SQL FTS query...
select * from titles where contains(*, 'books')
union
select * from OpenQuery(Monarch,
'select Directory, FileName, size, Create, Write
from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
Regards,
John
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...or> There are some good references in the Index server documentation itself,but> on MSDN. I have done index queries using Oledb driver for Index server,is> not combined with SQL server.
>
> One idea is to create a linked server from SQL Server -- not sure if thiscombine> even possible. But if it is, then you could query them together andis> results.
>
> [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
>
> The above article has precisely what you are looking for -- querying index
> server from a SQL server. Just add another query and union the results.
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...> SQL> > I'm just about to start a project that needs to combine the results of a> > Server query with the results of an Index Server query. The basic ideaof> > that the user enters/selects a bunch of search criteria on a form. Mostthe> > the criteria selected by the user will be used to select records from> The> > database - standard WHERE clause stuff - but the user can also enter
> > free-text that should be searched for in associated uploaded documents.> stored> > documents are sitting in the file-system with file-name pointers only>> > in the database (not the document). Only records where the associated
> > free-text is found in the documents should be returned. I'm new to Index
> > Server and am wondering how is this done. Any good references/tutes?
> >
> > ASP 3.0
> > IIS 5.0
> > Windows 2000 Server
> > SQL Server 2000
> >
> > Cheers,
> >
> > Alan
> >
> >
>
John Kane Guest
-
Alan #7
Re: Combining Index Server and SQL Server search results
I've been a bit slack in replying and haven't tested any of this yet but all
this talk of UNIONing is getting me worried. Basically I'm looking for JOIN
functionality, where a row of data in my Applicants table includes the
path-name to a resume and covering letter stored in the file-system. I'm
hoping to query IS for content in the documents (keyword search), JOIN these
results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
'yyy'... (etc.) query of the Applicant row data itself, and then display a
row for each Applicant record that satisfied both the SQL and IS search
criteria.
I'll have a read of the references provided but thought I'd add the above in
the meantime just to make sure I haven't misrepresented what I'm trying to
do. Apologies if this is all explained in the links provided.
Cheers,
Alan
"John Kane" <jt-kane@comcast.net> wrote in message
news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...this> Alan,
> Manohar, here's an example of both a local IS for the files and UNION'ed
> with SQL FTS:
>
> use master
> go
> EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> go
>
> -- test IS query
> select * from OpenQuery(Monarch, 'Select Directory,
> FileName, size, Create, Write From SCOPE() Where size <= 200')
> go
>
> -- MSIDXS combined or UNIONed with SQL FTS query...
>
> select * from titles where contains(*, 'books')
> union
> select * from OpenQuery(Monarch,
> 'select Directory, FileName, size, Create, Write
> from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
>
> Regards,
> John
>
>
>
>
> "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...> or> > There are some good references in the Index server documentation itself,> but> > on MSDN. I have done index queries using Oledb driver for Index server,> > not combined with SQL server.
> >
> > One idea is to create a linked server from SQL Server -- not sure ifindex> is> combine> > even possible. But if it is, then you could query them together and> > results.
> >
> > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> >
> > The above article has precisely what you are looking for -- queryinga> > server from a SQL server. Just add another query and union the results.
> >
> > --
> > Manohar Kamath
> > Editor, .netBooks
> > [url]www.dotnetbooks.com[/url]
> >
> >
> > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...> > > I'm just about to start a project that needs to combine the results ofMost> is> > SQL> > > Server query with the results of an Index Server query. The basic idea> > > that the user enters/selects a bunch of search criteria on a form.documents.> of> the> > > the criteria selected by the user will be used to select records from> > > database - standard WHERE clause stuff - but the user can also enter
> > > free-text that should be searched for in associated uploadedIndex> > The> > stored> > > documents are sitting in the file-system with file-name pointers only> > > in the database (not the document). Only records where the associated
> > > free-text is found in the documents should be returned. I'm new to>> >> > > Server and am wondering how is this done. Any good references/tutes?
> > >
> > > ASP 3.0
> > > IIS 5.0
> > > Windows 2000 Server
> > > SQL Server 2000
> > >
> > > Cheers,
> > >
> > > Alan
> > >
> > >
> >
>
Alan Guest
-
Alan #8
Re: Combining Index Server and SQL Server search results
I've been a bit slack in replying and haven't tested any of this yet but all
this talk of UNIONing is getting me worried. Basically I'm looking for JOIN
functionality, where a row of data in my Applicants table includes the
path-name to a resume and covering letter stored in the file-system. I'm
hoping to query IS for content in the documents (keyword search), JOIN these
results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
'yyy'... (etc.) query of the Applicant row data itself, and then display a
row for each Applicant record that satisfied both the SQL and IS search
criteria.
I'll have a read of the references provided but thought I'd add the above in
the meantime just to make sure I haven't misrepresented what I'm trying to
do. Apologies if this is all explained in the links provided.
Cheers,
Alan
"John Kane" <jt-kane@comcast.net> wrote in message
news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...this> Alan,
> Manohar, here's an example of both a local IS for the files and UNION'ed
> with SQL FTS:
>
> use master
> go
> EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> go
>
> -- test IS query
> select * from OpenQuery(Monarch, 'Select Directory,
> FileName, size, Create, Write From SCOPE() Where size <= 200')
> go
>
> -- MSIDXS combined or UNIONed with SQL FTS query...
>
> select * from titles where contains(*, 'books')
> union
> select * from OpenQuery(Monarch,
> 'select Directory, FileName, size, Create, Write
> from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
>
> Regards,
> John
>
>
>
>
> "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...> or> > There are some good references in the Index server documentation itself,> but> > on MSDN. I have done index queries using Oledb driver for Index server,> > not combined with SQL server.
> >
> > One idea is to create a linked server from SQL Server -- not sure ifindex> is> combine> > even possible. But if it is, then you could query them together and> > results.
> >
> > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> >
> > The above article has precisely what you are looking for -- queryinga> > server from a SQL server. Just add another query and union the results.
> >
> > --
> > Manohar Kamath
> > Editor, .netBooks
> > [url]www.dotnetbooks.com[/url]
> >
> >
> > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...> > > I'm just about to start a project that needs to combine the results ofMost> is> > SQL> > > Server query with the results of an Index Server query. The basic idea> > > that the user enters/selects a bunch of search criteria on a form.documents.> of> the> > > the criteria selected by the user will be used to select records from> > > database - standard WHERE clause stuff - but the user can also enter
> > > free-text that should be searched for in associated uploadedIndex> > The> > stored> > > documents are sitting in the file-system with file-name pointers only> > > in the database (not the document). Only records where the associated
> > > free-text is found in the documents should be returned. I'm new to>> >> > > Server and am wondering how is this done. Any good references/tutes?
> > >
> > > ASP 3.0
> > > IIS 5.0
> > > Windows 2000 Server
> > > SQL Server 2000
> > >
> > > Cheers,
> > >
> > > Alan
> > >
> > >
> >
>
Alan Guest
-
Manohar Kamath [MVP] #9
Re: Combining Index Server and SQL Server search results
Since you can UNION across databases, you can JOIN as well. I don't see any
problems there.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...all> I've been a bit slack in replying and haven't tested any of this yet butJOIN> this talk of UNIONing is getting me worried. Basically I'm looking forthese> functionality, where a row of data in my Applicants table includes the
> path-name to a resume and covering letter stored in the file-system. I'm
> hoping to query IS for content in the documents (keyword search), JOINin> results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> 'yyy'... (etc.) query of the Applicant row data itself, and then display a
> row for each Applicant record that satisfied both the SQL and IS search
> criteria.
>
> I'll have a read of the references provided but thought I'd add the aboveitself,> the meantime just to make sure I haven't misrepresented what I'm trying to
> do. Apologies if this is all explained in the links provided.
>
> Cheers,
>
> Alan
>
>
> "John Kane" <jt-kane@comcast.net> wrote in message
> news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...> > Alan,
> > Manohar, here's an example of both a local IS for the files and UNION'ed
> > with SQL FTS:
> >
> > use master
> > go
> > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > go
> >
> > -- test IS query
> > select * from OpenQuery(Monarch, 'Select Directory,
> > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > go
> >
> > -- MSIDXS combined or UNIONed with SQL FTS query...
> >
> > select * from titles where contains(*, 'books')
> > union
> > select * from OpenQuery(Monarch,
> > 'select Directory, FileName, size, Create, Write
> > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> >
> > Regards,
> > John
> >
> >
> >
> >
> > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...> > > There are some good references in the Index server documentationserver,> > or> > > on MSDN. I have done index queries using Oledb driver for Indexresults.> this> > but> > > not combined with SQL server.
> > >
> > > One idea is to create a linked server from SQL Server -- not sure if> index> > is> > combine> > > even possible. But if it is, then you could query them together and> > > results.
> > >
> > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > >
> > > The above article has precisely what you are looking for -- querying> > > server from a SQL server. Just add another query and union theof> > >
> > > --
> > > Manohar Kamath
> > > Editor, .netBooks
> > > [url]www.dotnetbooks.com[/url]
> > >
> > >
> > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > I'm just about to start a project that needs to combine the resultsidea> a> > > SQL
> > > > Server query with the results of an Index Server query. The basicfrom> Most> > is> > > > that the user enters/selects a bunch of search criteria on a form.> > of> > > > the criteria selected by the user will be used to select recordsonly> documents.> > the> > > > database - standard WHERE clause stuff - but the user can also enter
> > > > free-text that should be searched for in associated uploaded> > > The
> > > > documents are sitting in the file-system with file-name pointersassociated> > > stored
> > > > in the database (not the document). Only records where the> Index> > > > free-text is found in the documents should be returned. I'm new to>> >> > > > Server and am wondering how is this done. Any good references/tutes?
> > > >
> > > > ASP 3.0
> > > > IIS 5.0
> > > > Windows 2000 Server
> > > > SQL Server 2000
> > > >
> > > > Cheers,
> > > >
> > > > Alan
> > > >
> > > >
> > >
> > >
> >
>
Manohar Kamath [MVP] Guest
-
Manohar Kamath [MVP] #10
Re: Combining Index Server and SQL Server search results
Since you can UNION across databases, you can JOIN as well. I don't see any
problems there.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...all> I've been a bit slack in replying and haven't tested any of this yet butJOIN> this talk of UNIONing is getting me worried. Basically I'm looking forthese> functionality, where a row of data in my Applicants table includes the
> path-name to a resume and covering letter stored in the file-system. I'm
> hoping to query IS for content in the documents (keyword search), JOINin> results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> 'yyy'... (etc.) query of the Applicant row data itself, and then display a
> row for each Applicant record that satisfied both the SQL and IS search
> criteria.
>
> I'll have a read of the references provided but thought I'd add the aboveitself,> the meantime just to make sure I haven't misrepresented what I'm trying to
> do. Apologies if this is all explained in the links provided.
>
> Cheers,
>
> Alan
>
>
> "John Kane" <jt-kane@comcast.net> wrote in message
> news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...> > Alan,
> > Manohar, here's an example of both a local IS for the files and UNION'ed
> > with SQL FTS:
> >
> > use master
> > go
> > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > go
> >
> > -- test IS query
> > select * from OpenQuery(Monarch, 'Select Directory,
> > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > go
> >
> > -- MSIDXS combined or UNIONed with SQL FTS query...
> >
> > select * from titles where contains(*, 'books')
> > union
> > select * from OpenQuery(Monarch,
> > 'select Directory, FileName, size, Create, Write
> > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> >
> > Regards,
> > John
> >
> >
> >
> >
> > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...> > > There are some good references in the Index server documentationserver,> > or> > > on MSDN. I have done index queries using Oledb driver for Indexresults.> this> > but> > > not combined with SQL server.
> > >
> > > One idea is to create a linked server from SQL Server -- not sure if> index> > is> > combine> > > even possible. But if it is, then you could query them together and> > > results.
> > >
> > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > >
> > > The above article has precisely what you are looking for -- querying> > > server from a SQL server. Just add another query and union theof> > >
> > > --
> > > Manohar Kamath
> > > Editor, .netBooks
> > > [url]www.dotnetbooks.com[/url]
> > >
> > >
> > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > I'm just about to start a project that needs to combine the resultsidea> a> > > SQL
> > > > Server query with the results of an Index Server query. The basicfrom> Most> > is> > > > that the user enters/selects a bunch of search criteria on a form.> > of> > > > the criteria selected by the user will be used to select recordsonly> documents.> > the> > > > database - standard WHERE clause stuff - but the user can also enter
> > > > free-text that should be searched for in associated uploaded> > > The
> > > > documents are sitting in the file-system with file-name pointersassociated> > > stored
> > > > in the database (not the document). Only records where the> Index> > > > free-text is found in the documents should be returned. I'm new to>> >> > > > Server and am wondering how is this done. Any good references/tutes?
> > > >
> > > > ASP 3.0
> > > > IIS 5.0
> > > > Windows 2000 Server
> > > > SQL Server 2000
> > > >
> > > > Cheers,
> > > >
> > > > Alan
> > > >
> > > >
> > >
> > >
> >
>
Manohar Kamath [MVP] Guest
-
Alan #11
Re: Combining Index Server and SQL Server search results
Thanks for the reply (again). What does IS use as a key value - is it common
to take the filename of the document as found by IS and (in my case) join
that with the value of the filename column in SQL?
Cheers,
Alan
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:ulPpWy%23dDHA.392@TK2MSFTNGP12.phx.gbl...any> Since you can UNION across databases, you can JOIN as well. I don't seea> problems there.
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...> all> > I've been a bit slack in replying and haven't tested any of this yet but> JOIN> > this talk of UNIONing is getting me worried. Basically I'm looking for> these> > functionality, where a row of data in my Applicants table includes the
> > path-name to a resume and covering letter stored in the file-system. I'm
> > hoping to query IS for content in the documents (keyword search), JOIN> > results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> > 'yyy'... (etc.) query of the Applicant row data itself, and then displayabove> > row for each Applicant record that satisfied both the SQL and IS search
> > criteria.
> >
> > I'll have a read of the references provided but thought I'd add theto> in> > the meantime just to make sure I haven't misrepresented what I'm tryingUNION'ed> > do. Apologies if this is all explained in the links provided.
> >
> > Cheers,
> >
> > Alan
> >
> >
> > "John Kane" <jt-kane@comcast.net> wrote in message
> > news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...> > > Alan,
> > > Manohar, here's an example of both a local IS for the files andmessage> > > with SQL FTS:
> > >
> > > use master
> > > go
> > > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> > > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > > go
> > >
> > > -- test IS query
> > > select * from OpenQuery(Monarch, 'Select Directory,
> > > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > > go
> > >
> > > -- MSIDXS combined or UNIONed with SQL FTS query...
> > >
> > > select * from titles where contains(*, 'books')
> > > union
> > > select * from OpenQuery(Monarch,
> > > 'select Directory, FileName, size, Create, Write
> > > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> > >
> > > Regards,
> > > John
> > >
> > >
> > >
> > >
> > > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote inresults> itself,> > > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...
> > > > There are some good references in the Index server documentation> server,> > > or
> > > > on MSDN. I have done index queries using Oledb driver for Index> results.> > this> > > but
> > > > not combined with SQL server.
> > > >
> > > > One idea is to create a linked server from SQL Server -- not sure if> > index> > > is
> > > > even possible. But if it is, then you could query them together and
> > > combine
> > > > results.
> > > >
> > > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > > >
> > > > The above article has precisely what you are looking for -- querying> > > > server from a SQL server. Just add another query and union the> > > >
> > > > --
> > > > Manohar Kamath
> > > > Editor, .netBooks
> > > > [url]www.dotnetbooks.com[/url]
> > > >
> > > >
> > > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > > I'm just about to start a project that needs to combine theenter> of> idea> > a> > > > SQL
> > > > > Server query with the results of an Index Server query. The basic> from> > Most> > > is
> > > > > that the user enters/selects a bunch of search criteria on a form.> > > of
> > > > > the criteria selected by the user will be used to select records> > > the
> > > > > database - standard WHERE clause stuff - but the user can alsoreferences/tutes?> only> > documents.> > > > > free-text that should be searched for in associated uploaded> > > > The
> > > > > documents are sitting in the file-system with file-name pointers> associated> > > > stored
> > > > > in the database (not the document). Only records where the> > Index> > > > > free-text is found in the documents should be returned. I'm new to> > > > > Server and am wondering how is this done. Any good>> >> > > > >
> > > > > ASP 3.0
> > > > > IIS 5.0
> > > > > Windows 2000 Server
> > > > > SQL Server 2000
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Alan
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Alan Guest
-
Alan #12
Re: Combining Index Server and SQL Server search results
Thanks for the reply (again). What does IS use as a key value - is it common
to take the filename of the document as found by IS and (in my case) join
that with the value of the filename column in SQL?
Cheers,
Alan
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:ulPpWy%23dDHA.392@TK2MSFTNGP12.phx.gbl...any> Since you can UNION across databases, you can JOIN as well. I don't seea> problems there.
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...> all> > I've been a bit slack in replying and haven't tested any of this yet but> JOIN> > this talk of UNIONing is getting me worried. Basically I'm looking for> these> > functionality, where a row of data in my Applicants table includes the
> > path-name to a resume and covering letter stored in the file-system. I'm
> > hoping to query IS for content in the documents (keyword search), JOIN> > results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> > 'yyy'... (etc.) query of the Applicant row data itself, and then displayabove> > row for each Applicant record that satisfied both the SQL and IS search
> > criteria.
> >
> > I'll have a read of the references provided but thought I'd add theto> in> > the meantime just to make sure I haven't misrepresented what I'm tryingUNION'ed> > do. Apologies if this is all explained in the links provided.
> >
> > Cheers,
> >
> > Alan
> >
> >
> > "John Kane" <jt-kane@comcast.net> wrote in message
> > news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...> > > Alan,
> > > Manohar, here's an example of both a local IS for the files andmessage> > > with SQL FTS:
> > >
> > > use master
> > > go
> > > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL, NULL
> > > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > > go
> > >
> > > -- test IS query
> > > select * from OpenQuery(Monarch, 'Select Directory,
> > > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > > go
> > >
> > > -- MSIDXS combined or UNIONed with SQL FTS query...
> > >
> > > select * from titles where contains(*, 'books')
> > > union
> > > select * from OpenQuery(Monarch,
> > > 'select Directory, FileName, size, Create, Write
> > > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> > >
> > > Regards,
> > > John
> > >
> > >
> > >
> > >
> > > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote inresults> itself,> > > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...
> > > > There are some good references in the Index server documentation> server,> > > or
> > > > on MSDN. I have done index queries using Oledb driver for Index> results.> > this> > > but
> > > > not combined with SQL server.
> > > >
> > > > One idea is to create a linked server from SQL Server -- not sure if> > index> > > is
> > > > even possible. But if it is, then you could query them together and
> > > combine
> > > > results.
> > > >
> > > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > > >
> > > > The above article has precisely what you are looking for -- querying> > > > server from a SQL server. Just add another query and union the> > > >
> > > > --
> > > > Manohar Kamath
> > > > Editor, .netBooks
> > > > [url]www.dotnetbooks.com[/url]
> > > >
> > > >
> > > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > > I'm just about to start a project that needs to combine theenter> of> idea> > a> > > > SQL
> > > > > Server query with the results of an Index Server query. The basic> from> > Most> > > is
> > > > > that the user enters/selects a bunch of search criteria on a form.> > > of
> > > > > the criteria selected by the user will be used to select records> > > the
> > > > > database - standard WHERE clause stuff - but the user can alsoreferences/tutes?> only> > documents.> > > > > free-text that should be searched for in associated uploaded> > > > The
> > > > > documents are sitting in the file-system with file-name pointers> associated> > > > stored
> > > > > in the database (not the document). Only records where the> > Index> > > > > free-text is found in the documents should be returned. I'm new to> > > > > Server and am wondering how is this done. Any good>> >> > > > >
> > > > > ASP 3.0
> > > > > IIS 5.0
> > > > > Windows 2000 Server
> > > > > SQL Server 2000
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Alan
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Alan Guest
-
Manohar Kamath [MVP] #13
Re: Combining Index Server and SQL Server search results
Depends on your table definition in SQL, although file path/name would be an
obvious choice.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:eVM2QUAeDHA.2300@TK2MSFTNGP10.phx.gbl...common> Thanks for the reply (again). What does IS use as a key value - is itbut> to take the filename of the document as found by IS and (in my case) join
> that with the value of the filename column in SQL?
>
> Cheers,
>
> Alan
>
> "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> news:ulPpWy%23dDHA.392@TK2MSFTNGP12.phx.gbl...> any> > Since you can UNION across databases, you can JOIN as well. I don't see> > problems there.
> >
> > --
> > Manohar Kamath
> > Editor, .netBooks
> > [url]www.dotnetbooks.com[/url]
> >
> >
> > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...> > > I've been a bit slack in replying and haven't tested any of this yetI'm> > all> > JOIN> > > this talk of UNIONing is getting me worried. Basically I'm looking for> > > functionality, where a row of data in my Applicants table includes the
> > > path-name to a resume and covering letter stored in the file-system.display> > these> > > hoping to query IS for content in the documents (keyword search), JOIN> > > results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> > > 'yyy'... (etc.) query of the Applicant row data itself, and thensearch> a> > > row for each Applicant record that satisfied both the SQL and IStrying> above> > > criteria.
> > >
> > > I'll have a read of the references provided but thought I'd add the> > in> > > the meantime just to make sure I haven't misrepresented what I'mNULL> to> UNION'ed> > > do. Apologies if this is all explained in the links provided.
> > >
> > > Cheers,
> > >
> > > Alan
> > >
> > >
> > > "John Kane" <jt-kane@comcast.net> wrote in message
> > > news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...
> > > > Alan,
> > > > Manohar, here's an example of both a local IS for the files and> > > > with SQL FTS:
> > > >
> > > > use master
> > > > go
> > > > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL,if> message> > > > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > > > go
> > > >
> > > > -- test IS query
> > > > select * from OpenQuery(Monarch, 'Select Directory,
> > > > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > > > go
> > > >
> > > > -- MSIDXS combined or UNIONed with SQL FTS query...
> > > >
> > > > select * from titles where contains(*, 'books')
> > > > union
> > > > select * from OpenQuery(Monarch,
> > > > 'select Directory, FileName, size, Create, Write
> > > > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> > > >
> > > > Regards,
> > > > John
> > > >
> > > >
> > > >
> > > >
> > > > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in> > itself,> > > > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...
> > > > > There are some good references in the Index server documentation> > server,> > > > or
> > > > > on MSDN. I have done index queries using Oledb driver for Index> > > > but
> > > > > not combined with SQL server.
> > > > >
> > > > > One idea is to create a linked server from SQL Server -- not sureand> > > this
> > > > is
> > > > > even possible. But if it is, then you could query them togetherquerying> > > > combine
> > > > > results.
> > > > >
> > > > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > > > >
> > > > > The above article has precisely what you are looking for --basic> results> > results.> > > index
> > > > > server from a SQL server. Just add another query and union the> > > > >
> > > > > --
> > > > > Manohar Kamath
> > > > > Editor, .netBooks
> > > > > [url]www.dotnetbooks.com[/url]
> > > > >
> > > > >
> > > > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > > > I'm just about to start a project that needs to combine the> > of> > > a
> > > > > SQL
> > > > > > Server query with the results of an Index Server query. Theform.> > idea> > > > is
> > > > > > that the user enters/selects a bunch of search criteria on ato> enter> > from> > > Most
> > > > of
> > > > > > the criteria selected by the user will be used to select records> > > > the
> > > > > > database - standard WHERE clause stuff - but the user can also> > only> > > > > > free-text that should be searched for in associated uploaded
> > > documents.
> > > > > The
> > > > > > documents are sitting in the file-system with file-name pointers> > associated> > > > > stored
> > > > > > in the database (not the document). Only records where the> > > > > > free-text is found in the documents should be returned. I'm new> references/tutes?> > > Index
> > > > > > Server and am wondering how is this done. Any good>> >> > > > > >
> > > > > > ASP 3.0
> > > > > > IIS 5.0
> > > > > > Windows 2000 Server
> > > > > > SQL Server 2000
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Alan
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Manohar Kamath [MVP] Guest
-
Manohar Kamath [MVP] #14
Re: Combining Index Server and SQL Server search results
Depends on your table definition in SQL, although file path/name would be an
obvious choice.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
news:eVM2QUAeDHA.2300@TK2MSFTNGP10.phx.gbl...common> Thanks for the reply (again). What does IS use as a key value - is itbut> to take the filename of the document as found by IS and (in my case) join
> that with the value of the filename column in SQL?
>
> Cheers,
>
> Alan
>
> "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
> news:ulPpWy%23dDHA.392@TK2MSFTNGP12.phx.gbl...> any> > Since you can UNION across databases, you can JOIN as well. I don't see> > problems there.
> >
> > --
> > Manohar Kamath
> > Editor, .netBooks
> > [url]www.dotnetbooks.com[/url]
> >
> >
> > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > news:%23DTMFB%23dDHA.3072@TK2MSFTNGP11.phx.gbl...> > > I've been a bit slack in replying and haven't tested any of this yetI'm> > all> > JOIN> > > this talk of UNIONing is getting me worried. Basically I'm looking for> > > functionality, where a row of data in my Applicants table includes the
> > > path-name to a resume and covering letter stored in the file-system.display> > these> > > hoping to query IS for content in the documents (keyword search), JOIN> > > results with the results of a normal ...WHERE xxx LIKE 'xxx' AND yyy =
> > > 'yyy'... (etc.) query of the Applicant row data itself, and thensearch> a> > > row for each Applicant record that satisfied both the SQL and IStrying> above> > > criteria.
> > >
> > > I'll have a read of the references provided but thought I'd add the> > in> > > the meantime just to make sure I haven't misrepresented what I'mNULL> to> UNION'ed> > > do. Apologies if this is all explained in the links provided.
> > >
> > > Cheers,
> > >
> > > Alan
> > >
> > >
> > > "John Kane" <jt-kane@comcast.net> wrote in message
> > > news:eZ8$BmVcDHA.2436@TK2MSFTNGP12.phx.gbl...
> > > > Alan,
> > > > Manohar, here's an example of both a local IS for the files and> > > > with SQL FTS:
> > > >
> > > > use master
> > > > go
> > > > EXEC sp_addlinkedserver 'Monarch', '', 'MSIDXS', 'Web', NULL,if> message> > > > EXEC sp_addlinkedsrvlogin 'Monarch', 'FALSE', NULL, 'abc', ''
> > > > go
> > > >
> > > > -- test IS query
> > > > select * from OpenQuery(Monarch, 'Select Directory,
> > > > FileName, size, Create, Write From SCOPE() Where size <= 200')
> > > > go
> > > >
> > > > -- MSIDXS combined or UNIONed with SQL FTS query...
> > > >
> > > > select * from titles where contains(*, 'books')
> > > > union
> > > > select * from OpenQuery(Monarch,
> > > > 'select Directory, FileName, size, Create, Write
> > > > from SCOPE() where CONTAINS(Contents,''Index'')> 0 ')
> > > >
> > > > Regards,
> > > > John
> > > >
> > > >
> > > >
> > > >
> > > > "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in> > itself,> > > > news:#ujtzxDcDHA.1204@TK2MSFTNGP12.phx.gbl...
> > > > > There are some good references in the Index server documentation> > server,> > > > or
> > > > > on MSDN. I have done index queries using Oledb driver for Index> > > > but
> > > > > not combined with SQL server.
> > > > >
> > > > > One idea is to create a linked server from SQL Server -- not sureand> > > this
> > > > is
> > > > > even possible. But if it is, then you could query them togetherquerying> > > > combine
> > > > > results.
> > > > >
> > > > > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;198493[/url]
> > > > >
> > > > > The above article has precisely what you are looking for --basic> results> > results.> > > index
> > > > > server from a SQL server. Just add another query and union the> > > > >
> > > > > --
> > > > > Manohar Kamath
> > > > > Editor, .netBooks
> > > > > [url]www.dotnetbooks.com[/url]
> > > > >
> > > > >
> > > > > "Alan" <XalanX.XhowardX@XparadiseX.XnetX.XnzX> wrote in message
> > > > > news:ercGgvCcDHA.1744@TK2MSFTNGP12.phx.gbl...
> > > > > > I'm just about to start a project that needs to combine the> > of> > > a
> > > > > SQL
> > > > > > Server query with the results of an Index Server query. Theform.> > idea> > > > is
> > > > > > that the user enters/selects a bunch of search criteria on ato> enter> > from> > > Most
> > > > of
> > > > > > the criteria selected by the user will be used to select records> > > > the
> > > > > > database - standard WHERE clause stuff - but the user can also> > only> > > > > > free-text that should be searched for in associated uploaded
> > > documents.
> > > > > The
> > > > > > documents are sitting in the file-system with file-name pointers> > associated> > > > > stored
> > > > > > in the database (not the document). Only records where the> > > > > > free-text is found in the documents should be returned. I'm new> references/tutes?> > > Index
> > > > > > Server and am wondering how is this done. Any good>> >> > > > > >
> > > > > > ASP 3.0
> > > > > > IIS 5.0
> > > > > > Windows 2000 Server
> > > > > > SQL Server 2000
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Alan
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
Manohar Kamath [MVP] Guest



Reply With Quote

