<div>Olly,</div>
<div> </div>
<div>It works except the city is spelled praha, prague is the english version</div>
<div><a href="http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=praha">http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=praha</a></div>
<div> </div>
<div>I fix the content-type becaused I forgot to print the header from Perl script. One bug is still there that it works only with one term based on the Perl demo script that came with Xapian. As soon as user type two terms nothing come up. I am not sure if this is bug of Perl API or is mine.
</div>
<div> </div>
<div>example with no results:</div>
<div><a href="http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=prahga+hrad">http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=prahga+hrad</a></div>
<div> </div>
<div> </div>
<div>---- one term is called from the Perl script example like this:</div>
<div> my $enq = $db->enquire( 'Praha' ); </div>
<div> </div>
<div>--- two terms is called like this?</div>
<div>my $enq = $db->enquire( 'Praha Hrad' ); </div>
<div> </div>
<div>I do not get any result back, I am wondering if there is another API I suppose to use .</div>
<div> </div>
<div>Thanks, Xapian was very easy to implement and it is the fastest from all search engine I build, that includes MySQL 5.0, MS SQL 2005, Lucene and some other custom commercial.<br> </div>
<div> </div>
<div> </div>
<div>#!/usr/bin/perl<br>#-----------------------------------------#<br>use Search::Xapian;<br><br> my $db = Search::Xapian::Database->new( '/path/to/database' );</div>
<div><br> my $enq = $db->enquire( 'Praha' );<br><br> printf "Running query '%s'\n", $enq->get_query()->get_description();<br><br> my @matches = $enq->matches(0, 20);<br><br> print scalar(@matches) . " results found\n";
<br><br> foreach my $match ( @matches )<br> {<br> my $doc = $match->get_document();<br> printf "ID %d %d%% [ %s ]\n", $match->get_docid(), $match->get_percent(), $doc->get_data();<br> }<br>
</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 3/1/06, <b class="gmail_sendername">Olly Betts</b> <<a href="mailto:olly@survex.com">olly@survex.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Tue, Feb 28, 2006 at 11:08:52PM -0800, Kevin SoftDev wrote:<br>> Thanks for your help. I was able to deploy simple search engine
<br>> <a href="http://nitra.net">http://nitra.net</a> in Czech and Slovak language. I still need to figure out<br>> how can I get multiple terms search and paging.<br><br>There seems to be a content-type bug - the results are served as
<br>text/plain so I get the HTML source (in Firefox at least):<br><br><a href="http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=prague">http://nitra.net/cgi-bin/hladaj.cgi?a=q&q=prague</a><br><br>> I know the stemmer is in English, but do you think they will notice?
<br><br>It's actually probably better to not stem than to stem in a different<br>language, unless the languages are very similar morphologically. I<br>doubt English and Czech or Slovak are similar enough for it to be<br>
beneficial, and it may be harmful.<br><br>Czech and Slovak may be similar enough to each other for a Slovak<br>stemmer to be beneficial on Czech text and vice versa but snowball<br>doesn't include either at present.<br><br>
Cheers,<br> Olly<br></blockquote></div><br>