IIS Index Server - How to return items from a query where the search term is NOT found??

This is Interesting: Free IT Magazines  
Home > Archive > IIS Index Server > February 2006 > How to return items from a query where the search term is NOT found??





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to return items from a query where the search term is NOT found??
Kevin Blount

2006-02-22, 6:03 pm

I'm using this SQL query to get results for my site's search engine
(obviously <g> )..

SELECT DocTitle, vpath, path, filename, size, write, characterization,
rank FROM SCOPE(' DEEP TRAVERSAL OF "/us" ') WHERE (CONTAINS
(DocKeywords, '"practice*"') OR CONTAINS (DocTitle, '"practice*"') OR
CONTAINS ('"practice*"') > 0) ORDER BY rank DESC

I want to add an advanced option where the user can also search for
documents where the search term is NOT found...

in general database SQL I'd just add NOT after the WHERE, making
something like

SELECT DocTitle, vpath, path, filename, size, write, characterization,
rank FROM SCOPE(' DEEP TRAVERSAL OF "/us" ') WHERE NOT (CONTAINS
(DocKeywords, '"practice*"') OR CONTAINS (DocTitle, '"practice*"') OR
CONTAINS ('"practice*"') > 0) ORDER BY rank DESC

but this causes an error:

Microsoft OLE DB Provider for Indexing Service error '80040e14'

One or more errors occurred during processing of command.


can anyone advise me on changing the first query above to return
records where the keyword is NOT found?

Many thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com