Skip to content

Instantly share code, notes, and snippets.

@omega
Created February 10, 2009 14:19
Show Gist options
  • Save omega/61399 to your computer and use it in GitHub Desktop.
Save omega/61399 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use Search::Xapian;
my $doc = Search::Xapian::Document->new();
my $tg = Search::Xapian::TermGenerator->new();
$tg->set_document($doc);
$tg->index_text("sometext", 1);
my $clone = $doc->clone;
my $tg = Search::Xapian::TermGenerator->new();
$tg->set_document($clone);
$tg->index_text_without_positions("somethingelse", 1);
warn $doc->termlist_count . " - " . $clone->termlist_count;
# 2 - 2 at xapiant.pl line 24.
# Shouldn't it be 1 - 2?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment