Olly Betts | 1 Nov 04:28
Favicon
Gravatar

Xapian 1.0.9 released

I've uploaded Xapian 1.0.9 (including Search::Xapian 1.0.9.0), which as
usual you can download from:

http://xapian.org/download

This release fixes a few bugs, improves documentation in a few places,
and makes spelling correction even faster.  It's intended to be a
relatively safe incremental update over 1.0.8.

For a more detailed overview see:

http://trac.xapian.org/wiki/ReleaseOverview/1.0.8

The full lists of user-visible changes are linked to from there, and are
also available via the "[news]" links on the download page.

As always, if you encounter problems, please report them here, or to
the bugtracker.

Cheers,
    Olly
Olly Betts | 1 Nov 05:14
Favicon
Gravatar

Re: Performance of range searches

On Fri, Oct 31, 2008 at 04:41:15PM -0700, Alex Neth wrote:
> Is there any way to improve the performance of range searches?

You didn't say which Xapian version you're using.  One of the changes in
1.0.7 improves value range performance in some cases, so make sure
you're using 1.0.7 or newer.

There are improvements to how values are stored in the development
"chert" backend in SVN trunk.  This isn't taken full advantage of by
value ranges yet, but once that's also fixed, you should find they're
lots faster than currently.

With 1.0.x there are a couple of tricks to help improve the speed (these
will be irrelevant for Xapian >= 1.1.0).  Firstly, make sure that you
aren't storing any values which you don't actually use currently (1.0.x
has to retrieve all values for a document just to get one).  And
secondly store the most speed critical values in the lower numbered
value slots (1.0.x has to unpack the values for a given document
linearly to get the one it wants).

Cheers,
    Olly
Justine Demeyer | 1 Nov 10:44
Picon

Compiling examples

Hi all,

I used Xapian with Python but now I want to try it with C++. So, I tried to
compile the examples :

g++ simpleindex.cc -o simpleindex

But I have some errors :

/tmp/ccl7xhUF.o: In function `main':
simpleindex.cc:(.text+0x12c): undefined reference to
`Xapian::WritableDatabase::WritableDatabase(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, int)'
simpleindex.cc:(.text+0x16e): undefined reference to
`Xapian::TermGenerator::TermGenerator()'
simpleindex.cc:(.text+0x1c9): undefined reference to
`Xapian::Stem::Stem(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
simpleindex.cc:(.text+0x212): undefined reference to
`Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)'
simpleindex.cc:(.text+0x2be): undefined reference to
`Xapian::Document::Document()'
simpleindex.cc:(.text+0x2d0): undefined reference to
`Xapian::Document::set_data(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
simpleindex.cc:(.text+0x2e2): undefined reference to
`Xapian::TermGenerator::set_document(Xapian::Document const&)'
simpleindex.cc:(.text+0x371): undefined reference to
`Xapian::WritableDatabase::add_document(Xapian::Document const&)'
simpleindex.cc:(.text+0x3b0): undefined reference to
(Continue reading)

Jim | 1 Nov 12:19
Favicon

Re: Compiling examples

Justine Demeyer wrote:
> Hi all,
>
> I used Xapian with Python but now I want to try it with C++. So, I tried to
> compile the examples :
>
> g++ simpleindex.cc -o simpleindex
>
> But I have some errors :
>
> /tmp/ccl7xhUF.o: In function `main':
> simpleindex.cc:(.text+0x12c): undefined reference to
> `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, int)'
> simpleindex.cc:(.text+0x16e): undefined reference to
> `Xapian::TermGenerator::TermGenerator()'
> simpleindex.cc:(.text+0x1c9): undefined reference to
> `Xapian::Stem::Stem(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&)'
> simpleindex.cc:(.text+0x212): undefined reference to
> `Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)'
> simpleindex.cc:(.text+0x2be): undefined reference to
> `Xapian::Document::Document()'
> simpleindex.cc:(.text+0x2d0): undefined reference to
> `Xapian::Document::set_data(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&)'
> simpleindex.cc:(.text+0x2e2): undefined reference to
> `Xapian::TermGenerator::set_document(Xapian::Document const&)'
> simpleindex.cc:(.text+0x371): undefined reference to
> `Xapian::WritableDatabase::add_document(Xapian::Document const&)'
(Continue reading)

Alex Neth | 1 Nov 12:34
Gravatar

Re: Performance of range searches

I seem to be using 1.0.5 which the latest version available from the  
site I was linked to last week.'

--
Alex Neth
Liivid Inc / CribQ
www.liivid.com / www.cribq.com
alex <at> liivid.com
+1 206 499 4995
+86 13761577188

