Skip to main content.
home | support | download

Back to List Archive

Re: different results: swish.cgi, search.cgi

From: Bill Moseley <moseley(at)>
Date: Wed May 26 2004 - 20:35:28 GMT
On Wed, May 26, 2004 at 12:30:16PM -0700, wrote:
> I am using one swish-e index to index my webstite. I was previously using
> swish.cgi (the big cgi file uses forking and builds a .exe command) to
> obtain my result set to display on a web page. Recently, I have created a
> new search page using the Swish-e API, called search.cgi.
> Now, I know that the index is independent of the search pages, and that it
> keeps track of ranking, metnames, etc inside the index.
> Howver, when i run even a simple query on both of the search pages, I get
> different results. Even the rank I obtain from the index file, which is
> passed to the webpage, are different for the 2 seach pages. As well, the 2
> queries usually dont return the exact same number of matches all the tiem.
> Just wondering if anyone has run into a similar problem, or if theres a
> simple solution to this?

Someone asked this not too long ago.  Might be able to find it in the
Archives (anyone remember the poster or the subject??).

The short answer is:

    The binary swish-e uses libswish-e to do the searching

    SWISH::API uses libswish-e to do the searching

That is, they use the same code to do their work.

The way I'd test is write a small program that runs both the
binary and uses the API.  If you see a difference then post the script
and the results to the list.

If you don't see a difference then it's something in the scripts.  There
I'd carefully make sure I'm using the exact same query and the same
index file in both scripts.

Bill Moseley
Received on Wed May 26 13:35:28 2004