Skip to main content.
home | support | download

Back to List Archive

Re: swish-e search

From: <moseley(at)>
Date: Mon Jul 28 2003 - 18:19:39 GMT
On Mon, Jul 28, 2003 at 08:48:04AM -0700, METDAOUI Hussein wrote:
> Hi !
> When i search a word in the index file, i execute
> swish-e -f  <index file> -w <word>
> It gives me 100 results for example.
> When i search a word in the index file and  i want the 25 first results.
> swish-e -f  <index file> -w <word> -m 25
> Il would like to have the 25 first results, the best seller of the 100 
> results and the most popular of the 100 results.
> A way is to perform 3 execution of swish-e ( one for the 25 results and 
> the second for the best seller of the 100 results)
> swish-e -f  <index file> -w <word> -m 25
> swish-e -f  <index file> -w <same word> -m 1 -s <best_seller> desc
> swish-e -f  <index file> -w <same word> -m 1 -s <most_popular> desc
> etc.
> Is there a solution to perform all the searches in one execution of 
> swish-e for decreasing the execution time.

No, there is currently no way to do this.

> What i must modify for this kind of thing ?

In swish-e?  I suppose what I'd do is cache the results data right 
before sorting.  Then when you make another request with the same 
search and index files load the cached data.

I've done that outside of swish -- I'd return all results (e.g. do not 
specify -m) with all the properties I need to sort by and then sort the 
results locally -- and then cache the results (by using the File::Cache 
Perl module) using the search keywords as the key into the cache.

Bill Moseley
Received on Mon Jul 28 18:19:50 2003