On Oct 31, 2008, at 9:14 PM, Olly Betts wrote:

> On Fri, Oct 31, 2008 at 04:41:15PM -0700, Alex Neth wrote:
>> Is there any way to improve the performance of range searches?
>
> You didn't say which Xapian version you're using.  One of the  
> changes in
> 1.0.7 improves value range performance in some cases, so make sure
> you're using 1.0.7 or newer.
>
> There are improvements to how values are stored in the development
> "chert" backend in SVN trunk.  This isn't taken full advantage of by
> value ranges yet, but once that's also fixed, you should find they're
> lots faster than currently.
>
> With 1.0.x there are a couple of tricks to help improve the speed  
> (these
> will be irrelevant for Xapian >= 1.1.0).  Firstly, make sure that you
> aren't storing any values which you don't actually use currently  
(Continue reading)

James Aylett | 1 Nov 13:10

Re: Xapian 1.0.9 released

On Sat, Nov 01, 2008 at 03:28:11AM +0000, Olly Betts wrote:

> For a more detailed overview see:
> 
> http://trac.xapian.org/wiki/ReleaseOverview/1.0.8

You probably mean <http://trac.xapian.org/wiki/ReleaseOverview/1.0.9>

:-)

J

--

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james <at> tartarus.org                               uncertaintydivision.org
Torsten Foertsch | 1 Nov 18:49
Picon
Gravatar

Search::Xapian questions

Alex,

I am writing an indexer using your Search::Xapian module. From what I 
have learned from xapian-omega/omindex.cc I think the following is 
correct. Can you please confirm it?

my $documents=document_iterator($root);
while( defined($_=$documents->()) ) {
  print "processing $_->{name}\n";

  my $doc=Search::Xapian::Document->new;
  $doc->set_data($_->{name});
  $tg->set_document($doc);
  my $incr=0;
  if( length $_->{text} ) {
    $tg->index_text(Encode::encode('utf8', $_->{text}));
    $incr=1;
  }
  if( length $_->{header} ) {
    if( $incr ) {
      $incr=0;
      $tg->increase_termpos(100);
    }
    $tg->index_text(Encode::encode('utf8', $_->{header}), 2);
    $incr=1;
  }
  if( length $_->{title} ) {
    if( $incr ) {
      $incr=0;
      $tg->increase_termpos(100);
(Continue reading)

Olly Betts | 1 Nov 19:04
Favicon
Gravatar

Re: Xapian 1.0.9 released

On Sat, Nov 01, 2008 at 12:10:39PM +0000, James Aylett wrote:
> On Sat, Nov 01, 2008 at 03:28:11AM +0000, Olly Betts wrote:
> 
> > For a more detailed overview see:
> > 
> > http://trac.xapian.org/wiki/ReleaseOverview/1.0.8
> 
> You probably mean <http://trac.xapian.org/wiki/ReleaseOverview/1.0.9>

Ah, yes.  Thanks for spotting that.

Cheers,
    Olly
Olly Betts | 1 Nov 19:09
Favicon
Gravatar

Re: Performance of range searches

On Sat, Nov 01, 2008 at 04:34:17AM -0700, Alex Neth wrote:
> I seem to be using 1.0.5 which the latest version available from the  
> site I was linked to last week.'

The latest sources are available from http://xapian.org/download

You don't say what platform this is, but it sounds like you're using 
pre-built packages from some third party - we don't really have any
control over how up-to-date such packages are.  So if you want newer
packages, you'll either need to politely request whoever it is to update
their packages, or build Xapian for yourself from source.

Cheers,
    Olly
Olly Betts | 1 Nov 19:17
Favicon
Gravatar

Re: Compiling examples

On Sat, Nov 01, 2008 at 07:19:42AM -0400, Jim wrote:
> Justine Demeyer wrote:
> > Hi all,
> >
> > I used Xapian with Python but now I want to try it with C++. So, I tried to
> > compile the examples :
> >
> > g++ simpleindex.cc -o simpleindex

Note that you don't actually need to compile the examples yourself -
they're built by the xapian-core build system.  But it's a useful small
testcase for problems building with Xapian.

> > But I have some errors :
> >
> > /tmp/ccl7xhUF.o: In function `main':
> > simpleindex.cc:(.text+0x12c): undefined reference to
> > `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char,
> > [...]
>
> This worked for me:
> g++ -o simpleindex -L/usr/local/lib -l xapian simpleindex.cc

It's better (more portable and more future-proof) to use xapian-config
to get the required flags.  (Also, "-lxapian" is more portable than
"-l xapian" I believe).

This is documented here (and possibly elsewhere too):

http://xapian.org/docs/quickstart.html
(Continue reading)


Gmane