Skip to main content.
home | support | download

Back to List Archive

Phrase searching weirdness

From: Philip Mak <pmak(at)>
Date: Sat May 05 2001 - 01:49:20 GMT
Summary: Phrase searching doesn't seem to be working correctly. I tell it
to search for '"Philip Mak"', but it returns documents that have both
words but not in that order. Here is a very simple example that shows this
happening on version 2.1-dev-20.

First, I create two files. The first file contains the text "Philip Mak".
The second file contains the test "Mak, Philip". Then I create the
swish-e index, and search for '"Philip Mak"'. The problem is that swish-e
returns both documents, instead of just the first.

Am I doing something wrong?

qd@animeglobe [~/software/swish]# mkdir test
qd@animeglobe [~/software/swish]# cd test
qd@animeglobe [~/software/swish/test]# echo "Philip Mak" > 1
qd@animeglobe [~/software/swish/test]# echo "Mak, Philip" > 2
qd@animeglobe [~/software/swish/test]# cd ..
qd@animeglobe [~/software/swish]# ./swish-e -c user.config -f test.dat -i
Indexing Data Source: "File-System"
Indexing test..

Checking dir "test"...
  1 - Using DEFAULT filter -  (2 words)
  2 - Using DEFAULT filter -  (2 words)

Removing very common words...
no words removed.
Writing main index...
Writing header ...
Writing index entries ...
Sorting Words alphabetically
Writing stopwords ...
Writing buzzwords ...
2 unique words indexed.
Writing file index...
Writing file list ...
Writing file offsets ...
Writing MetaNames ...
Writing Location lookup tables ...
Writing offsets (2)...
2 files indexed.
Running time: Less than a second.
Indexing done!
qd@animeglobe [~/software/swish]# ./swish-e -f test.dat -w '"Philip Mak"'
# SWISH format: 2.1-dev-20
# Search words: "Philip Mak"
# Number of hits: 2
# Search time: 0.000 seconds
# Run time: 0.007 seconds
1000 test/2 "2" 12
1000 test/1 "1" 11

-Philip Mak (
Received on Sat May 5 01:50:22 2001