Skip to main content.
home | support | download

Back to List Archive

Re: Search exactly in keywords

From: Bill Moseley <moseley(at)>
Date: Tue Jan 07 2003 - 15:11:53 GMT
On Tue, 7 Jan 2003, David THOMAS wrote:

> for instance,
> one document has:
> <META NAME="DOC_KEYWORD" CONTENT="swish search engine;test">
> a second document has:
> <META NAME="DOC_KEYWORD" CONTENT="swish search; test">
> I'm looking for "swish search" but not for "swish search engine" because 
> this is a keyword search. 
> How can I do that ?

You can't.  Can you do it in Google or any other search engine?

You can do -w "swish search" not "engine" but that means you need to know
the execption.

Swish builds a reverse index, it's not a database that is searching

What I have done in the past is make "doc_keyword" a property, too.  Then
return that property on search results and filter the results.  This
messes things up if you are using -b and -m for paged results[*].

We have also talked about adding "strucrture" bits to flag the first and
last words of a metaname so you can do something like:

   -w "^swish search$" (looks a little regex like)

to flag to the search code to find "swish" but only if it's at the first
position and "search" if it's the last postion.  That's a ways off, I

The other thing  people ask for somewhat often is "How can I find docs
that have *anything* set for a given metaname?"  In other words, find docs
where a meta is defined and exclude docs where the meta is not defined.

[*] In that case I didn't use paged results from swish, and instead I'd
fetch all results up to a limit, then cache the results using File::Cache
in Perl.  Very fast for fetching the next page of results.  Also good if
the same query is run often (e.g. you have links that query swish).

Bill Moseley
Received on Tue Jan 7 15:12:03 2003