Fix build with xapian-core < 1.4.10
[xapian.git] / search-xapian / XS / TermGenerator.xs
blob3f9679621bfbd52ea0458c13388e8ef70bd2c42e
1 MODULE = Search::Xapian                 PACKAGE = Search::Xapian::TermGenerator
3 PROTOTYPES: ENABLE
5 TermGenerator *
6 new0()
7     CODE:
8         RETVAL = XAPIAN_PERL_NEW(TermGenerator, ());
9     OUTPUT:
10         RETVAL
12 void
13 TermGenerator::set_stemmer(stemmer)
14     Stem * stemmer
15     CODE:
16         THIS->set_stemmer(*stemmer);
18 void
19 TermGenerator::set_stopper(stopper)
20     Stopper * stopper
21     CODE:
22         // Keep a reference to the currently set object.
23         XAPIAN_PERL_REF(TermGenerator, THIS, stopper, ST(1));
24         THIS->set_stopper(stopper);
26 void
27 TermGenerator::set_database(db)
28     WritableDatabase * db
29     CODE:
30         THIS->set_database(*db);
32 void
33 TermGenerator::set_document(Document * doc)
34     CODE:
35         THIS->set_document(*doc);
37 Document *
38 TermGenerator::get_document()
39     CODE:
40         RETVAL = new Document(THIS->get_document());
41     OUTPUT:
42         RETVAL
44 void
45 TermGenerator::index_text(text, weight = 1, prefix = NO_INIT)
46     string text
47     termcount weight
48     string prefix
50 int
51 TermGenerator::set_flags(int toggle, int mask = 0)
52     CODE:
53         RETVAL = THIS->set_flags(TermGenerator::flags(toggle),
54                                  TermGenerator::flags(mask));
55     OUTPUT:
56         RETVAL
58 void
59 TermGenerator::index_text_without_positions(text, weight = 1, prefix = NO_INIT)
60     string text
61     termcount weight
62     string prefix
64 void
65 TermGenerator::increase_termpos(termcount delta = 100)
67 termcount
68 TermGenerator::get_termpos()
70 void
71 TermGenerator::set_termpos(termcount termpos)
73 string
74 TermGenerator::get_description()
76 void
77 TermGenerator::DESTROY()
78     CODE:
79         XAPIAN_PERL_DESTROY(TermGenerator, THIS);