[ic] swish search - quotes
dan at berganconsulting.com
Wed Feb 7 23:32:37 EST 2007
Quoting Kevin Walsh <kevin at cursor.biz>:
> Dan Bergan <dan at berganconsulting.com> wrote:
>> Quoting Kevin Walsh <kevin at cursor.biz>:
>> > Try the Vend::Swish2 module from Interchange 5.5 (CVS). The setup is
>> > the same, except change "Swish" to "Swish2" in config files. You should
>> > be able to just dump the lib/Vend/Swish2.pm file into any 5.4.x version,
>> > and probably most other versions too.
>> > Maybe Swish2 will fix your problem and maybe it won't. I haven't looked
>> > into it. Swish2 makes use of the SWISH::API module (and friends) instead
>> > of building up a swish-e command line and executing it in a shell. As
>> > there's no shell, there's no need to remove "unsafe" characters from the
>> > search spec.
>> > My RTFM website uses Interchange 5.5.0 and Vend::Swish2, so you could
>> > try out a couple of searches there to see if you get the kind of results
>> > you might expect.
>> I tried it out a few times on your site, and it doesn't seem to be
>> doing exactly what I'm looking for.
>> I searched for the phrase:
>> "area tag produces"
>> (which is a phrase that is found on the Area tag page). It found the
>> Area tag page as the first result, but it also returned two other
>> pages. Those pages had all the words (or variations of the words),
>> but not the exact phrase.
> Well, that's probably just the nature of a Swish search. Your request
> came up first, followed by other possibilities. There may be an option
> to make Swish return exactly what is asked for, with no "lower score
> I haven't looked into the matter, but I suspect that it won't take a lot
> of investigative work to tune up your search. I'd start with the Swish-e
> config file.
> I'm using "FuzzyIndexingMode Stemming_en2" in the Swish-e config, which
> may account for the "exact match followed by other suggestions" you were
> presented with.
I don't think that's the case with a "phrase search". I can search
with swish-e from the command line:
swish-e -w word1 word2 -f /path/to/index
It will do as you say above - (I do use stemming) - if "word1" and
"word2" appear anywhere in the file, that page will show up in the
search results. (And, by the same token, if the page contained
"word1ing" or "word2s" it will still show up.
However, if the command is:
swish-e -w \"word1 word2\" -f /path/to/index
Then, the only pages that will show up in the results, have the exact
phrase "word1 word2". A page that contains "word1 word3 word2" will
NOT appear in the results. (I have not yet tested how stemming
affects this case).
So, if phrase searching was working correctly, the only page that
should appear in the results for the search above ("area tag
produces") is the Area tag page.
More information about the interchange-users