[Zebralist] Can't get fuzzy search to work in Zebra 2.0.6

Christopher Morgan morgan at acm.org
Mon Jan 1 21:48:17 CET 2007


Marc,

It turns out that the reason why I couldn’t get fuzzy search to work was
because of a bug in a cgi script that hid the fact that I was getting hits
from Zebra fuzzy queries. (When I tried your fix, I was testing with the yaz
client, so I didn’t spot the problem in my script). I have now fixed the
bug, and everything works correctly. 

Thanks again for your help!

- Chris

-----Original Message-----
From: zebralist-bounces at lists.indexdata.dk
[mailto:zebralist-bounces at lists.indexdata.dk] On Behalf Of marc
Sent: Saturday, December 30, 2006 3:33 PM
To: Zebra Information Server
Subject: Re: [Zebralist] Can't get fuzzy search to work in Zebra 2.0.6

Christopher Morgan wrote:
> Marc,
> 
> I carried out your instructions, and got exactly the results you
indicated.
> I reindexed my data (just to be on the safe side), and fuzzy searching 
> is working on it!
> 

Fine!

> BTW, did the version of idzebra that I downloaded from you contain new 
> code to fix the problem?
> 

I do not believe so ... I never had a problem with fuzzy searches.

> Many thanks! 

You're welcome.

And a happy new year!


Marc Cromme, Index Data

> 
> - Chris
> 
> -----Original Message-----
> From: zebralist-bounces at lists.indexdata.dk
> [mailto:zebralist-bounces at lists.indexdata.dk] On Behalf Of Christopher 
> Morgan
> Sent: Thursday, December 28, 2006 8:43 AM
> To: 'Zebra Information Server'
> Subject: RE: [Zebralist] Can't get fuzzy search to work in Zebra 2.0.6
> 
> Marc,
> 
> libxml2 is on my system but I'll have to hunt down and install a copy 
> of libxslt1. I'll get back to you, probably tomorrow.
> 
> Thanks!
> 
> - Chris
> 
> -----Original Message-----
> From: zebralist-bounces at lists.indexdata.dk
> [mailto:zebralist-bounces at lists.indexdata.dk] On Behalf Of marc
> Sent: Thursday, December 28, 2006 5:01 AM
> To: Zebra Information Server
> Subject: Re: [Zebralist] Can't get fuzzy search to work in Zebra 2.0.6
> 
> Christopher Morgan wrote:
>> Hi,
>>  
>> I am trying to test the fuzzy search feature in Zebra 2.0.6, but I 
>> can't get it to work.
>>  
>> The following two searches both return one hit:
>>  
>> @attr 1=1016 "tangrams"
>> @attr 1=1016 @attr 5=103 "tangrams"
>>  
>> I then tested the fuzzy searching by changing one letter in the 
>> search
> word:
>>  
>> @attr 1=1016 @attr 5=103 "tangramx"
>>  
>> I got no hits. Do I have to change any settings in the configuration 
>> files to enable fuzzy searching? I read the documentation, but saw 
>> nothing about having to do this.
>>  
> 
> No, fuzzy searching works without any special configuration settings.
> 
> What you report might very well be a bug. However, I just tried to 
> reproduce it with one of our data sets, and could not, which makes it 
> a bit hard to fix.
> 
> May I ask you to try this (you need to have installed libxml2 and
> libxslt1 development headers on your platform)
> 
> wget http://ftp.indexdata.dk/pub/zebra/idzebra-2.0.6.tar.gz
> tar xzvf idzebra-2.0.6.tar.gz
> cd idzebra-2.0.6
> ./configure
>   make && make check
> 
> Just to make sure all build unit tests run as expected. If this works 
> out OK for you, please continue
> 
> cd examples/alvis-oai/
> 
> Indexing:
> 
>     ../../index/zebraidx -c conf/zebra.cfg init
>     ../../index/zebraidx -c conf/zebra.cfg update data/*.xml
>     ../../index/zebraidx -c conf/zebra.cfg commit
> 
> 
> Starting the SRU/SRW/Z39.50 server:
> 
>     ../../index/zebrasrv -f yazserver.xml
> 
> 
> 
> start a yaz-client for a search:
> 
> 
> yaz-client localhost:9999
> 
> Z> scan @attr 1=dc_title comput
> Received ScanResponse
> 20 entries, position=1
> * computation (4)
>    computations (2)
>    computer (2)
>    computers (1)
>    computing (1)
> 
> shows that straight search for 'computation' should give 4 hits, and 
> fuzzy search for the same should give 6 hits. (one added char at the 
> end of the
> term)
> 
> please verify:
> Z> find  @attr 1=dc_title computation
> Z> find  @attr 1=dc_title @attr 5=103 computation
> 
> also, straight search for 'computetions' (one typo) should give zero 
> hits, and fuzzy search should give 2 hits.
> 
> Z> find  @attr 1=dc_title computetions find  @attr 1=dc_title @attr 
> Z> 5=103 computetions
> 
> similar, if a character at the beginning of the term is changed, 
> should give zero and 2 hits
> 
> Z> find  @attr 1=dc_title xomputations find  @attr 1=dc_title @attr 
> Z> 5=103 xomputations
> 
> 
> Please try this verbatim and report back.
> 
> If you get faulty behaviour with these simple tests, I'd like you to 
> provide exact platform information.
> 
> If you get the same correct results on your platform, but your own 
> example still fails, I'd like in addition to you rplatform info to see 
> your config files and data files to investigate the case.
> 
> 
> Thanks for bringing this potential bug to our attention!
> 
> 
> Marc Cromme, Index Data
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> Many thanks!
>>  
>> - Chris Morgan
>>
>>
>> ---------------------------------------------------------------------
>> -
>> --
>>
>> _______________________________________________
>> Zebralist mailing list
>> Zebralist at lists.indexdata.dk
>> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist
> 
> 


-- 

Marc Cromme
M.Sc and Ph.D in Mathematical Modelling and Computation Senior Developer,
Project Manager

Index Data Aps
Købmagergade 43, 2
1150 Copenhagen K.
Denmark

tel: +45 3341 0100
fax: +45 3341 0101

http://www.indexdata.com

INDEX DATA Means Business
for Open Source and Open Standards





_______________________________________________
Zebralist mailing list
Zebralist at lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist




More information about the Zebralist mailing list