1 2 // File: index.xml 3 4 // File: classXapian_1_1AssertionError.xml 5 %feature("docstring") Xapian::AssertionError " 6 7 AssertionError is thrown if a logical assertion inside Xapian fails. 8 9 In a debug build of Xapian, a failed assertion in the core library 10 code will cause AssertionError to be thrown. 11 12 This represents a bug in Xapian (either an invariant, precondition, 13 etc has been violated, or the assertion is incorrect!) "; 14 15 %feature("docstring") Xapian::AssertionError::AssertionError " 16 17 General purpose constructor. 18 19 Xapian::AssertionError::AssertionError(const std::string &msg_, const 20 std::string &context_=std::string(), int errno_=0) 21 22 Parameters: 23 ----------- 24 25 msg_: Message giving details of the error, intended for human 26 consumption. 27 28 context_: Optional context information for this error. 29 30 errno_: Optional errno value associated with this error. "; 31 32 %feature("docstring") Xapian::AssertionError::AssertionError " 33 34 Construct from message and errno value. 35 36 Xapian::AssertionError::AssertionError(const std::string &msg_, int 37 errno_) 38 39 Parameters: 40 ----------- 41 42 msg_: Message giving details of the error, intended for human 43 consumption. 44 45 errno_: Optional errno value associated with this error. "; 46 47 48 // File: classXapian_1_1BB2Weight.xml 49 %feature("docstring") Xapian::BB2Weight " 50 51 This class implements the BB2 weighting scheme. 52 53 BB2 is a representative scheme of the Divergence from Randomness 54 Framework by Gianni Amati. 55 56 It uses the Bose-Einstein probabilistic distribution (B) along with 57 Stirling's power approximation, the Bernoulli method to find the 58 aftereffect of sampling (B) and the second wdf normalization proposed 59 by Amati to normalize the wdf in the document to the length of the 60 document (H2). 61 62 For more information about the DFR Framework and the BB2 scheme, 63 please refer to : Gianni Amati and Cornelis Joost Van Rijsbergen 64 Probabilistic models of information retrieval based on measuring the 65 divergence from randomness ACM Transactions on Information Systems 66 (TOIS) 20, (4), 2002, pp. 357-389. "; 67 68 %feature("docstring") Xapian::BB2Weight::BB2Weight " 69 70 Construct a BB2Weight. 71 72 Xapian::BB2Weight::BB2Weight(double c) 73 74 Parameters: 75 ----------- 76 77 c: A strictly positive parameter controlling the extent of the 78 normalization of the wdf to the document length. A default value of 1 79 is suitable for longer queries but it may need to be changed for 80 shorter queries. For more information, please refer to Gianni Amati's 81 PHD thesis titled Probabilistic Models for Information Retrieval based 82 on Divergence from Randomness. "; 83 84 %feature("docstring") Xapian::BB2Weight::BB2Weight "Xapian::BB2Weight::BB2Weight() "; 85 86 %feature("docstring") Xapian::BB2Weight::name " 87 88 Return the name of this weighting scheme. 89 90 std::string Xapian::BB2Weight::name() const 91 92 This name is used by the remote backend. It is passed along with the 93 serialised parameters to the remote server so that it knows which 94 class to create. 95 96 Return the full namespace-qualified name of your class here - if your 97 class is called FooWeight, return \"FooWeight\" from this method ( 98 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 99 100 If you don't want to support the remote backend, you can use the 101 default implementation which simply returns an empty string. "; 102 103 %feature("docstring") Xapian::BB2Weight::serialise " 104 105 Return this object's parameters serialised as a single string. 106 107 std::string Xapian::BB2Weight::serialise() const 108 109 If you don't want to support the remote backend, you can use the 110 default implementation which simply throws Xapian::UnimplementedError. 111 "; 112 113 %feature("docstring") Xapian::BB2Weight::unserialise " 114 115 Unserialise parameters. 116 117 BB2Weight* Xapian::BB2Weight::unserialise(const std::string 118 &serialised) const 119 120 This method unserialises parameters serialised by the serialise() 121 method and allocates and returns a new object initialised with them. 122 123 If you don't want to support the remote backend, you can use the 124 default implementation which simply throws Xapian::UnimplementedError. 125 126 Note that the returned object will be deallocated by Xapian after use 127 with \"delete\". If you want to handle the deletion in a special way 128 (for example when wrapping the Xapian API for use from another 129 language) then you can define a static operator delete method in your 130 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 131 132 Parameters: 133 ----------- 134 135 serialised: A string containing the serialised parameters. "; 136 137 %feature("docstring") Xapian::BB2Weight::get_sumpart " 138 139 Calculate the weight contribution for this object's term to a 140 document. 141 142 double Xapian::BB2Weight::get_sumpart(Xapian::termcount wdf, 143 Xapian::termcount doclen, Xapian::termcount uniqterms) const 144 145 The parameters give information about the document which may be used 146 in the calculations: 147 148 Parameters: 149 ----------- 150 151 wdf: The within document frequency of the term in the document. 152 153 doclen: The document's length (unnormalised). 154 155 uniqterms: Number of unique terms in the document (used for absolute 156 smoothing). "; 157 158 %feature("docstring") Xapian::BB2Weight::get_maxpart " 159 160 Return an upper bound on what get_sumpart() can return for any 161 document. 162 163 double Xapian::BB2Weight::get_maxpart() const 164 165 This information is used by the matcher to perform various 166 optimisations, so strive to make the bound as tight as possible. "; 167 168 %feature("docstring") Xapian::BB2Weight::get_sumextra " 169 170 Calculate the term-independent weight component for a document. 171 172 double Xapian::BB2Weight::get_sumextra(Xapian::termcount doclen, 173 Xapian::termcount uniqterms) const 174 175 The parameter gives information about the document which may be used 176 in the calculations: 177 178 Parameters: 179 ----------- 180 181 doclen: The document's length (unnormalised). 182 183 uniqterms: The number of unique terms in the document. "; 184 185 %feature("docstring") Xapian::BB2Weight::get_maxextra " 186 187 Return an upper bound on what get_sumextra() can return for any 188 document. 189 190 double Xapian::BB2Weight::get_maxextra() const 191 192 This information is used by the matcher to perform various 193 optimisations, so strive to make the bound as tight as possible. "; 194 195 196 // File: classXapian_1_1BM25PlusWeight.xml 197 %feature("docstring") Xapian::BM25PlusWeight " 198 199 Xapian::Weight subclass implementing the BM25+ probabilistic formula. 200 "; 201 202 %feature("docstring") Xapian::BM25PlusWeight::BM25PlusWeight " 203 204 Construct a BM25PlusWeight. 205 206 Xapian::BM25PlusWeight::BM25PlusWeight(double k1, double k2, double 207 k3, double b, double min_normlen, double delta) 208 209 Parameters: 210 ----------- 211 212 k1: A non-negative parameter controlling how influential within- 213 document- frequency (wdf) is. k1=0 means that wdf doesn't affect the 214 weights. The larger k1 is, the more wdf influences the weights. 215 (default 1) 216 217 k2: A non-negative parameter which controls the strength of a 218 correction factor which depends upon query length and normalised 219 document length. k2=0 disable this factor; larger k2 makes it 220 stronger. The paper which describes BM25+ ignores BM25's document- 221 independent component (so implicitly k2=0), but we support non-zero k2 222 too. (default 0) 223 224 k3: A non-negative parameter controlling how influential within- 225 query- frequency (wqf) is. k3=0 means that wqf doesn't affect the 226 weights. The larger k3 is, the more wqf influences the weights. 227 (default 1) 228 229 b: A parameter between 0 and 1, controlling how strong the document 230 length normalisation of wdf is. 0 means no normalisation; 1 means full 231 normalisation. (default 0.5) 232 233 min_normlen: A parameter specifying a minimum value for normalised 234 document length. Normalised document length values less than this will 235 be clamped to this value, helping to prevent very short documents 236 getting large weights. (default 0.5) 237 238 delta: A parameter for pseudo tf value to control the scale of the tf 239 lower bound. Delta(δ) can be tuned for example from 0.0 to 1.5 but 240 BM25+ can still work effectively across collections with a fixed δ = 241 1.0. (default 1.0) "; 242 243 %feature("docstring") Xapian::BM25PlusWeight::BM25PlusWeight "Xapian::BM25PlusWeight::BM25PlusWeight() "; 244 245 %feature("docstring") Xapian::BM25PlusWeight::name " 246 247 Return the name of this weighting scheme. 248 249 std::string Xapian::BM25PlusWeight::name() const 250 251 This name is used by the remote backend. It is passed along with the 252 serialised parameters to the remote server so that it knows which 253 class to create. 254 255 Return the full namespace-qualified name of your class here - if your 256 class is called FooWeight, return \"FooWeight\" from this method ( 257 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 258 259 If you don't want to support the remote backend, you can use the 260 default implementation which simply returns an empty string. "; 261 262 %feature("docstring") Xapian::BM25PlusWeight::serialise " 263 264 Return this object's parameters serialised as a single string. 265 266 std::string Xapian::BM25PlusWeight::serialise() const 267 268 If you don't want to support the remote backend, you can use the 269 default implementation which simply throws Xapian::UnimplementedError. 270 "; 271 272 %feature("docstring") Xapian::BM25PlusWeight::unserialise " 273 274 Unserialise parameters. 275 276 BM25PlusWeight* Xapian::BM25PlusWeight::unserialise(const std::string 277 &serialised) const 278 279 This method unserialises parameters serialised by the serialise() 280 method and allocates and returns a new object initialised with them. 281 282 If you don't want to support the remote backend, you can use the 283 default implementation which simply throws Xapian::UnimplementedError. 284 285 Note that the returned object will be deallocated by Xapian after use 286 with \"delete\". If you want to handle the deletion in a special way 287 (for example when wrapping the Xapian API for use from another 288 language) then you can define a static operator delete method in your 289 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 290 291 Parameters: 292 ----------- 293 294 serialised: A string containing the serialised parameters. "; 295 296 %feature("docstring") Xapian::BM25PlusWeight::get_sumpart " 297 298 Calculate the weight contribution for this object's term to a 299 document. 300 301 double Xapian::BM25PlusWeight::get_sumpart(Xapian::termcount wdf, 302 Xapian::termcount doclen, Xapian::termcount uniqterm) const 303 304 The parameters give information about the document which may be used 305 in the calculations: 306 307 Parameters: 308 ----------- 309 310 wdf: The within document frequency of the term in the document. 311 312 doclen: The document's length (unnormalised). 313 314 uniqterms: Number of unique terms in the document (used for absolute 315 smoothing). "; 316 317 %feature("docstring") Xapian::BM25PlusWeight::get_maxpart " 318 319 Return an upper bound on what get_sumpart() can return for any 320 document. 321 322 double Xapian::BM25PlusWeight::get_maxpart() const 323 324 This information is used by the matcher to perform various 325 optimisations, so strive to make the bound as tight as possible. "; 326 327 %feature("docstring") Xapian::BM25PlusWeight::get_sumextra " 328 329 Calculate the term-independent weight component for a document. 330 331 double Xapian::BM25PlusWeight::get_sumextra(Xapian::termcount doclen, 332 Xapian::termcount uniqterms) const 333 334 The parameter gives information about the document which may be used 335 in the calculations: 336 337 Parameters: 338 ----------- 339 340 doclen: The document's length (unnormalised). 341 342 uniqterms: The number of unique terms in the document. "; 343 344 %feature("docstring") Xapian::BM25PlusWeight::get_maxextra " 345 346 Return an upper bound on what get_sumextra() can return for any 347 document. 348 349 double Xapian::BM25PlusWeight::get_maxextra() const 350 351 This information is used by the matcher to perform various 352 optimisations, so strive to make the bound as tight as possible. "; 353 354 355 // File: classXapian_1_1BM25Weight.xml 356 %feature("docstring") Xapian::BM25Weight " 357 358 Xapian::Weight subclass implementing the BM25 probabilistic formula. 359 "; 360 361 %feature("docstring") Xapian::BM25Weight::BM25Weight " 362 363 Construct a BM25Weight. 364 365 Xapian::BM25Weight::BM25Weight(double k1, double k2, double k3, double 366 b, double min_normlen) 367 368 Parameters: 369 ----------- 370 371 k1: A non-negative parameter controlling how influential within- 372 document- frequency (wdf) is. k1=0 means that wdf doesn't affect the 373 weights. The larger k1 is, the more wdf influences the weights. 374 (default 1) 375 376 k2: A non-negative parameter which controls the strength of a 377 correction factor which depends upon query length and normalised 378 document length. k2=0 disable this factor; larger k2 makes it 379 stronger. (default 0) 380 381 k3: A non-negative parameter controlling how influential within- 382 query- frequency (wqf) is. k3=0 means that wqf doesn't affect the 383 weights. The larger k3 is, the more wqf influences the weights. 384 (default 1) 385 386 b: A parameter between 0 and 1, controlling how strong the document 387 length normalisation of wdf is. 0 means no normalisation; 1 means full 388 normalisation. (default 0.5) 389 390 min_normlen: A parameter specifying a minimum value for normalised 391 document length. Normalised document length values less than this will 392 be clamped to this value, helping to prevent very short documents 393 getting large weights. (default 0.5) "; 394 395 %feature("docstring") Xapian::BM25Weight::BM25Weight "Xapian::BM25Weight::BM25Weight() "; 396 397 %feature("docstring") Xapian::BM25Weight::name " 398 399 Return the name of this weighting scheme. 400 401 std::string Xapian::BM25Weight::name() const 402 403 This name is used by the remote backend. It is passed along with the 404 serialised parameters to the remote server so that it knows which 405 class to create. 406 407 Return the full namespace-qualified name of your class here - if your 408 class is called FooWeight, return \"FooWeight\" from this method ( 409 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 410 411 If you don't want to support the remote backend, you can use the 412 default implementation which simply returns an empty string. "; 413 414 %feature("docstring") Xapian::BM25Weight::serialise " 415 416 Return this object's parameters serialised as a single string. 417 418 std::string Xapian::BM25Weight::serialise() const 419 420 If you don't want to support the remote backend, you can use the 421 default implementation which simply throws Xapian::UnimplementedError. 422 "; 423 424 %feature("docstring") Xapian::BM25Weight::unserialise " 425 426 Unserialise parameters. 427 428 BM25Weight* Xapian::BM25Weight::unserialise(const std::string 429 &serialised) const 430 431 This method unserialises parameters serialised by the serialise() 432 method and allocates and returns a new object initialised with them. 433 434 If you don't want to support the remote backend, you can use the 435 default implementation which simply throws Xapian::UnimplementedError. 436 437 Note that the returned object will be deallocated by Xapian after use 438 with \"delete\". If you want to handle the deletion in a special way 439 (for example when wrapping the Xapian API for use from another 440 language) then you can define a static operator delete method in your 441 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 442 443 Parameters: 444 ----------- 445 446 serialised: A string containing the serialised parameters. "; 447 448 %feature("docstring") Xapian::BM25Weight::get_sumpart " 449 450 Calculate the weight contribution for this object's term to a 451 document. 452 453 double Xapian::BM25Weight::get_sumpart(Xapian::termcount wdf, 454 Xapian::termcount doclen, Xapian::termcount uniqterm) const 455 456 The parameters give information about the document which may be used 457 in the calculations: 458 459 Parameters: 460 ----------- 461 462 wdf: The within document frequency of the term in the document. 463 464 doclen: The document's length (unnormalised). 465 466 uniqterms: Number of unique terms in the document (used for absolute 467 smoothing). "; 468 469 %feature("docstring") Xapian::BM25Weight::get_maxpart " 470 471 Return an upper bound on what get_sumpart() can return for any 472 document. 473 474 double Xapian::BM25Weight::get_maxpart() const 475 476 This information is used by the matcher to perform various 477 optimisations, so strive to make the bound as tight as possible. "; 478 479 %feature("docstring") Xapian::BM25Weight::get_sumextra " 480 481 Calculate the term-independent weight component for a document. 482 483 double Xapian::BM25Weight::get_sumextra(Xapian::termcount doclen, 484 Xapian::termcount uniqterms) const 485 486 The parameter gives information about the document which may be used 487 in the calculations: 488 489 Parameters: 490 ----------- 491 492 doclen: The document's length (unnormalised). 493 494 uniqterms: The number of unique terms in the document. "; 495 496 %feature("docstring") Xapian::BM25Weight::get_maxextra " 497 498 Return an upper bound on what get_sumextra() can return for any 499 document. 500 501 double Xapian::BM25Weight::get_maxextra() const 502 503 This information is used by the matcher to perform various 504 optimisations, so strive to make the bound as tight as possible. "; 505 506 507 // File: classXapian_1_1BoolWeight.xml 508 %feature("docstring") Xapian::BoolWeight " 509 510 Class implementing a \"boolean\" weighting scheme. 511 512 This weighting scheme gives all documents zero weight. "; 513 514 %feature("docstring") Xapian::BoolWeight::BoolWeight " 515 516 Construct a BoolWeight. 517 518 Xapian::BoolWeight::BoolWeight() "; 519 520 %feature("docstring") Xapian::BoolWeight::name " 521 522 Return the name of this weighting scheme. 523 524 std::string Xapian::BoolWeight::name() const 525 526 This name is used by the remote backend. It is passed along with the 527 serialised parameters to the remote server so that it knows which 528 class to create. 529 530 Return the full namespace-qualified name of your class here - if your 531 class is called FooWeight, return \"FooWeight\" from this method ( 532 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 533 534 If you don't want to support the remote backend, you can use the 535 default implementation which simply returns an empty string. "; 536 537 %feature("docstring") Xapian::BoolWeight::serialise " 538 539 Return this object's parameters serialised as a single string. 540 541 std::string Xapian::BoolWeight::serialise() const 542 543 If you don't want to support the remote backend, you can use the 544 default implementation which simply throws Xapian::UnimplementedError. 545 "; 546 547 %feature("docstring") Xapian::BoolWeight::unserialise " 548 549 Unserialise parameters. 550 551 BoolWeight* Xapian::BoolWeight::unserialise(const std::string 552 &serialised) const 553 554 This method unserialises parameters serialised by the serialise() 555 method and allocates and returns a new object initialised with them. 556 557 If you don't want to support the remote backend, you can use the 558 default implementation which simply throws Xapian::UnimplementedError. 559 560 Note that the returned object will be deallocated by Xapian after use 561 with \"delete\". If you want to handle the deletion in a special way 562 (for example when wrapping the Xapian API for use from another 563 language) then you can define a static operator delete method in your 564 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 565 566 Parameters: 567 ----------- 568 569 serialised: A string containing the serialised parameters. "; 570 571 %feature("docstring") Xapian::BoolWeight::get_sumpart " 572 573 Calculate the weight contribution for this object's term to a 574 document. 575 576 double Xapian::BoolWeight::get_sumpart(Xapian::termcount wdf, 577 Xapian::termcount doclen, Xapian::termcount uniqterms) const 578 579 The parameters give information about the document which may be used 580 in the calculations: 581 582 Parameters: 583 ----------- 584 585 wdf: The within document frequency of the term in the document. 586 587 doclen: The document's length (unnormalised). 588 589 uniqterms: Number of unique terms in the document (used for absolute 590 smoothing). "; 591 592 %feature("docstring") Xapian::BoolWeight::get_maxpart " 593 594 Return an upper bound on what get_sumpart() can return for any 595 document. 596 597 double Xapian::BoolWeight::get_maxpart() const 598 599 This information is used by the matcher to perform various 600 optimisations, so strive to make the bound as tight as possible. "; 601 602 %feature("docstring") Xapian::BoolWeight::get_sumextra " 603 604 Calculate the term-independent weight component for a document. 605 606 double Xapian::BoolWeight::get_sumextra(Xapian::termcount doclen, 607 Xapian::termcount uniqterms) const 608 609 The parameter gives information about the document which may be used 610 in the calculations: 611 612 Parameters: 613 ----------- 614 615 doclen: The document's length (unnormalised). 616 617 uniqterms: The number of unique terms in the document. "; 618 619 %feature("docstring") Xapian::BoolWeight::get_maxextra " 620 621 Return an upper bound on what get_sumextra() can return for any 622 document. 623 624 double Xapian::BoolWeight::get_maxextra() const 625 626 This information is used by the matcher to perform various 627 optimisations, so strive to make the bound as tight as possible. "; 628 629 630 // File: classXapian_1_1Compactor.xml 631 %feature("docstring") Xapian::Compactor " 632 633 Compact a database, or merge and compact several. "; 634 635 %feature("docstring") Xapian::Compactor::Compactor "Xapian::Compactor::Compactor() "; 636 637 %feature("docstring") Xapian::Compactor::~Compactor "virtual 638 Xapian::Compactor::~Compactor() "; 639 640 %feature("docstring") Xapian::Compactor::set_block_size " 641 642 Set the block size to use for tables in the output database. 643 644 void Xapian::Compactor::set_block_size(size_t block_size) 645 646 Parameters: 647 ----------- 648 649 block_size: The block size to use. Valid block sizes are currently 650 powers of two between 2048 and 65536, with the default being 8192, but 651 the valid sizes and default may change in the future. "; 652 653 %feature("docstring") Xapian::Compactor::set_renumber " 654 655 Set whether to preserve existing document id values. 656 657 void Xapian::Compactor::set_renumber(bool renumber) 658 659 Parameters: 660 ----------- 661 662 renumber: The default is true, which means that document ids will be 663 renumbered - currently by applying the same offset to all the document 664 ids in a particular source database. 665 666 If false, then the document ids must be unique over all source 667 databases. Currently the ranges of document ids in each source must 668 not overlap either, though this restriction may be removed in the 669 future. "; 670 671 %feature("docstring") Xapian::Compactor::set_multipass " 672 673 Set whether to merge postlists in multiple passes. 674 675 void Xapian::Compactor::set_multipass(bool multipass) 676 677 Parameters: 678 ----------- 679 680 multipass: If true and merging more than 3 databases, merge the 681 postlists in multiple passes, which is generally faster but requires 682 more disk space for temporary files. By default we don't do this. "; 683 684 %feature("docstring") Xapian::Compactor::set_compaction_level " 685 686 Set the compaction level. 687 688 void Xapian::Compactor::set_compaction_level(compaction_level 689 compaction) 690 691 Parameters: 692 ----------- 693 694 compaction: Available values are: Xapian::Compactor::STANDARD - 695 Don't split items unnecessarily. 696 697 Xapian::Compactor::FULL - Split items whenever it saves space (the 698 default). 699 700 Xapian::Compactor::FULLER - Allow oversize items to save more space 701 (not recommended if you ever plan to update the compacted database). 702 "; 703 704 %feature("docstring") Xapian::Compactor::set_destdir " 705 706 Set where to write the output. 707 708 void Xapian::Compactor::set_destdir(const std::string &destdir) 709 710 Deprecated Use Database::compact(destdir[, compactor]) instead. 711 712 Parameters: 713 ----------- 714 715 destdir: Output path. This can be the same as an input if that input 716 is a stub database (in which case the database(s) listed in the stub 717 will be compacted to a new database and then the stub will be 718 atomically updated to point to this new database). "; 719 720 %feature("docstring") Xapian::Compactor::add_source " 721 722 Add a source database. 723 724 void Xapian::Compactor::add_source(const std::string &srcdir) 725 726 Deprecated Use Database::compact(destdir[, compactor]) instead. 727 728 Parameters: 729 ----------- 730 731 srcdir: The path to the source database to add. "; 732 733 %feature("docstring") Xapian::Compactor::compact " 734 735 Perform the actual compaction/merging operation. 736 737 void Xapian::Compactor::compact() 738 739 Deprecated Use Database::compact(destdir[, compactor]) instead. "; 740 741 %feature("docstring") Xapian::Compactor::set_status " 742 743 Update progress. 744 745 virtual void Xapian::Compactor::set_status(const std::string &table, 746 const std::string &status) 747 748 Subclass this method if you want to get progress updates during 749 compaction. This is called for each table first with empty status, And 750 then one or more times with non-empty status. 751 752 The default implementation does nothing. 753 754 Parameters: 755 ----------- 756 757 table: The table currently being compacted. 758 759 status: A status message. "; 760 761 %feature("docstring") Xapian::Compactor::resolve_duplicate_metadata " 762 763 Resolve multiple user metadata entries with the same key. 764 765 virtual std::string 766 Xapian::Compactor::resolve_duplicate_metadata(const std::string &key, 767 size_t num_tags, const std::string tags[]) 768 769 When merging, if the same user metadata key is set in more than one 770 input, then this method is called to allow this to be resolving in an 771 appropriate way. 772 773 The default implementation just returns tags[0]. 774 775 For multipass this will currently get called multiple times for the 776 same key if there are duplicates to resolve in each pass, but this may 777 change in the future. 778 779 Since 1.4.6, an implementation of this method can return an empty 780 string to indicate that the appropriate result is to not set a value 781 for this user metadata key in the output database. In older versions, 782 you should not return an empty string. 783 784 Parameters: 785 ----------- 786 787 key: The metadata key with duplicate entries. 788 789 num_tags: How many tags there are. 790 791 tags: An array of num_tags strings containing the tags to merge. "; 792 793 794 // File: structXapian_1_1Internal_1_1constinfo.xml 795 796 797 // File: classXapian_1_1CoordWeight.xml 798 %feature("docstring") Xapian::CoordWeight " 799 800 Xapian::Weight subclass implementing Coordinate Matching. 801 802 Each matching term score one point. See Managing Gigabytes, Second 803 Edition p181. "; 804 805 %feature("docstring") Xapian::CoordWeight::clone " 806 807 Clone this object. 808 809 CoordWeight* Xapian::CoordWeight::clone() const 810 811 This method allocates and returns a copy of the object it is called 812 on. 813 814 If your subclass is called FooWeight and has parameters a and b, then 815 you would implement FooWeight::clone() like so: 816 817 FooWeight * FooWeight::clone() const { return new FooWeight(a, b); } 818 819 Note that the returned object will be deallocated by Xapian after use 820 with \"delete\". If you want to handle the deletion in a special way 821 (for example when wrapping the Xapian API for use from another 822 language) then you can define a static operator delete method in your 823 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 824 825 %feature("docstring") Xapian::CoordWeight::init " 826 827 Allow the subclass to perform any initialisation it needs to. 828 829 void Xapian::CoordWeight::init(double factor_) 830 831 Parameters: 832 ----------- 833 834 factor: Any scaling factor (e.g. from OP_SCALE_WEIGHT). If the Weight 835 object is for the term-independent weight supplied by 836 get_sumextra()/get_maxextra(), then init(0.0) is called (starting from 837 Xapian 1.2.11 and 1.3.1 - earlier versions failed to call init() for 838 such Weight objects). "; 839 840 %feature("docstring") Xapian::CoordWeight::CoordWeight " 841 842 Construct a CoordWeight. 843 844 Xapian::CoordWeight::CoordWeight() "; 845 846 %feature("docstring") Xapian::CoordWeight::name " 847 848 Return the name of this weighting scheme. 849 850 std::string Xapian::CoordWeight::name() const 851 852 This name is used by the remote backend. It is passed along with the 853 serialised parameters to the remote server so that it knows which 854 class to create. 855 856 Return the full namespace-qualified name of your class here - if your 857 class is called FooWeight, return \"FooWeight\" from this method ( 858 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 859 860 If you don't want to support the remote backend, you can use the 861 default implementation which simply returns an empty string. "; 862 863 %feature("docstring") Xapian::CoordWeight::serialise " 864 865 Return this object's parameters serialised as a single string. 866 867 std::string Xapian::CoordWeight::serialise() const 868 869 If you don't want to support the remote backend, you can use the 870 default implementation which simply throws Xapian::UnimplementedError. 871 "; 872 873 %feature("docstring") Xapian::CoordWeight::unserialise " 874 875 Unserialise parameters. 876 877 CoordWeight* Xapian::CoordWeight::unserialise(const std::string 878 &serialised) const 879 880 This method unserialises parameters serialised by the serialise() 881 method and allocates and returns a new object initialised with them. 882 883 If you don't want to support the remote backend, you can use the 884 default implementation which simply throws Xapian::UnimplementedError. 885 886 Note that the returned object will be deallocated by Xapian after use 887 with \"delete\". If you want to handle the deletion in a special way 888 (for example when wrapping the Xapian API for use from another 889 language) then you can define a static operator delete method in your 890 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 891 892 Parameters: 893 ----------- 894 895 serialised: A string containing the serialised parameters. "; 896 897 %feature("docstring") Xapian::CoordWeight::get_sumpart " 898 899 Calculate the weight contribution for this object's term to a 900 document. 901 902 double Xapian::CoordWeight::get_sumpart(Xapian::termcount wdf, 903 Xapian::termcount doclen, Xapian::termcount uniqterm) const 904 905 The parameters give information about the document which may be used 906 in the calculations: 907 908 Parameters: 909 ----------- 910 911 wdf: The within document frequency of the term in the document. 912 913 doclen: The document's length (unnormalised). 914 915 uniqterms: Number of unique terms in the document (used for absolute 916 smoothing). "; 917 918 %feature("docstring") Xapian::CoordWeight::get_maxpart " 919 920 Return an upper bound on what get_sumpart() can return for any 921 document. 922 923 double Xapian::CoordWeight::get_maxpart() const 924 925 This information is used by the matcher to perform various 926 optimisations, so strive to make the bound as tight as possible. "; 927 928 %feature("docstring") Xapian::CoordWeight::get_sumextra " 929 930 Calculate the term-independent weight component for a document. 931 932 double Xapian::CoordWeight::get_sumextra(Xapian::termcount, 933 Xapian::termcount) const 934 935 The parameter gives information about the document which may be used 936 in the calculations: 937 938 Parameters: 939 ----------- 940 941 doclen: The document's length (unnormalised). 942 943 uniqterms: The number of unique terms in the document. "; 944 945 %feature("docstring") Xapian::CoordWeight::get_maxextra " 946 947 Return an upper bound on what get_sumextra() can return for any 948 document. 949 950 double Xapian::CoordWeight::get_maxextra() const 951 952 This information is used by the matcher to perform various 953 optimisations, so strive to make the bound as tight as possible. "; 954 955 956 // File: classXapian_1_1Database.xml 957 %feature("docstring") Xapian::Database " 958 959 This class is used to access a database, or a group of databases. 960 961 For searching, this class is used in conjunction with an Enquire 962 object. 963 964 Parameters: 965 ----------- 966 967 InvalidArgumentError: will be thrown if an invalid argument is 968 supplied, for example, an unknown database type. 969 970 DatabaseOpeningError: may be thrown if the database cannot be opened 971 (for example, a required file cannot be found). 972 973 DatabaseVersionError: may be thrown if the database is in an 974 unsupported format (for example, created by a newer version of Xapian 975 which uses an incompatible format). "; 976 977 %feature("docstring") Xapian::Database::add_database " 978 979 Add an existing database (or group of databases) to those accessed by 980 this object. 981 982 void Xapian::Database::add_database(const Database &database) 983 984 Parameters: 985 ----------- 986 987 database: the database(s) to add. "; 988 989 %feature("docstring") Xapian::Database::size " 990 991 Return number of shards in this Database object. 992 993 size_t Xapian::Database::size() const "; 994 995 %feature("docstring") Xapian::Database::Database " 996 997 Create a Database with no databases in. 998 999 Xapian::Database::Database() "; 1000 1001 %feature("docstring") Xapian::Database::Database " 1002 1003 Open a Database, automatically determining the database backend to 1004 use. 1005 1006 Xapian::Database::Database(const std::string &path, int flags=0) 1007 1008 Parameters: 1009 ----------- 1010 1011 path: directory that the database is stored in. 1012 1013 flags: Bitwise-or of Xapian::DB_* constants. "; 1014 1015 %feature("docstring") Xapian::Database::Database " 1016 1017 Open a single-file Database. 1018 1019 Xapian::Database::Database(int fd, int flags=0) 1020 1021 This method opens a single-file Database given a file descriptor open 1022 on it. Xapian looks starting at the current file offset, allowing a 1023 single file database to be easily embedded within another file. 1024 1025 Parameters: 1026 ----------- 1027 1028 fd: file descriptor for the file. Xapian takes ownership of this and 1029 will close it when the database is closed. 1030 1031 flags: Bitwise-or of Xapian::DB_* constants. "; 1032 1033 %feature("docstring") Xapian::Database::~Database " 1034 1035 Destroy this handle on the database. 1036 1037 virtual Xapian::Database::~Database() 1038 1039 If there are no copies of this object remaining, the database(s) will 1040 be closed. "; 1041 1042 %feature("docstring") Xapian::Database::Database " 1043 1044 Copying is allowed. 1045 1046 Xapian::Database::Database(const Database &other) 1047 1048 The internals are reference counted, so copying is cheap. 1049 1050 Parameters: 1051 ----------- 1052 1053 other: The object to copy. "; 1054 1055 %feature("docstring") Xapian::Database::reopen " 1056 1057 Re-open the database. 1058 1059 bool Xapian::Database::reopen() 1060 1061 This re-opens the database(s) to the latest available version(s). It 1062 can be used either to make sure the latest results are returned, or to 1063 recover from a Xapian::DatabaseModifiedError. 1064 1065 Calling reopen() on a database which has been closed (with close()) 1066 will always raise a Xapian::DatabaseError. 1067 1068 true if the database might have been reopened (if false is returned, 1069 the database definitely hasn't been reopened, which applications may 1070 find useful when caching results, etc). In Xapian < 1.3.0, this method 1071 did not return a value. "; 1072 1073 %feature("docstring") Xapian::Database::close " 1074 1075 Close the database. 1076 1077 virtual void Xapian::Database::close() 1078 1079 This closes the database and closes all its file handles. 1080 1081 For a WritableDatabase, if a transaction is active it will be aborted, 1082 while if no transaction is active commit() will be implicitly called. 1083 Also the write lock is released. 1084 1085 Closing a database cannot be undone - in particular, calling reopen() 1086 after close() will not reopen it, but will instead throw a 1087 Xapian::DatabaseError exception. 1088 1089 Calling close() again on a database which has already been closed has 1090 no effect (and doesn't raise an exception). 1091 1092 After close() has been called, calls to other methods of the database, 1093 and to methods of other objects associated with the database, will 1094 either: 1095 1096 behave exactly as they would have done if the database had not been 1097 closed (this can only happen if all the required data is cached) 1098 1099 raise a Xapian::DatabaseError exception indicating that the database 1100 is closed. 1101 1102 The reason for this behaviour is that otherwise we'd have to check 1103 that the database is still open on every method call on every object 1104 associated with a Database, when in many cases they are working on 1105 data which has already been loaded and so they are able to just behave 1106 correctly. 1107 1108 This method was added in Xapian 1.1.0. "; 1109 1110 %feature("docstring") Xapian::Database::get_description " 1111 1112 Return a string describing this object. 1113 1114 virtual std::string Xapian::Database::get_description() const "; 1115 1116 %feature("docstring") Xapian::Database::postlist_begin " 1117 1118 An iterator pointing to the start of the postlist for a given term. 1119 1120 PostingIterator Xapian::Database::postlist_begin(const std::string 1121 &tname) const 1122 1123 Parameters: 1124 ----------- 1125 1126 tname: The termname to iterate postings for. If the term name is the 1127 empty string, the iterator returned will list all the documents in the 1128 database. Such an iterator will always return a WDF value of 1, since 1129 there is no obvious meaning for this quantity in this case. "; 1130 1131 %feature("docstring") Xapian::Database::postlist_end " 1132 1133 Corresponding end iterator to postlist_begin(). 1134 1135 PostingIterator Xapian::Database::postlist_end(const std::string &) 1136 const "; 1137 1138 %feature("docstring") Xapian::Database::termlist_begin " 1139 1140 An iterator pointing to the start of the termlist for a given 1141 document. 1142 1143 TermIterator Xapian::Database::termlist_begin(Xapian::docid did) const 1144 1145 Parameters: 1146 ----------- 1147 1148 did: The document id of the document to iterate terms for. "; 1149 1150 %feature("docstring") Xapian::Database::termlist_end " 1151 1152 Corresponding end iterator to termlist_begin(). 1153 1154 TermIterator Xapian::Database::termlist_end(Xapian::docid) const "; 1155 1156 %feature("docstring") Xapian::Database::has_positions " 1157 1158 Does this database have any positional information? 1159 1160 bool Xapian::Database::has_positions() const "; 1161 1162 %feature("docstring") Xapian::Database::positionlist_begin " 1163 1164 An iterator pointing to the start of the position list for a given 1165 term in a given document. 1166 1167 PositionIterator Xapian::Database::positionlist_begin(Xapian::docid 1168 did, const std::string &tname) const "; 1169 1170 %feature("docstring") Xapian::Database::positionlist_end " 1171 1172 Corresponding end iterator to positionlist_begin(). 1173 1174 PositionIterator Xapian::Database::positionlist_end(Xapian::docid, 1175 const std::string &) const "; 1176 1177 %feature("docstring") Xapian::Database::allterms_begin " 1178 1179 An iterator which runs across all terms with a given prefix. 1180 1181 TermIterator Xapian::Database::allterms_begin(const std::string 1182 &prefix=std::string()) const 1183 1184 Parameters: 1185 ----------- 1186 1187 prefix: The prefix to restrict the returned terms to (default: 1188 iterate all terms) "; 1189 1190 %feature("docstring") Xapian::Database::allterms_end " 1191 1192 Corresponding end iterator to allterms_begin(prefix). 1193 1194 TermIterator Xapian::Database::allterms_end(const std::string 1195 &=std::string()) const "; 1196 1197 %feature("docstring") Xapian::Database::get_doccount " 1198 1199 Get the number of documents in the database. 1200 1201 Xapian::doccount Xapian::Database::get_doccount() const "; 1202 1203 %feature("docstring") Xapian::Database::get_lastdocid " 1204 1205 Get the highest document id which has been used in the database. 1206 1207 Xapian::docid Xapian::Database::get_lastdocid() const "; 1208 1209 %feature("docstring") Xapian::Database::get_avlength " 1210 1211 Get the average length of the documents in the database. 1212 1213 Xapian::doclength Xapian::Database::get_avlength() const "; 1214 1215 %feature("docstring") Xapian::Database::get_average_length " 1216 1217 New name for get_avlength(). 1218 1219 double Xapian::Database::get_average_length() const 1220 1221 Added for forward compatibility with the next release series. 1222 1223 1.4.17. "; 1224 1225 %feature("docstring") Xapian::Database::get_total_length " 1226 1227 Get the total length of all the documents in the database. 1228 1229 Xapian::totallength Xapian::Database::get_total_length() const 1230 1231 Added in Xapian 1.4.5. "; 1232 1233 %feature("docstring") Xapian::Database::get_termfreq " 1234 1235 Get the number of documents in the database indexed by a given term. 1236 1237 Xapian::doccount Xapian::Database::get_termfreq(const std::string 1238 &tname) const "; 1239 1240 %feature("docstring") Xapian::Database::term_exists " 1241 1242 Check if a given term exists in the database. 1243 1244 bool Xapian::Database::term_exists(const std::string &tname) const 1245 1246 Parameters: 1247 ----------- 1248 1249 tname: The term to test the existence of. 1250 1251 true if and only if the term exists in the database. This is the same 1252 as (get_termfreq(tname) != 0), but will often be more efficient. "; 1253 1254 %feature("docstring") Xapian::Database::get_collection_freq " 1255 1256 Return the total number of occurrences of the given term. 1257 1258 Xapian::termcount Xapian::Database::get_collection_freq(const 1259 std::string &tname) const 1260 1261 This is the sum of the number of occurrences of the term in each 1262 document it indexes: i.e., the sum of the within document frequencies 1263 of the term. 1264 1265 Parameters: 1266 ----------- 1267 1268 tname: The term whose collection frequency is being requested. "; 1269 1270 %feature("docstring") Xapian::Database::get_value_freq " 1271 1272 Return the frequency of a given value slot. 1273 1274 Xapian::doccount Xapian::Database::get_value_freq(Xapian::valueno 1275 slot) const 1276 1277 This is the number of documents which have a (non-empty) value stored 1278 in the slot. 1279 1280 Parameters: 1281 ----------- 1282 1283 slot: The value slot to examine. "; 1284 1285 %feature("docstring") Xapian::Database::get_value_lower_bound " 1286 1287 Get a lower bound on the values stored in the given value slot. 1288 1289 std::string Xapian::Database::get_value_lower_bound(Xapian::valueno 1290 slot) const 1291 1292 If there are no values stored in the given value slot, this will 1293 return an empty string. 1294 1295 Parameters: 1296 ----------- 1297 1298 slot: The value slot to examine. "; 1299 1300 %feature("docstring") Xapian::Database::get_value_upper_bound " 1301 1302 Get an upper bound on the values stored in the given value slot. 1303 1304 std::string Xapian::Database::get_value_upper_bound(Xapian::valueno 1305 slot) const 1306 1307 If there are no values stored in the given value slot, this will 1308 return an empty string. 1309 1310 Parameters: 1311 ----------- 1312 1313 slot: The value slot to examine. "; 1314 1315 %feature("docstring") Xapian::Database::get_doclength_lower_bound " 1316 1317 Get a lower bound on the length of a document in this DB. 1318 1319 Xapian::termcount Xapian::Database::get_doclength_lower_bound() const 1320 1321 This bound does not include any zero-length documents. "; 1322 1323 %feature("docstring") Xapian::Database::get_doclength_upper_bound " 1324 1325 Get an upper bound on the length of a document in this DB. 1326 1327 Xapian::termcount Xapian::Database::get_doclength_upper_bound() const 1328 "; 1329 1330 %feature("docstring") Xapian::Database::get_wdf_upper_bound " 1331 1332 Get an upper bound on the wdf of term term. 1333 1334 Xapian::termcount Xapian::Database::get_wdf_upper_bound(const 1335 std::string &term) const "; 1336 1337 %feature("docstring") Xapian::Database::valuestream_begin " 1338 1339 Return an iterator over the value in slot slot for each document. 1340 1341 ValueIterator Xapian::Database::valuestream_begin(Xapian::valueno 1342 slot) const "; 1343 1344 %feature("docstring") Xapian::Database::valuestream_end " 1345 1346 Return end iterator corresponding to valuestream_begin(). 1347 1348 ValueIterator Xapian::Database::valuestream_end(Xapian::valueno) const 1349 "; 1350 1351 %feature("docstring") Xapian::Database::get_doclength " 1352 1353 Get the length of a document. 1354 1355 Xapian::termcount Xapian::Database::get_doclength(Xapian::docid did) 1356 const "; 1357 1358 %feature("docstring") Xapian::Database::get_unique_terms " 1359 1360 Get the number of unique terms in document. 1361 1362 Xapian::termcount Xapian::Database::get_unique_terms(Xapian::docid 1363 did) const "; 1364 1365 %feature("docstring") Xapian::Database::keep_alive " 1366 1367 Send a \"keep-alive\" to remote databases to stop them timing out. 1368 1369 void Xapian::Database::keep_alive() 1370 1371 Has no effect on non-remote databases. "; 1372 1373 %feature("docstring") Xapian::Database::get_document " 1374 1375 Get a document from the database, given its document id. 1376 1377 Xapian::Document Xapian::Database::get_document(Xapian::docid did) 1378 const 1379 1380 This method returns a Xapian::Document object which provides the 1381 information about a document. 1382 1383 Parameters: 1384 ----------- 1385 1386 did: The document id of the document to retrieve. 1387 1388 A Xapian::Document object containing the document data 1389 1390 Parameters: 1391 ----------- 1392 1393 Xapian::DocNotFoundError: The document specified could not be found 1394 in the database. 1395 1396 Xapian::InvalidArgumentError: did was 0, which is not a valid 1397 document id. "; 1398 1399 %feature("docstring") Xapian::Database::get_document " 1400 1401 Get a document from the database, given its document id. 1402 1403 Xapian::Document Xapian::Database::get_document(Xapian::docid did, 1404 unsigned flags) const 1405 1406 This method returns a Xapian::Document object which provides the 1407 information about a document. 1408 1409 Parameters: 1410 ----------- 1411 1412 did: The document id of the document to retrieve. 1413 1414 flags: Zero or more flags bitwise-or-ed together (currently only 1415 Xapian::DOC_ASSUME_VALID is supported). 1416 1417 A Xapian::Document object containing the document data 1418 1419 Parameters: 1420 ----------- 1421 1422 Xapian::DocNotFoundError: The document specified could not be found 1423 in the database. 1424 1425 Xapian::InvalidArgumentError: did was 0, which is not a valid 1426 document id. "; 1427 1428 %feature("docstring") Xapian::Database::get_spelling_suggestion " 1429 1430 Suggest a spelling correction. 1431 1432 std::string Xapian::Database::get_spelling_suggestion(const 1433 std::string &word, unsigned max_edit_distance=2) const 1434 1435 Parameters: 1436 ----------- 1437 1438 word: The potentially misspelled word. 1439 1440 max_edit_distance: Only consider words which are at most 1441 max_edit_distance edits from word. An edit is a character insertion, 1442 deletion, or the transposition of two adjacent characters (default is 1443 2). "; 1444 1445 %feature("docstring") Xapian::Database::spellings_begin " 1446 1447 An iterator which returns all the spelling correction targets. 1448 1449 Xapian::TermIterator Xapian::Database::spellings_begin() const 1450 1451 This returns all the words which are considered as targets for the 1452 spelling correction algorithm. The frequency of each word is available 1453 as the term frequency of each entry in the returned iterator. "; 1454 1455 %feature("docstring") Xapian::Database::spellings_end " 1456 1457 Corresponding end iterator to spellings_begin(). 1458 1459 Xapian::TermIterator Xapian::Database::spellings_end() const "; 1460 1461 %feature("docstring") Xapian::Database::synonyms_begin " 1462 1463 An iterator which returns all the synonyms for a given term. 1464 1465 Xapian::TermIterator Xapian::Database::synonyms_begin(const 1466 std::string &term) const 1467 1468 Parameters: 1469 ----------- 1470 1471 term: The term to return synonyms for. "; 1472 1473 %feature("docstring") Xapian::Database::synonyms_end " 1474 1475 Corresponding end iterator to synonyms_begin(term). 1476 1477 Xapian::TermIterator Xapian::Database::synonyms_end(const std::string 1478 &) const "; 1479 1480 %feature("docstring") Xapian::Database::synonym_keys_begin " 1481 1482 An iterator which returns all terms which have synonyms. 1483 1484 Xapian::TermIterator Xapian::Database::synonym_keys_begin(const 1485 std::string &prefix=std::string()) const 1486 1487 Parameters: 1488 ----------- 1489 1490 prefix: If non-empty, only terms with this prefix are returned. "; 1491 1492 %feature("docstring") Xapian::Database::synonym_keys_end " 1493 1494 Corresponding end iterator to synonym_keys_begin(prefix). 1495 1496 Xapian::TermIterator Xapian::Database::synonym_keys_end(const 1497 std::string &=std::string()) const "; 1498 1499 %feature("docstring") Xapian::Database::get_metadata " 1500 1501 Get the user-specified metadata associated with a given key. 1502 1503 std::string Xapian::Database::get_metadata(const std::string &key) 1504 const 1505 1506 User-specified metadata allows you to store arbitrary information in 1507 the form of (key, value) pairs. See WritableDatabase::set_metadata() 1508 for more information. 1509 1510 When invoked on a Xapian::Database object representing multiple 1511 databases, currently only the metadata for the first is considered but 1512 this behaviour may change in the future. 1513 1514 If there is no piece of metadata associated with the specified key, an 1515 empty string is returned (this applies even for backends which don't 1516 support metadata). 1517 1518 Empty keys are not valid, and specifying one will cause an exception. 1519 1520 Parameters: 1521 ----------- 1522 1523 key: The key of the metadata item to access. 1524 1525 The retrieved metadata item's value. 1526 1527 Parameters: 1528 ----------- 1529 1530 Xapian::InvalidArgumentError: will be thrown if the key supplied is 1531 empty. "; 1532 1533 %feature("docstring") Xapian::Database::metadata_keys_begin " 1534 1535 An iterator which returns all user-specified metadata keys. 1536 1537 Xapian::TermIterator Xapian::Database::metadata_keys_begin(const 1538 std::string &prefix=std::string()) const 1539 1540 When invoked on a Xapian::Database object representing multiple 1541 databases, currently only the metadata for the first is considered but 1542 this behaviour may change in the future. 1543 1544 If the backend doesn't support metadata, then this method returns an 1545 iterator which compares equal to that returned by metadata_keys_end(). 1546 1547 Parameters: 1548 ----------- 1549 1550 prefix: If non-empty, only keys with this prefix are returned. 1551 1552 Parameters: 1553 ----------- 1554 1555 Xapian::UnimplementedError: will be thrown if the backend implements 1556 user-specified metadata, but doesn't implement iterating its keys 1557 (currently this happens for the InMemory backend). "; 1558 1559 %feature("docstring") Xapian::Database::metadata_keys_end " 1560 1561 Corresponding end iterator to metadata_keys_begin(). 1562 1563 Xapian::TermIterator Xapian::Database::metadata_keys_end(const 1564 std::string &=std::string()) const "; 1565 1566 %feature("docstring") Xapian::Database::get_uuid " 1567 1568 Get a UUID for the database. 1569 1570 std::string Xapian::Database::get_uuid() const 1571 1572 The UUID will persist for the lifetime of the database. 1573 1574 Replicas (eg, made with the replication protocol, or by copying all 1575 the database files) will have the same UUID. However, copies (made 1576 with copydatabase, or xapian-compact) will have different UUIDs. 1577 1578 If the backend does not support UUIDs or this database has no 1579 subdatabases, the UUID will be empty. 1580 1581 If this database has multiple sub-databases, the UUID string will 1582 contain the UUIDs of all the sub-databases. "; 1583 1584 %feature("docstring") Xapian::Database::locked " 1585 1586 Test if this database is currently locked for writing. 1587 1588 bool Xapian::Database::locked() const 1589 1590 If the underlying object is actually a WritableDatabase, always 1591 returns true. 1592 1593 Otherwise tests if there's a writer holding the lock (or if we can't 1594 test for a lock without taking it on the current platform, throw 1595 Xapian::UnimplementedError). If there's an error while trying to test 1596 the lock, throws Xapian::DatabaseLockError. 1597 1598 For multi-databases, this tests each sub-database and returns true if 1599 any of them are locked. "; 1600 1601 %feature("docstring") Xapian::Database::get_revision " 1602 1603 Get the revision of the database. 1604 1605 Xapian::rev Xapian::Database::get_revision() const 1606 1607 The revision is an unsigned integer which increases with each commit. 1608 1609 The database must have exactly one sub-database, which must be of type 1610 chert or glass. Otherwise an exception will be thrown. 1611 1612 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 1613 features "; 1614 1615 %feature("docstring") Xapian::Database::compact " 1616 1617 Produce a compact version of this database. 1618 1619 void Xapian::Database::compact(const std::string &output, unsigned 1620 flags=0, int block_size=0) 1621 1622 New 1.3.4. Various methods of the Compactor class were deprecated in 1623 1.3.4. 1624 1625 Parameters: 1626 ----------- 1627 1628 output: Path to write the compact version to. This can be the same as 1629 an input if that input is a stub database (in which case the 1630 database(s) listed in the stub will be compacted to a new database and 1631 then the stub will be atomically updated to point to this new 1632 database). 1633 1634 flags: Any of the following combined using bitwise-or (| in C++): 1635 Xapian::DBCOMPACT_NO_RENUMBER By default the document ids will be 1636 renumbered the output - currently by applying the same offset to all 1637 the document ids in a particular source database. If this flag is 1638 specified, then this renumbering doesn't happen, but all the document 1639 ids must be unique over all source databases. Currently the ranges of 1640 document ids in each source must not overlap either, though this 1641 restriction may be removed in the future. 1642 1643 Xapian::DBCOMPACT_MULTIPASS If merging more than 3 databases, merge 1644 the postlists in multiple passes, which is generally faster but 1645 requires more disk space for temporary files. 1646 1647 Xapian::DBCOMPACT_SINGLE_FILE Produce a single-file database (only 1648 supported for glass currently). 1649 1650 At most one of: Xapian::Compactor::STANDARD - Don't split items 1651 unnecessarily. 1652 1653 Xapian::Compactor::FULL - Split items whenever it saves space (the 1654 default). 1655 1656 Xapian::Compactor::FULLER - Allow oversize items to save more space 1657 (not recommended if you ever plan to update the compacted database). 1658 1659 block_size: This specifies the block size (in bytes) for to use for 1660 the output. For glass, the block size must be a power of 2 between 1661 2048 and 65536 (inclusive), and the default (also used if an invalid 1662 value is passed) is 8192 bytes. "; 1663 1664 %feature("docstring") Xapian::Database::compact " 1665 1666 Produce a compact version of this database. 1667 1668 void Xapian::Database::compact(int fd, unsigned flags=0, int 1669 block_size=0) 1670 1671 New 1.3.4. Various methods of the Compactor class were deprecated in 1672 1.3.4. 1673 1674 This variant writes a single-file database to the specified file 1675 descriptor. Only the glass backend supports such databases, so this 1676 form is only supported for this backend. 1677 1678 Parameters: 1679 ----------- 1680 1681 fd: File descriptor to write the compact version to. The descriptor 1682 needs to be readable and writable (open with O_RDWR) and seekable. The 1683 current file offset is used, allowing compacting to a single file 1684 database embedded within another file. Xapian takes ownership of the 1685 file descriptor and will close it before returning. 1686 1687 flags: Any of the following combined using bitwise-or (| in C++): 1688 Xapian::DBCOMPACT_NO_RENUMBER By default the document ids will be 1689 renumbered the output - currently by applying the same offset to all 1690 the document ids in a particular source database. If this flag is 1691 specified, then this renumbering doesn't happen, but all the document 1692 ids must be unique over all source databases. Currently the ranges of 1693 document ids in each source must not overlap either, though this 1694 restriction may be removed in the future. 1695 1696 Xapian::DBCOMPACT_MULTIPASS If merging more than 3 databases, merge 1697 the postlists in multiple passes, which is generally faster but 1698 requires more disk space for temporary files. 1699 1700 Xapian::DBCOMPACT_SINGLE_FILE Produce a single-file database (only 1701 supported for glass currently) - this flag is implied in this form and 1702 need not be specified explicitly. 1703 1704 block_size: This specifies the block size (in bytes) for to use for 1705 the output. For glass, the block size must be a power of 2 between 1706 2048 and 65536 (inclusive), and the default (also used if an invalid 1707 value is passed) is 8192 bytes. "; 1708 1709 %feature("docstring") Xapian::Database::compact " 1710 1711 Produce a compact version of this database. 1712 1713 void Xapian::Database::compact(const std::string &output, unsigned 1714 flags, int block_size, Xapian::Compactor &compactor) 1715 1716 New 1.3.4. Various methods of the Compactor class were deprecated in 1717 1.3.4. 1718 1719 The compactor functor allows handling progress output and specifying 1720 how user metadata is merged. 1721 1722 Parameters: 1723 ----------- 1724 1725 output: Path to write the compact version to. This can be the same as 1726 an input if that input is a stub database (in which case the 1727 database(s) listed in the stub will be compacted to a new database and 1728 then the stub will be atomically updated to point to this new 1729 database). 1730 1731 flags: Any of the following combined using bitwise-or (| in C++): 1732 Xapian::DBCOMPACT_NO_RENUMBER By default the document ids will be 1733 renumbered the output - currently by applying the same offset to all 1734 the document ids in a particular source database. If this flag is 1735 specified, then this renumbering doesn't happen, but all the document 1736 ids must be unique over all source databases. Currently the ranges of 1737 document ids in each source must not overlap either, though this 1738 restriction may be removed in the future. 1739 1740 Xapian::DBCOMPACT_MULTIPASS If merging more than 3 databases, merge 1741 the postlists in multiple passes, which is generally faster but 1742 requires more disk space for temporary files. 1743 1744 Xapian::DBCOMPACT_SINGLE_FILE Produce a single-file database (only 1745 supported for glass currently). 1746 1747 block_size: This specifies the block size (in bytes) for to use for 1748 the output. For glass, the block size must be a power of 2 between 1749 2048 and 65536 (inclusive), and the default (also used if an invalid 1750 value is passed) is 8192 bytes. 1751 1752 compactor: Functor "; 1753 1754 %feature("docstring") Xapian::Database::compact " 1755 1756 Produce a compact version of this database. 1757 1758 void Xapian::Database::compact(int fd, unsigned flags, int block_size, 1759 Xapian::Compactor &compactor) 1760 1761 New 1.3.4. Various methods of the Compactor class were deprecated in 1762 1.3.4. 1763 1764 The compactor functor allows handling progress output and specifying 1765 how user metadata is merged. 1766 1767 This variant writes a single-file database to the specified file 1768 descriptor. Only the glass backend supports such databases, so this 1769 form is only supported for this backend. 1770 1771 Parameters: 1772 ----------- 1773 1774 fd: File descriptor to write the compact version to. The descriptor 1775 needs to be readable and writable (open with O_RDWR) and seekable. The 1776 current file offset is used, allowing compacting to a single file 1777 database embedded within another file. Xapian takes ownership of the 1778 file descriptor and will close it before returning. 1779 1780 flags: Any of the following combined using bitwise-or (| in C++): 1781 Xapian::DBCOMPACT_NO_RENUMBER By default the document ids will be 1782 renumbered the output - currently by applying the same offset to all 1783 the document ids in a particular source database. If this flag is 1784 specified, then this renumbering doesn't happen, but all the document 1785 ids must be unique over all source databases. Currently the ranges of 1786 document ids in each source must not overlap either, though this 1787 restriction may be removed in the future. 1788 1789 Xapian::DBCOMPACT_MULTIPASS If merging more than 3 databases, merge 1790 the postlists in multiple passes, which is generally faster but 1791 requires more disk space for temporary files. 1792 1793 Xapian::DBCOMPACT_SINGLE_FILE Produce a single-file database (only 1794 supported for glass currently) - this flag is implied in this form and 1795 need not be specified explicitly. 1796 1797 block_size: This specifies the block size (in bytes) for to use for 1798 the output. For glass, the block size must be a power of 2 between 1799 2048 and 65536 (inclusive), and the default (also used if an invalid 1800 value is passed) is 8192 bytes. 1801 1802 compactor: Functor "; 1803 1804 1805 // File: classXapian_1_1DatabaseClosedError.xml 1806 %feature("docstring") Xapian::DatabaseClosedError " 1807 1808 Indicates an attempt to access a closed database. "; 1809 1810 %feature("docstring") 1811 Xapian::DatabaseClosedError::DatabaseClosedError " 1812 1813 General purpose constructor. 1814 1815 Xapian::DatabaseClosedError::DatabaseClosedError(const std::string 1816 &msg_, const std::string &context_=std::string(), int errno_=0) 1817 1818 Parameters: 1819 ----------- 1820 1821 msg_: Message giving details of the error, intended for human 1822 consumption. 1823 1824 context_: Optional context information for this error. 1825 1826 errno_: Optional errno value associated with this error. "; 1827 1828 %feature("docstring") 1829 Xapian::DatabaseClosedError::DatabaseClosedError " 1830 1831 Construct from message and errno value. 1832 1833 Xapian::DatabaseClosedError::DatabaseClosedError(const std::string 1834 &msg_, int errno_) 1835 1836 Parameters: 1837 ----------- 1838 1839 msg_: Message giving details of the error, intended for human 1840 consumption. 1841 1842 errno_: Optional errno value associated with this error. "; 1843 1844 1845 // File: classXapian_1_1DatabaseCorruptError.xml 1846 %feature("docstring") Xapian::DatabaseCorruptError " 1847 1848 DatabaseCorruptError indicates database corruption was detected. "; 1849 1850 %feature("docstring") 1851 Xapian::DatabaseCorruptError::DatabaseCorruptError " 1852 1853 General purpose constructor. 1854 1855 Xapian::DatabaseCorruptError::DatabaseCorruptError(const std::string 1856 &msg_, const std::string &context_=std::string(), int errno_=0) 1857 1858 Parameters: 1859 ----------- 1860 1861 msg_: Message giving details of the error, intended for human 1862 consumption. 1863 1864 context_: Optional context information for this error. 1865 1866 errno_: Optional errno value associated with this error. "; 1867 1868 %feature("docstring") 1869 Xapian::DatabaseCorruptError::DatabaseCorruptError " 1870 1871 Construct from message and errno value. 1872 1873 Xapian::DatabaseCorruptError::DatabaseCorruptError(const std::string 1874 &msg_, int errno_) 1875 1876 Parameters: 1877 ----------- 1878 1879 msg_: Message giving details of the error, intended for human 1880 consumption. 1881 1882 errno_: Optional errno value associated with this error. "; 1883 1884 1885 // File: classXapian_1_1DatabaseCreateError.xml 1886 %feature("docstring") Xapian::DatabaseCreateError " 1887 1888 DatabaseCreateError indicates a failure to create a database. "; 1889 1890 %feature("docstring") 1891 Xapian::DatabaseCreateError::DatabaseCreateError " 1892 1893 General purpose constructor. 1894 1895 Xapian::DatabaseCreateError::DatabaseCreateError(const std::string 1896 &msg_, const std::string &context_=std::string(), int errno_=0) 1897 1898 Parameters: 1899 ----------- 1900 1901 msg_: Message giving details of the error, intended for human 1902 consumption. 1903 1904 context_: Optional context information for this error. 1905 1906 errno_: Optional errno value associated with this error. "; 1907 1908 %feature("docstring") 1909 Xapian::DatabaseCreateError::DatabaseCreateError " 1910 1911 Construct from message and errno value. 1912 1913 Xapian::DatabaseCreateError::DatabaseCreateError(const std::string 1914 &msg_, int errno_) 1915 1916 Parameters: 1917 ----------- 1918 1919 msg_: Message giving details of the error, intended for human 1920 consumption. 1921 1922 errno_: Optional errno value associated with this error. "; 1923 1924 1925 // File: classXapian_1_1DatabaseError.xml 1926 %feature("docstring") Xapian::DatabaseError " 1927 1928 DatabaseError indicates some sort of database related error. "; 1929 1930 %feature("docstring") Xapian::DatabaseError::DatabaseError " 1931 1932 General purpose constructor. 1933 1934 Xapian::DatabaseError::DatabaseError(const std::string &msg_, const 1935 std::string &context_=std::string(), int errno_=0) 1936 1937 Parameters: 1938 ----------- 1939 1940 msg_: Message giving details of the error, intended for human 1941 consumption. 1942 1943 context_: Optional context information for this error. 1944 1945 errno_: Optional errno value associated with this error. "; 1946 1947 %feature("docstring") Xapian::DatabaseError::DatabaseError " 1948 1949 Construct from message and errno value. 1950 1951 Xapian::DatabaseError::DatabaseError(const std::string &msg_, int 1952 errno_) 1953 1954 Parameters: 1955 ----------- 1956 1957 msg_: Message giving details of the error, intended for human 1958 consumption. 1959 1960 errno_: Optional errno value associated with this error. "; 1961 1962 1963 // File: classXapian_1_1DatabaseLockError.xml 1964 %feature("docstring") Xapian::DatabaseLockError " 1965 1966 DatabaseLockError indicates failure to lock a database. "; 1967 1968 %feature("docstring") Xapian::DatabaseLockError::DatabaseLockError " 1969 1970 General purpose constructor. 1971 1972 Xapian::DatabaseLockError::DatabaseLockError(const std::string &msg_, 1973 const std::string &context_=std::string(), int errno_=0) 1974 1975 Parameters: 1976 ----------- 1977 1978 msg_: Message giving details of the error, intended for human 1979 consumption. 1980 1981 context_: Optional context information for this error. 1982 1983 errno_: Optional errno value associated with this error. "; 1984 1985 %feature("docstring") Xapian::DatabaseLockError::DatabaseLockError " 1986 1987 Construct from message and errno value. 1988 1989 Xapian::DatabaseLockError::DatabaseLockError(const std::string &msg_, 1990 int errno_) 1991 1992 Parameters: 1993 ----------- 1994 1995 msg_: Message giving details of the error, intended for human 1996 consumption. 1997 1998 errno_: Optional errno value associated with this error. "; 1999 2000 2001 // File: classXapian_1_1DatabaseModifiedError.xml 2002 %feature("docstring") Xapian::DatabaseModifiedError " 2003 2004 DatabaseModifiedError indicates a database was modified. 2005 2006 To recover after catching this error, you need to call 2007 Xapian::Database::reopen() on the Database and repeat the operation 2008 which failed. "; 2009 2010 %feature("docstring") 2011 Xapian::DatabaseModifiedError::DatabaseModifiedError " 2012 2013 General purpose constructor. 2014 2015 Xapian::DatabaseModifiedError::DatabaseModifiedError(const std::string 2016 &msg_, const std::string &context_=std::string(), int errno_=0) 2017 2018 Parameters: 2019 ----------- 2020 2021 msg_: Message giving details of the error, intended for human 2022 consumption. 2023 2024 context_: Optional context information for this error. 2025 2026 errno_: Optional errno value associated with this error. "; 2027 2028 %feature("docstring") 2029 Xapian::DatabaseModifiedError::DatabaseModifiedError " 2030 2031 Construct from message and errno value. 2032 2033 Xapian::DatabaseModifiedError::DatabaseModifiedError(const std::string 2034 &msg_, int errno_) 2035 2036 Parameters: 2037 ----------- 2038 2039 msg_: Message giving details of the error, intended for human 2040 consumption. 2041 2042 errno_: Optional errno value associated with this error. "; 2043 2044 2045 // File: classXapian_1_1DatabaseNotFoundError.xml 2046 %feature("docstring") Xapian::DatabaseNotFoundError " 2047 2048 Indicates an attempt to access a database not present. "; 2049 2050 %feature("docstring") 2051 Xapian::DatabaseNotFoundError::DatabaseNotFoundError " 2052 2053 General purpose constructor. 2054 2055 Xapian::DatabaseNotFoundError::DatabaseNotFoundError(const std::string 2056 &msg_, const std::string &context_=std::string(), int errno_=0) 2057 2058 Parameters: 2059 ----------- 2060 2061 msg_: Message giving details of the error, intended for human 2062 consumption. 2063 2064 context_: Optional context information for this error. 2065 2066 errno_: Optional errno value associated with this error. "; 2067 2068 %feature("docstring") 2069 Xapian::DatabaseNotFoundError::DatabaseNotFoundError " 2070 2071 Construct from message and errno value. 2072 2073 Xapian::DatabaseNotFoundError::DatabaseNotFoundError(const std::string 2074 &msg_, int errno_) 2075 2076 Parameters: 2077 ----------- 2078 2079 msg_: Message giving details of the error, intended for human 2080 consumption. 2081 2082 errno_: Optional errno value associated with this error. "; 2083 2084 2085 // File: classXapian_1_1DatabaseOpeningError.xml 2086 %feature("docstring") Xapian::DatabaseOpeningError " 2087 2088 DatabaseOpeningError indicates failure to open a database. "; 2089 2090 %feature("docstring") 2091 Xapian::DatabaseOpeningError::DatabaseOpeningError " 2092 2093 General purpose constructor. 2094 2095 Xapian::DatabaseOpeningError::DatabaseOpeningError(const std::string 2096 &msg_, const std::string &context_=std::string(), int errno_=0) 2097 2098 Parameters: 2099 ----------- 2100 2101 msg_: Message giving details of the error, intended for human 2102 consumption. 2103 2104 context_: Optional context information for this error. 2105 2106 errno_: Optional errno value associated with this error. "; 2107 2108 %feature("docstring") 2109 Xapian::DatabaseOpeningError::DatabaseOpeningError " 2110 2111 Construct from message and errno value. 2112 2113 Xapian::DatabaseOpeningError::DatabaseOpeningError(const std::string 2114 &msg_, int errno_) 2115 2116 Parameters: 2117 ----------- 2118 2119 msg_: Message giving details of the error, intended for human 2120 consumption. 2121 2122 errno_: Optional errno value associated with this error. "; 2123 2124 2125 // File: classXapian_1_1DatabaseVersionError.xml 2126 %feature("docstring") Xapian::DatabaseVersionError " 2127 2128 DatabaseVersionError indicates that a database is in an unsupported 2129 format. 2130 2131 From time to time, new versions of Xapian will require the database 2132 format to be changed, to allow new information to be stored or new 2133 optimisations to be performed. Backwards compatibility will sometimes 2134 be maintained, so that new versions of Xapian can open old databases, 2135 but in some cases Xapian will be unable to open a database because it 2136 is in too old (or new) a format. This can be resolved either be 2137 upgrading or downgrading the version of Xapian in use, or by 2138 rebuilding the database from scratch with the current version of 2139 Xapian. "; 2140 2141 %feature("docstring") 2142 Xapian::DatabaseVersionError::DatabaseVersionError " 2143 2144 General purpose constructor. 2145 2146 Xapian::DatabaseVersionError::DatabaseVersionError(const std::string 2147 &msg_, const std::string &context_=std::string(), int errno_=0) 2148 2149 Parameters: 2150 ----------- 2151 2152 msg_: Message giving details of the error, intended for human 2153 consumption. 2154 2155 context_: Optional context information for this error. 2156 2157 errno_: Optional errno value associated with this error. "; 2158 2159 %feature("docstring") 2160 Xapian::DatabaseVersionError::DatabaseVersionError " 2161 2162 Construct from message and errno value. 2163 2164 Xapian::DatabaseVersionError::DatabaseVersionError(const std::string 2165 &msg_, int errno_) 2166 2167 Parameters: 2168 ----------- 2169 2170 msg_: Message giving details of the error, intended for human 2171 consumption. 2172 2173 errno_: Optional errno value associated with this error. "; 2174 2175 2176 // File: classXapian_1_1DateRangeProcessor.xml 2177 %feature("docstring") Xapian::DateRangeProcessor " 2178 2179 Handle a date range. 2180 2181 Begin and end must be dates in a recognised format. "; 2182 2183 %feature("docstring") Xapian::DateRangeProcessor::DateRangeProcessor 2184 " 2185 2186 Constructor. 2187 2188 Xapian::DateRangeProcessor::DateRangeProcessor(Xapian::valueno slot_, 2189 unsigned flags_=0, int epoch_year_=1970) 2190 2191 Parameters: 2192 ----------- 2193 2194 slot_: The value number to return from operator(). 2195 2196 flags_: Zero or more of the following flags, combined with bitwise- 2197 or: Xapian::RP_DATE_PREFER_MDY - interpret ambiguous dates as 2198 month/day/year rather than day/month/year. 2199 2200 epoch_year_: Year to use as the epoch for dates with 2 digit years 2201 (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). "; 2202 2203 %feature("docstring") Xapian::DateRangeProcessor::DateRangeProcessor 2204 " 2205 2206 Constructor. 2207 2208 Xapian::DateRangeProcessor::DateRangeProcessor(Xapian::valueno slot_, 2209 const std::string &str_, unsigned flags_=0, int epoch_year_=1970) 2210 2211 Parameters: 2212 ----------- 2213 2214 slot_: The value slot number to query. 2215 2216 str_: A string to look for to recognise values as belonging to this 2217 date range. 2218 2219 flags_: Zero or more of the following flags, combined with bitwise- 2220 or: Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix. 2221 2222 Xapian::RP_REPEATED - optionally allow str_ on both ends of the range 2223 - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on 2224 the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the 2225 end (e.g. 2..12kg). 2226 2227 Xapian::RP_DATE_PREFER_MDY - interpret ambiguous dates as 2228 month/day/year rather than day/month/year. 2229 2230 epoch_year_: Year to use as the epoch for dates with 2 digit years 2231 (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). 2232 2233 The string supplied in str_ is used by operator() to decide whether 2234 the pair of strings supplied to it constitute a valid range. If 2235 prefix_ is true, the first value in a range must begin with str_ (and 2236 the second value may optionally begin with str_); if prefix_ is false, 2237 the second value in a range must end with str_ (and the first value 2238 may optionally end with str_). 2239 2240 If str_ is empty, the Xapian::RP_SUFFIX and Xapian::RP_REPEATED are 2241 irrelevant, and no special strings are required at the start or end of 2242 the strings defining the range. 2243 2244 The remainder of both strings defining the endpoints must be valid 2245 dates. 2246 2247 For example, if str_ is \"created:\", Xapian::RP_SUFFIX is not 2248 specified, and the range processor has been added to the queryparser, 2249 the queryparser will accept \"created:1/1/2000..31/12/2001\". "; 2250 2251 2252 // File: classXapian_1_1DateValueRangeProcessor.xml 2253 %feature("docstring") Xapian::DateValueRangeProcessor " 2254 2255 Handle a date range. 2256 2257 Begin and end must be dates in a recognised format. 2258 2259 Deprecated Use Xapian::DateRangeProcessor instead (added in 1.3.6). "; 2260 2261 %feature("docstring") 2262 Xapian::DateValueRangeProcessor::DateValueRangeProcessor " 2263 2264 Constructor. 2265 2266 Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno 2267 slot_, bool prefer_mdy_=false, int epoch_year_=1970) 2268 2269 Parameters: 2270 ----------- 2271 2272 slot_: The value number to return from operator(). 2273 2274 prefer_mdy_: Should ambiguous dates be interpreted as month/day/year 2275 rather than day/month/year? (default: false) 2276 2277 epoch_year_: Year to use as the epoch for dates with 2 digit years 2278 (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). "; 2279 2280 %feature("docstring") 2281 Xapian::DateValueRangeProcessor::DateValueRangeProcessor " 2282 2283 Constructor. 2284 2285 Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno 2286 slot_, const std::string &str_, bool prefix_=true, bool 2287 prefer_mdy_=false, int epoch_year_=1970) 2288 2289 Parameters: 2290 ----------- 2291 2292 slot_: The value number to return from operator(). 2293 2294 str_: A string to look for to recognise values as belonging to this 2295 date range. 2296 2297 prefix_: Whether to look for the string at the start or end of the 2298 values. If true, the string is a prefix; if false, the string is a 2299 suffix (default: true). 2300 2301 prefer_mdy_: Should ambiguous dates be interpreted as month/day/year 2302 rather than day/month/year? (default: false) 2303 2304 epoch_year_: Year to use as the epoch for dates with 2 digit years 2305 (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). 2306 2307 The string supplied in str_ is used by operator() to decide whether 2308 the pair of strings supplied to it constitute a valid range. If 2309 prefix_ is true, the first value in a range must begin with str_ (and 2310 the second value may optionally begin with str_); if prefix_ is false, 2311 the second value in a range must end with str_ (and the first value 2312 may optionally end with str_). 2313 2314 If str_ is empty, the setting of prefix_ is irrelevant, and no special 2315 strings are required at the start or end of the strings defining the 2316 range. 2317 2318 The remainder of both strings defining the endpoints must be valid 2319 dates. 2320 2321 For example, if str_ is \"created:\" and prefix_ is true, and the 2322 range processor has been added to the queryparser, the queryparser 2323 will accept \"created:1/1/2000..31/12/2001\". "; 2324 2325 %feature("docstring") 2326 Xapian::DateValueRangeProcessor::DateValueRangeProcessor " 2327 2328 Constructor. 2329 2330 Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno 2331 slot_, const char *str_, bool prefix_=true, bool prefer_mdy_=false, 2332 int epoch_year_=1970) 2333 2334 This is like the previous version, but with const char * instead of 2335 std::string - we need this overload as otherwise 2336 DateValueRangeProcessor(1, \"date:\") quietly interprets the second 2337 argument as a boolean in preference to std::string. If you want to be 2338 compatible with 1.2.12 and earlier, then explicitly convert to 2339 std::string, i.e.: DateValueRangeProcessor(1, std::string(\"date:\")) 2340 2341 Parameters: 2342 ----------- 2343 2344 slot_: The value number to return from operator(). 2345 2346 str_: A string to look for to recognise values as belonging to this 2347 date range. 2348 2349 prefix_: Whether to look for the string at the start or end of the 2350 values. If true, the string is a prefix; if false, the string is a 2351 suffix (default: true). 2352 2353 prefer_mdy_: Should ambiguous dates be interpreted as month/day/year 2354 rather than day/month/year? (default: false) 2355 2356 epoch_year_: Year to use as the epoch for dates with 2 digit years 2357 (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). 2358 2359 The string supplied in str_ is used by operator() to decide whether 2360 the pair of strings supplied to it constitute a valid range. If 2361 prefix_ is true, the first value in a range must begin with str_ (and 2362 the second value may optionally begin with str_); if prefix_ is false, 2363 the second value in a range must end with str_ (and the first value 2364 may optionally end with str_). 2365 2366 If str_ is empty, the setting of prefix_ is irrelevant, and no special 2367 strings are required at the start or end of the strings defining the 2368 range. 2369 2370 The remainder of both strings defining the endpoints must be valid 2371 dates. 2372 2373 For example, if str_ is \"created:\" and prefix_ is true, and the 2374 range processor has been added to the queryparser, the queryparser 2375 will accept \"created:1/1/2000..31/12/2001\". "; 2376 2377 2378 // File: classXapian_1_1DecreasingValueWeightPostingSource.xml 2379 %feature("docstring") Xapian::DecreasingValueWeightPostingSource " 2380 2381 Read weights from a value which is known to decrease as docid 2382 increases. 2383 2384 This posting source can be used, like ValueWeightPostingSource, to add 2385 a weight contribution to a query based on the values stored in a slot. 2386 The values in the slot must be serialised as by sortable_serialise(). 2387 2388 However, this posting source is additionally given a range of document 2389 IDs, within which the weight is known to be decreasing. ie, for all 2390 documents with ids A and B within this range (including the 2391 endpoints), where A is less than B, the weight of A is less than or 2392 equal to the weight of B. This can allow the posting source to skip to 2393 the end of the range quickly if insufficient weight is left in the 2394 posting source for a particular source. 2395 2396 By default, the range is assumed to cover all document IDs. 2397 2398 The ordering property can be arranged at index time, or by sorting an 2399 indexed database to produce a new, sorted, database. "; 2400 2401 %feature("docstring") 2402 Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource 2403 " 2404 2405 Construct a DecreasingValueWeightPostingSource. 2406 2407 Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno 2408 slot_, Xapian::docid range_start_=0, Xapian::docid range_end_=0) 2409 2410 Parameters: 2411 ----------- 2412 2413 slot_: The value slot to read values from. 2414 2415 range_start_: Start of range of docids for which weights are known to 2416 be decreasing (default: first docid) 2417 2418 range_end_: End of range of docids for which weights are known to be 2419 decreasing (default: last docid) "; 2420 2421 %feature("docstring") 2422 Xapian::DecreasingValueWeightPostingSource::get_weight " 2423 2424 Return the weight contribution for the current document. 2425 2426 double Xapian::DecreasingValueWeightPostingSource::get_weight() const 2427 2428 This default implementation always returns 0, for convenience when 2429 implementing \"weight-less\" PostingSource subclasses. 2430 2431 This method may assume that it will only be called when there is a 2432 \"current document\". In detail: Xapian will always call init() on a 2433 PostingSource before calling this for the first time. It will also 2434 only call this if the PostingSource reports that it is pointing to a 2435 valid document (ie, it will not call it before calling at least one of 2436 next(), skip_to() or check(), and will ensure that the PostingSource 2437 is not at the end by calling at_end()). "; 2438 2439 %feature("docstring") 2440 Xapian::DecreasingValueWeightPostingSource::clone " 2441 2442 Clone the posting source. 2443 2444 DecreasingValueWeightPostingSource* 2445 Xapian::DecreasingValueWeightPostingSource::clone() const 2446 2447 The clone should inherit the configuration of the parent, but need not 2448 inherit the state. ie, the clone does not need to be in the same 2449 iteration position as the original: the matcher will always call 2450 init() on the clone before attempting to move the iterator, or read 2451 the information about the current position of the iterator. 2452 2453 This may return NULL to indicate that cloning is not supported. In 2454 this case, the PostingSource may only be used with a single-database 2455 search. 2456 2457 The default implementation returns NULL. 2458 2459 Note that the returned object will be deallocated by Xapian after use 2460 with \"delete\". If you want to handle the deletion in a special way 2461 (for example when wrapping the Xapian API for use from another 2462 language) then you can define a static operator delete method in your 2463 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 2464 2465 %feature("docstring") 2466 Xapian::DecreasingValueWeightPostingSource::name " 2467 2468 Name of the posting source class. 2469 2470 std::string Xapian::DecreasingValueWeightPostingSource::name() const 2471 2472 This is used when serialising and unserialising posting sources; for 2473 example, for performing remote searches. 2474 2475 If the subclass is in a C++ namespace, the namespace should be 2476 included in the name, using \"::\" as a separator. For example, for a 2477 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 2478 namespace the result of this call should be 2479 \"Xapian::FooPostingSource\". 2480 2481 This should only be implemented if serialise() and unserialise() are 2482 also implemented. The default implementation returns an empty string. 2483 2484 If this returns an empty string, Xapian will assume that serialise() 2485 and unserialise() are not implemented. "; 2486 2487 %feature("docstring") 2488 Xapian::DecreasingValueWeightPostingSource::serialise " 2489 2490 Serialise object parameters into a string. 2491 2492 std::string Xapian::DecreasingValueWeightPostingSource::serialise() 2493 const 2494 2495 The serialised parameters should represent the configuration of the 2496 posting source, but need not (indeed, should not) represent the 2497 current iteration state. 2498 2499 If you don't want to support the remote backend, you can use the 2500 default implementation which simply throws Xapian::UnimplementedError. 2501 "; 2502 2503 %feature("docstring") 2504 Xapian::DecreasingValueWeightPostingSource::unserialise " 2505 2506 Create object given string serialisation returned by serialise(). 2507 2508 DecreasingValueWeightPostingSource* 2509 Xapian::DecreasingValueWeightPostingSource::unserialise(const 2510 std::string &serialised) const 2511 2512 Note that the returned object will be deallocated by Xapian after use 2513 with \"delete\". If you want to handle the deletion in a special way 2514 (for example when wrapping the Xapian API for use from another 2515 language) then you can define a static operator delete method in your 2516 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 2517 2518 If you don't want to support the remote backend, you can use the 2519 default implementation which simply throws Xapian::UnimplementedError. 2520 2521 Parameters: 2522 ----------- 2523 2524 serialised: A serialised instance of this PostingSource subclass. "; 2525 2526 %feature("docstring") 2527 Xapian::DecreasingValueWeightPostingSource::init " 2528 2529 Set this PostingSource to the start of the list of postings. 2530 2531 void Xapian::DecreasingValueWeightPostingSource::init(const 2532 Xapian::Database &db_) 2533 2534 This is called automatically by the matcher prior to each query being 2535 processed. 2536 2537 If a PostingSource is used for multiple searches, init() will 2538 therefore be called multiple times, and must handle this by using the 2539 database passed in the most recent call. 2540 2541 Parameters: 2542 ----------- 2543 2544 db: The database which the PostingSource should iterate through. 2545 2546 Note: in the case of a multi-database search, a separate PostingSource 2547 will be used for each database (the separate PostingSources will be 2548 obtained using clone()), and each PostingSource will be passed one of 2549 the sub-databases as the db parameter here. The db parameter will 2550 therefore always refer to a single database. All docids passed to, or 2551 returned from, the PostingSource refer to docids in that single 2552 database, rather than in the multi- database. "; 2553 2554 %feature("docstring") 2555 Xapian::DecreasingValueWeightPostingSource::next " 2556 2557 Advance the current position to the next matching document. 2558 2559 void Xapian::DecreasingValueWeightPostingSource::next(double min_wt) 2560 2561 The PostingSource starts before the first entry in the list, so 2562 next(), skip_to() or check() must be called before any methods which 2563 need the context of the current position. 2564 2565 Xapian will always call init() on a PostingSource before calling this 2566 for the first time. 2567 2568 Parameters: 2569 ----------- 2570 2571 min_wt: The minimum weight contribution that is needed (this is just 2572 a hint which subclasses may ignore). "; 2573 2574 %feature("docstring") 2575 Xapian::DecreasingValueWeightPostingSource::skip_to " 2576 2577 Advance to the specified docid. 2578 2579 void Xapian::DecreasingValueWeightPostingSource::skip_to(Xapian::docid 2580 min_docid, double min_wt) 2581 2582 If the specified docid isn't in the list, position ourselves on the 2583 first document after it (or at_end() if no greater docids are 2584 present). 2585 2586 If the current position is already the specified docid, this method 2587 will leave the position unmodified. 2588 2589 If the specified docid is earlier than the current position, the 2590 behaviour is unspecified. A sensible behaviour would be to leave the 2591 current position unmodified, but it is also reasonable to move to the 2592 specified docid. 2593 2594 The default implementation calls next() repeatedly, which works but 2595 skip_to() can often be implemented much more efficiently. 2596 2597 Xapian will always call init() on a PostingSource before calling this 2598 for the first time. 2599 2600 Note: in the case of a multi-database search, the docid specified is 2601 the docid in the single subdatabase relevant to this posting source. 2602 See the init() method for details. 2603 2604 Parameters: 2605 ----------- 2606 2607 did: The document id to advance to. 2608 2609 min_wt: The minimum weight contribution that is needed (this is just 2610 a hint which subclasses may ignore). "; 2611 2612 %feature("docstring") 2613 Xapian::DecreasingValueWeightPostingSource::check " 2614 2615 Check if the specified docid occurs. 2616 2617 bool Xapian::DecreasingValueWeightPostingSource::check(Xapian::docid 2618 min_docid, double min_wt) 2619 2620 The caller is required to ensure that the specified document id did 2621 actually exists in the database. If it does, it must move to that 2622 document id, and return true. If it does not, it may either: 2623 2624 return true, having moved to a definite position (including 2625 \"at_end\"), which must be the same position as skip_to() would have 2626 moved to. 2627 2628 or 2629 2630 return false, having moved to an \"indeterminate\" position, such that 2631 a subsequent call to next() or skip_to() will move to the next 2632 matching position after did. 2633 2634 Generally, this method should act like skip_to() and return true if 2635 that can be done at little extra cost. 2636 2637 Otherwise it should simply check if a particular docid is present, 2638 returning true if it is, and false if it isn't. 2639 2640 The default implementation calls skip_to() and always returns true. 2641 2642 Xapian will always call init() on a PostingSource before calling this 2643 for the first time. 2644 2645 Note: in the case of a multi-database search, the docid specified is 2646 the docid in the single subdatabase relevant to this posting source. 2647 See the init() method for details. 2648 2649 Parameters: 2650 ----------- 2651 2652 did: The document id to check. 2653 2654 min_wt: The minimum weight contribution that is needed (this is just 2655 a hint which subclasses may ignore). "; 2656 2657 %feature("docstring") 2658 Xapian::DecreasingValueWeightPostingSource::get_description " 2659 2660 Return a string describing this object. 2661 2662 std::string 2663 Xapian::DecreasingValueWeightPostingSource::get_description() const 2664 2665 This default implementation returns a generic answer. This default it 2666 provided to avoid forcing those deriving their own PostingSource 2667 subclass from having to implement this (they may not care what 2668 get_description() gives for their subclass). "; 2669 2670 2671 // File: classXapian_1_1DLHWeight.xml 2672 %feature("docstring") Xapian::DLHWeight " 2673 2674 This class implements the DLH weighting scheme, which is a 2675 representative scheme of the Divergence from Randomness Framework by 2676 Gianni Amati. 2677 2678 This is a parameter free weighting scheme and it should be used with 2679 query expansion to obtain better results. It uses the HyperGeometric 2680 Probabilistic model and Laplace's normalization to calculate the risk 2681 gain. 2682 2683 For more information about the DFR Framework and the DLH scheme, 2684 please refer to : a.) Gianni Amati and Cornelis Joost Van Rijsbergen 2685 Probabilistic models of information retrieval based on measuring the 2686 divergence from randomness ACM Transactions on Information Systems 2687 (TOIS) 20, (4), 2002, pp. 357-389. b.) FUB, IASI-CNR and University of 2688 Tor Vergata at TREC 2007 Blog Track. G. Amati and E. Ambrosi and M. 2689 Bianchi and C. Gaibisso and G. Gambosi. Proceedings of the 16th Text 2690 REtrieval Conference (TREC-2007), 2008. "; 2691 2692 %feature("docstring") Xapian::DLHWeight::DLHWeight "Xapian::DLHWeight::DLHWeight() "; 2693 2694 %feature("docstring") Xapian::DLHWeight::name " 2695 2696 Return the name of this weighting scheme. 2697 2698 std::string Xapian::DLHWeight::name() const 2699 2700 This name is used by the remote backend. It is passed along with the 2701 serialised parameters to the remote server so that it knows which 2702 class to create. 2703 2704 Return the full namespace-qualified name of your class here - if your 2705 class is called FooWeight, return \"FooWeight\" from this method ( 2706 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 2707 2708 If you don't want to support the remote backend, you can use the 2709 default implementation which simply returns an empty string. "; 2710 2711 %feature("docstring") Xapian::DLHWeight::serialise " 2712 2713 Return this object's parameters serialised as a single string. 2714 2715 std::string Xapian::DLHWeight::serialise() const 2716 2717 If you don't want to support the remote backend, you can use the 2718 default implementation which simply throws Xapian::UnimplementedError. 2719 "; 2720 2721 %feature("docstring") Xapian::DLHWeight::unserialise " 2722 2723 Unserialise parameters. 2724 2725 DLHWeight* Xapian::DLHWeight::unserialise(const std::string 2726 &serialised) const 2727 2728 This method unserialises parameters serialised by the serialise() 2729 method and allocates and returns a new object initialised with them. 2730 2731 If you don't want to support the remote backend, you can use the 2732 default implementation which simply throws Xapian::UnimplementedError. 2733 2734 Note that the returned object will be deallocated by Xapian after use 2735 with \"delete\". If you want to handle the deletion in a special way 2736 (for example when wrapping the Xapian API for use from another 2737 language) then you can define a static operator delete method in your 2738 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 2739 2740 Parameters: 2741 ----------- 2742 2743 serialised: A string containing the serialised parameters. "; 2744 2745 %feature("docstring") Xapian::DLHWeight::get_sumpart " 2746 2747 Calculate the weight contribution for this object's term to a 2748 document. 2749 2750 double Xapian::DLHWeight::get_sumpart(Xapian::termcount wdf, 2751 Xapian::termcount doclen, Xapian::termcount uniqterms) const 2752 2753 The parameters give information about the document which may be used 2754 in the calculations: 2755 2756 Parameters: 2757 ----------- 2758 2759 wdf: The within document frequency of the term in the document. 2760 2761 doclen: The document's length (unnormalised). 2762 2763 uniqterms: Number of unique terms in the document (used for absolute 2764 smoothing). "; 2765 2766 %feature("docstring") Xapian::DLHWeight::get_maxpart " 2767 2768 Return an upper bound on what get_sumpart() can return for any 2769 document. 2770 2771 double Xapian::DLHWeight::get_maxpart() const 2772 2773 This information is used by the matcher to perform various 2774 optimisations, so strive to make the bound as tight as possible. "; 2775 2776 %feature("docstring") Xapian::DLHWeight::get_sumextra " 2777 2778 Calculate the term-independent weight component for a document. 2779 2780 double Xapian::DLHWeight::get_sumextra(Xapian::termcount doclen, 2781 Xapian::termcount uniqterms) const 2782 2783 The parameter gives information about the document which may be used 2784 in the calculations: 2785 2786 Parameters: 2787 ----------- 2788 2789 doclen: The document's length (unnormalised). 2790 2791 uniqterms: The number of unique terms in the document. "; 2792 2793 %feature("docstring") Xapian::DLHWeight::get_maxextra " 2794 2795 Return an upper bound on what get_sumextra() can return for any 2796 document. 2797 2798 double Xapian::DLHWeight::get_maxextra() const 2799 2800 This information is used by the matcher to perform various 2801 optimisations, so strive to make the bound as tight as possible. "; 2802 2803 2804 // File: classXapian_1_1DocNotFoundError.xml 2805 %feature("docstring") Xapian::DocNotFoundError " 2806 2807 Indicates an attempt to access a document not present in the database. 2808 "; 2809 2810 %feature("docstring") Xapian::DocNotFoundError::DocNotFoundError " 2811 2812 General purpose constructor. 2813 2814 Xapian::DocNotFoundError::DocNotFoundError(const std::string &msg_, 2815 const std::string &context_=std::string(), int errno_=0) 2816 2817 Parameters: 2818 ----------- 2819 2820 msg_: Message giving details of the error, intended for human 2821 consumption. 2822 2823 context_: Optional context information for this error. 2824 2825 errno_: Optional errno value associated with this error. "; 2826 2827 %feature("docstring") Xapian::DocNotFoundError::DocNotFoundError " 2828 2829 Construct from message and errno value. 2830 2831 Xapian::DocNotFoundError::DocNotFoundError(const std::string &msg_, 2832 int errno_) 2833 2834 Parameters: 2835 ----------- 2836 2837 msg_: Message giving details of the error, intended for human 2838 consumption. 2839 2840 errno_: Optional errno value associated with this error. "; 2841 2842 2843 // File: classXapian_1_1Document.xml 2844 %feature("docstring") Xapian::Document " 2845 2846 A handle representing a document in a Xapian database. 2847 2848 The Document class fetches information from the database lazily. 2849 Usually this behaviour isn't visible to users (except for the speed 2850 benefits), but if the document in the database is modified or deleted, 2851 then preexisting Document objects may return the old or new versions 2852 of data (or throw Xapian::DocNotFoundError in the case of deletion). 2853 2854 Since Database objects work on a snapshot of the database's state, the 2855 situation above can only happen with a WritableDatabase object, or if 2856 you call Database::reopen() on a Database object. 2857 2858 We recommend you avoid designs where this behaviour is an issue, but 2859 if you need a way to make a non-lazy version of a Document object, you 2860 can do this like so:doc = 2861 Xapian::Document::unserialise(doc.serialise()); "; 2862 2863 %feature("docstring") Xapian::Document::Document " 2864 2865 Copying is allowed. 2866 2867 Xapian::Document::Document(const Document &other) 2868 2869 The internals are reference counted, so copying is cheap. 2870 2871 Parameters: 2872 ----------- 2873 2874 other: The object to copy. "; 2875 2876 %feature("docstring") Xapian::Document::Document " 2877 2878 Make a new empty Document. 2879 2880 Xapian::Document::Document() "; 2881 2882 %feature("docstring") Xapian::Document::~Document " 2883 2884 Destructor. 2885 2886 Xapian::Document::~Document() "; 2887 2888 %feature("docstring") Xapian::Document::get_value " 2889 2890 Get value by number. 2891 2892 std::string Xapian::Document::get_value(Xapian::valueno slot) const 2893 2894 Returns an empty string if no value with the given number is present 2895 in the document. 2896 2897 Parameters: 2898 ----------- 2899 2900 slot: The number of the value. "; 2901 2902 %feature("docstring") Xapian::Document::add_value " 2903 2904 Add a new value. 2905 2906 void Xapian::Document::add_value(Xapian::valueno slot, const 2907 std::string &value) 2908 2909 The new value will replace any existing value with the same number (or 2910 if the new value is empty, it will remove any existing value with the 2911 same number). 2912 2913 Parameters: 2914 ----------- 2915 2916 slot: The value slot to add the value in. 2917 2918 value: The value to set. "; 2919 2920 %feature("docstring") Xapian::Document::remove_value " 2921 2922 Remove any value with the given number. 2923 2924 void Xapian::Document::remove_value(Xapian::valueno slot) "; 2925 2926 %feature("docstring") Xapian::Document::clear_values " 2927 2928 Remove all values associated with the document. 2929 2930 void Xapian::Document::clear_values() "; 2931 2932 %feature("docstring") Xapian::Document::get_data " 2933 2934 Get data stored in the document. 2935 2936 std::string Xapian::Document::get_data() const 2937 2938 This is potentially a relatively expensive operation, and shouldn't 2939 normally be used during the match (e.g. in a PostingSource or match 2940 decider functor. Put data for use by match deciders in a value 2941 instead. "; 2942 2943 %feature("docstring") Xapian::Document::set_data " 2944 2945 Set data stored in the document. 2946 2947 void Xapian::Document::set_data(const std::string &data) 2948 2949 Xapian treats the data as an opaque blob. It may try to compress it, 2950 but other than that it will just store it and return it when 2951 requested. 2952 2953 Parameters: 2954 ----------- 2955 2956 data: The data to store. "; 2957 2958 %feature("docstring") Xapian::Document::add_posting " 2959 2960 Add an occurrence of a term at a particular position. 2961 2962 void Xapian::Document::add_posting(const std::string &tname, 2963 Xapian::termpos tpos, Xapian::termcount wdfinc=1) 2964 2965 Multiple occurrences of the term at the same position are represented 2966 only once in the positional information, but do increase the wdf. 2967 2968 If the term is not already in the document, it will be added to it. 2969 2970 Parameters: 2971 ----------- 2972 2973 tname: The name of the term. 2974 2975 tpos: The position of the term. 2976 2977 wdfinc: The increment that will be applied to the wdf for this term. 2978 "; 2979 2980 %feature("docstring") Xapian::Document::add_term " 2981 2982 Add a term to the document, without positional information. 2983 2984 void Xapian::Document::add_term(const std::string &tname, 2985 Xapian::termcount wdfinc=1) 2986 2987 Any existing positional information for the term will be left 2988 unmodified. 2989 2990 Parameters: 2991 ----------- 2992 2993 tname: The name of the term. 2994 2995 wdfinc: The increment that will be applied to the wdf for this term 2996 (default: 1). "; 2997 2998 %feature("docstring") Xapian::Document::add_boolean_term " 2999 3000 Add a boolean filter term to the document. 3001 3002 void Xapian::Document::add_boolean_term(const std::string &term) 3003 3004 This method adds term to the document with wdf of 0 - this is 3005 generally what you want for a term used for boolean filtering as the 3006 wdf of such terms is ignored, and it doesn't make sense for them to 3007 contribute to the document's length. 3008 3009 If the specified term already indexes this document, this method has 3010 no effect. 3011 3012 It is exactly the same as add_term(term, 0). 3013 3014 This method was added in Xapian 1.0.18. 3015 3016 Parameters: 3017 ----------- 3018 3019 term: The term to add. "; 3020 3021 %feature("docstring") Xapian::Document::remove_posting " 3022 3023 Remove a posting of a term from the document. 3024 3025 void Xapian::Document::remove_posting(const std::string &tname, 3026 Xapian::termpos tpos, Xapian::termcount wdfdec=1) 3027 3028 Note that the term will still index the document even if all 3029 occurrences are removed. To remove a term from a document completely, 3030 use remove_term(). 3031 3032 Parameters: 3033 ----------- 3034 3035 tname: The name of the term. 3036 3037 tpos: The position of the term. 3038 3039 wdfdec: The decrement that will be applied to the wdf when removing 3040 this posting. The wdf will not go below the value of 0. 3041 3042 Parameters: 3043 ----------- 3044 3045 Xapian::InvalidArgumentError: will be thrown if the term is not at 3046 the position specified in the position list for this term in this 3047 document. 3048 3049 Xapian::InvalidArgumentError: will be thrown if the term is not in 3050 the document "; 3051 3052 %feature("docstring") Xapian::Document::remove_postings " 3053 3054 Remove a range of postings for a term. 3055 3056 Xapian::termpos Xapian::Document::remove_postings(const std::string 3057 &term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last, 3058 Xapian::termcount wdf_dec=1) 3059 3060 Any instances of the term at positions >= term_pos_first and <= 3061 term_pos_last will be removed, and the wdf reduced by wdf_dec for each 3062 instance removed (the wdf will not ever go below zero though). 3063 3064 It's OK if the term doesn't occur in the range of positions specified 3065 (unlike remove_posting()). And if term_pos_first > term_pos_last, 3066 this method does nothing. 3067 3068 The number of postings removed. 3069 3070 Parameters: 3071 ----------- 3072 3073 Xapian::InvalidArgumentError: will be thrown if the term is not in 3074 the document 3075 3076 Added in Xapian 1.4.8. "; 3077 3078 %feature("docstring") Xapian::Document::remove_term " 3079 3080 Remove a term and all postings associated with it. 3081 3082 void Xapian::Document::remove_term(const std::string &tname) 3083 3084 Parameters: 3085 ----------- 3086 3087 tname: The name of the term. 3088 3089 Parameters: 3090 ----------- 3091 3092 Xapian::InvalidArgumentError: will be thrown if the term is not in 3093 the document "; 3094 3095 %feature("docstring") Xapian::Document::clear_terms " 3096 3097 Remove all terms (and postings) from the document. 3098 3099 void Xapian::Document::clear_terms() "; 3100 3101 %feature("docstring") Xapian::Document::termlist_count " 3102 3103 The length of the termlist - i.e. 3104 3105 Xapian::termcount Xapian::Document::termlist_count() const 3106 3107 the number of different terms which index this document. "; 3108 3109 %feature("docstring") Xapian::Document::termlist_begin " 3110 3111 Iterator for the terms in this document. 3112 3113 TermIterator Xapian::Document::termlist_begin() const "; 3114 3115 %feature("docstring") Xapian::Document::termlist_end " 3116 3117 Equivalent end iterator for termlist_begin(). 3118 3119 TermIterator Xapian::Document::termlist_end() const "; 3120 3121 %feature("docstring") Xapian::Document::values_count " 3122 3123 Count the values in this document. 3124 3125 Xapian::termcount Xapian::Document::values_count() const "; 3126 3127 %feature("docstring") Xapian::Document::values_begin " 3128 3129 Iterator for the values in this document. 3130 3131 ValueIterator Xapian::Document::values_begin() const "; 3132 3133 %feature("docstring") Xapian::Document::values_end " 3134 3135 Equivalent end iterator for values_begin(). 3136 3137 ValueIterator Xapian::Document::values_end() const "; 3138 3139 %feature("docstring") Xapian::Document::get_docid " 3140 3141 Get the document id which is associated with this document (if any). 3142 3143 docid Xapian::Document::get_docid() const 3144 3145 NB If multiple databases are being searched together, then this will 3146 be the document id in the individual database, not the merged 3147 database! 3148 3149 If this document came from a database, return the document id in that 3150 database. Otherwise, return 0 (in Xapian 1.0.22/1.2.4 or later; prior 3151 to this the returned value was uninitialised). "; 3152 3153 %feature("docstring") Xapian::Document::serialise " 3154 3155 Serialise document into a string. 3156 3157 std::string Xapian::Document::serialise() const 3158 3159 The document representation may change between Xapian releases: even 3160 between minor versions. However, it is guaranteed not to change if the 3161 remote database protocol has not changed between releases. "; 3162 3163 %feature("docstring") Xapian::Document::get_description " 3164 3165 Return a string describing this object. 3166 3167 std::string Xapian::Document::get_description() const "; 3168 3169 3170 // File: classXapian_1_1DPHWeight.xml 3171 %feature("docstring") Xapian::DPHWeight " 3172 3173 This class implements the DPH weighting scheme. 3174 3175 DPH is a representative scheme of the Divergence from Randomness 3176 Framework by Gianni Amati. 3177 3178 This is a parameter free weighting scheme and it should be used with 3179 query expansion to obtain better results. It uses the HyperGeometric 3180 Probabilistic model and Popper's normalization to calculate the risk 3181 gain. 3182 3183 For more information about the DFR Framework and the DPH scheme, 3184 please refer to : a.) Gianni Amati and Cornelis Joost Van Rijsbergen 3185 Probabilistic models of information retrieval based on measuring the 3186 divergence from randomness ACM Transactions on Information Systems 3187 (TOIS) 20, (4), 2002, pp. 357-389. b.) FUB, IASI-CNR and University of 3188 Tor Vergata at TREC 2007 Blog Track. G. Amati and E. Ambrosi and M. 3189 Bianchi and C. Gaibisso and G. Gambosi. Proceedings of the 16th Text 3190 Retrieval Conference (TREC-2007), 2008. "; 3191 3192 %feature("docstring") Xapian::DPHWeight::DPHWeight " 3193 3194 Construct a DPHWeight. 3195 3196 Xapian::DPHWeight::DPHWeight() "; 3197 3198 %feature("docstring") Xapian::DPHWeight::name " 3199 3200 Return the name of this weighting scheme. 3201 3202 std::string Xapian::DPHWeight::name() const 3203 3204 This name is used by the remote backend. It is passed along with the 3205 serialised parameters to the remote server so that it knows which 3206 class to create. 3207 3208 Return the full namespace-qualified name of your class here - if your 3209 class is called FooWeight, return \"FooWeight\" from this method ( 3210 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 3211 3212 If you don't want to support the remote backend, you can use the 3213 default implementation which simply returns an empty string. "; 3214 3215 %feature("docstring") Xapian::DPHWeight::serialise " 3216 3217 Return this object's parameters serialised as a single string. 3218 3219 std::string Xapian::DPHWeight::serialise() const 3220 3221 If you don't want to support the remote backend, you can use the 3222 default implementation which simply throws Xapian::UnimplementedError. 3223 "; 3224 3225 %feature("docstring") Xapian::DPHWeight::unserialise " 3226 3227 Unserialise parameters. 3228 3229 DPHWeight* Xapian::DPHWeight::unserialise(const std::string 3230 &serialised) const 3231 3232 This method unserialises parameters serialised by the serialise() 3233 method and allocates and returns a new object initialised with them. 3234 3235 If you don't want to support the remote backend, you can use the 3236 default implementation which simply throws Xapian::UnimplementedError. 3237 3238 Note that the returned object will be deallocated by Xapian after use 3239 with \"delete\". If you want to handle the deletion in a special way 3240 (for example when wrapping the Xapian API for use from another 3241 language) then you can define a static operator delete method in your 3242 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 3243 3244 Parameters: 3245 ----------- 3246 3247 serialised: A string containing the serialised parameters. "; 3248 3249 %feature("docstring") Xapian::DPHWeight::get_sumpart " 3250 3251 Calculate the weight contribution for this object's term to a 3252 document. 3253 3254 double Xapian::DPHWeight::get_sumpart(Xapian::termcount wdf, 3255 Xapian::termcount doclen, Xapian::termcount uniqterms) const 3256 3257 The parameters give information about the document which may be used 3258 in the calculations: 3259 3260 Parameters: 3261 ----------- 3262 3263 wdf: The within document frequency of the term in the document. 3264 3265 doclen: The document's length (unnormalised). 3266 3267 uniqterms: Number of unique terms in the document (used for absolute 3268 smoothing). "; 3269 3270 %feature("docstring") Xapian::DPHWeight::get_maxpart " 3271 3272 Return an upper bound on what get_sumpart() can return for any 3273 document. 3274 3275 double Xapian::DPHWeight::get_maxpart() const 3276 3277 This information is used by the matcher to perform various 3278 optimisations, so strive to make the bound as tight as possible. "; 3279 3280 %feature("docstring") Xapian::DPHWeight::get_sumextra " 3281 3282 Calculate the term-independent weight component for a document. 3283 3284 double Xapian::DPHWeight::get_sumextra(Xapian::termcount doclen, 3285 Xapian::termcount uniqterms) const 3286 3287 The parameter gives information about the document which may be used 3288 in the calculations: 3289 3290 Parameters: 3291 ----------- 3292 3293 doclen: The document's length (unnormalised). 3294 3295 uniqterms: The number of unique terms in the document. "; 3296 3297 %feature("docstring") Xapian::DPHWeight::get_maxextra " 3298 3299 Return an upper bound on what get_sumextra() can return for any 3300 document. 3301 3302 double Xapian::DPHWeight::get_maxextra() const 3303 3304 This information is used by the matcher to perform various 3305 optimisations, so strive to make the bound as tight as possible. "; 3306 3307 3308 // File: classXapian_1_1Enquire.xml 3309 %feature("docstring") Xapian::Enquire " 3310 3311 This class provides an interface to the information retrieval system 3312 for the purpose of searching. 3313 3314 Databases are usually opened lazily, so exceptions may not be thrown 3315 where you would expect them to be. You should catch Xapian::Error 3316 exceptions when calling any method in Xapian::Enquire. 3317 3318 Parameters: 3319 ----------- 3320 3321 Xapian::InvalidArgumentError: will be thrown if an invalid argument 3322 is supplied, for example, an unknown database type. "; 3323 3324 %feature("docstring") Xapian::Enquire::Enquire " 3325 3326 Copying is allowed (and is cheap). 3327 3328 Xapian::Enquire::Enquire(const Enquire &other) "; 3329 3330 %feature("docstring") Xapian::Enquire::Enquire " 3331 3332 Create a Xapian::Enquire object. 3333 3334 Xapian::Enquire::Enquire(const Database &database) 3335 3336 This specification cannot be changed once the Xapian::Enquire is 3337 opened: you must create a new Xapian::Enquire object to access a 3338 different database, or set of databases. 3339 3340 The database supplied must have been initialised (ie, must not be the 3341 result of calling the Database::Database() constructor). If you need 3342 to handle a situation where you have no databases gracefully, a 3343 database created with DB_BACKEND_INMEMORY can be passed here to 3344 provide a completely empty database. 3345 3346 Parameters: 3347 ----------- 3348 3349 database: Specification of the database or databases to use. 3350 3351 Parameters: 3352 ----------- 3353 3354 Xapian::InvalidArgumentError: will be thrown if an empty Database 3355 object is supplied. "; 3356 3357 %feature("docstring") Xapian::Enquire::Enquire " 3358 3359 Create a Xapian::Enquire object. 3360 3361 Xapian::Enquire::Enquire(const Database &database, ErrorHandler 3362 *errorhandler_) 3363 3364 This specification cannot be changed once the Xapian::Enquire is 3365 opened: you must create a new Xapian::Enquire object to access a 3366 different database, or set of databases. 3367 3368 The database supplied must have been initialised (ie, must not be the 3369 result of calling the Database::Database() constructor). If you need 3370 to handle a situation where you have no databases gracefully, a 3371 database created with DB_BACKEND_INMEMORY can be passed here to 3372 provide a completely empty database. 3373 3374 Parameters: 3375 ----------- 3376 3377 database: Specification of the database or databases to use. 3378 3379 errorhandler_: This parameter is deprecated (since Xapian 1.3.1), and 3380 as of 1.3.5 it's ignored completely. 3381 3382 Parameters: 3383 ----------- 3384 3385 Xapian::InvalidArgumentError: will be thrown if an empty Database 3386 object is supplied. "; 3387 3388 %feature("docstring") Xapian::Enquire::~Enquire " 3389 3390 Close the Xapian::Enquire object. 3391 3392 Xapian::Enquire::~Enquire() "; 3393 3394 %feature("docstring") Xapian::Enquire::set_query " 3395 3396 Set the query to run. 3397 3398 void Xapian::Enquire::set_query(const Xapian::Query &query, 3399 Xapian::termcount qlen=0) 3400 3401 Parameters: 3402 ----------- 3403 3404 query: the new query to run. 3405 3406 qlen: the query length to use in weight calculations - by default the 3407 sum of the wqf of all terms is used. "; 3408 3409 %feature("docstring") Xapian::Enquire::get_query " 3410 3411 Get the current query. 3412 3413 const Xapian::Query& Xapian::Enquire::get_query() const 3414 3415 If called before set_query(), this will return a default initialised 3416 Query object. "; 3417 3418 %feature("docstring") Xapian::Enquire::add_matchspy " 3419 3420 Add a matchspy. 3421 3422 void Xapian::Enquire::add_matchspy(MatchSpy *spy) 3423 3424 This matchspy will be called with some of the documents which match 3425 the query, during the match process. Exactly which of the matching 3426 documents are passed to it depends on exactly when certain 3427 optimisations occur during the match process, but it can be controlled 3428 to some extent by setting the checkatleast parameter to get_mset(). 3429 3430 In particular, if there are enough matching documents, at least the 3431 number specified by checkatleast will be passed to the matchspy. This 3432 means that you can force the matchspy to be shown all matching 3433 documents by setting checkatleast to the number of documents in the 3434 database. 3435 3436 Parameters: 3437 ----------- 3438 3439 spy: The MatchSpy subclass to add. The caller must ensure that this 3440 remains valid while the Enquire object remains active, or until 3441 clear_matchspies() is called. "; 3442 3443 %feature("docstring") Xapian::Enquire::clear_matchspies " 3444 3445 Remove all the matchspies. 3446 3447 void Xapian::Enquire::clear_matchspies() "; 3448 3449 %feature("docstring") Xapian::Enquire::set_weighting_scheme " 3450 3451 Set the weighting scheme to use for queries. 3452 3453 void Xapian::Enquire::set_weighting_scheme(const Weight &weight_) 3454 3455 Parameters: 3456 ----------- 3457 3458 weight_: the new weighting scheme. If no weighting scheme is 3459 specified, the default is BM25 with the default parameters. "; 3460 3461 %feature("docstring") Xapian::Enquire::set_expansion_scheme " 3462 3463 Set the weighting scheme to use for expansion. 3464 3465 void Xapian::Enquire::set_expansion_scheme(const std::string 3466 &eweightname_, double expand_k_=1.0) const 3467 3468 If you don't call this method, the default is as if you'd used: 3469 3470 get_expansion_scheme(\"trad\"); 3471 3472 Parameters: 3473 ----------- 3474 3475 eweightname_: A string in lowercase specifying the name of the scheme 3476 to be used. The following schemes are currently available: \"bo1\" : 3477 The Bo1 scheme for query expansion. \"trad\" : The TradWeight scheme 3478 for query expansion. 3479 3480 expand_k_: The parameter required for TradWeight query expansion. A 3481 default value of 1.0 is used if none is specified. "; 3482 3483 %feature("docstring") Xapian::Enquire::set_collapse_key " 3484 3485 Set the collapse key to use for queries. 3486 3487 void Xapian::Enquire::set_collapse_key(Xapian::valueno collapse_key, 3488 Xapian::doccount collapse_max=1) 3489 3490 Parameters: 3491 ----------- 3492 3493 collapse_key: value number to collapse on - at most one MSet entry 3494 with each particular value will be returned (default is 3495 Xapian::BAD_VALUENO which means no collapsing). 3496 3497 collapse_max: Max number of items with the same key to leave after 3498 collapsing (default 1). 3499 3500 The MSet returned by get_mset() will have only the \"best\" (at most) 3501 collapse_max entries with each particular value of collapse_key 3502 (\"best\" being highest ranked - i.e. highest weight or highest 3503 sorting key). 3504 3505 An example use might be to create a value for each document containing 3506 an MD5 hash of the document contents. Then duplicate documents from 3507 different sources can be eliminated at search time by collapsing with 3508 collapse_max = 1 (it's better to eliminate duplicates at index time, 3509 but this may not be always be possible - for example the search may be 3510 over more than one Xapian database). 3511 3512 Another use is to group matches in a particular category (e.g. you 3513 might collapse a mailing list search on the Subject: so that there's 3514 only one result per discussion thread). In this case you can use 3515 get_collapse_count() to give the user some idea how many other results 3516 there are. And if you index the Subject: as a boolean term as well as 3517 putting it in a value, you can offer a link to a non-collapsed search 3518 restricted to that thread using a boolean filter. "; 3519 3520 %feature("docstring") Xapian::Enquire::set_docid_order " 3521 3522 Set sort order for document IDs. 3523 3524 void Xapian::Enquire::set_docid_order(docid_order order) 3525 3526 This order only has an effect on documents which would otherwise have 3527 equal rank. When ordering by relevance without a sort key, this means 3528 documents with equal weight. For a boolean match with no sort key, 3529 this means all documents. And if a sort key is used, this means 3530 documents with the same sort key (and also equal weight if ordering on 3531 relevance before or after the sort key). 3532 3533 Parameters: 3534 ----------- 3535 3536 order: This can be: Xapian::Enquire::ASCENDING docids sort in 3537 ascending order (default) 3538 3539 Xapian::Enquire::DESCENDING docids sort in descending order 3540 3541 Xapian::Enquire::DONT_CARE docids sort in whatever order is most 3542 efficient for the backend 3543 3544 Note: If you add documents in strict date order, then a boolean search 3545 - i.e. set_weighting_scheme(Xapian::BoolWeight()) - with 3546 set_docid_order(Xapian::Enquire::DESCENDING) is an efficient way to 3547 perform \"sort by date, newest first\", and with 3548 set_docid_order(Xapian::Enquire::ASCENDING) a very efficient way to 3549 perform \"sort by date, oldest first\". "; 3550 3551 %feature("docstring") Xapian::Enquire::set_cutoff " 3552 3553 Set the percentage and/or weight cutoffs. 3554 3555 void Xapian::Enquire::set_cutoff(int percent_cutoff, double 3556 weight_cutoff=0) 3557 3558 Parameters: 3559 ----------- 3560 3561 percent_cutoff: Minimum percentage score for returned documents. If a 3562 document has a lower percentage score than this, it will not appear in 3563 the MSet. If your intention is to return only matches which contain 3564 all the terms in the query, then it's more efficient to use 3565 Xapian::Query::OP_AND instead of Xapian::Query::OP_OR in the query 3566 than to use set_cutoff(100). (default 0 => no percentage cut-off). 3567 3568 weight_cutoff: Minimum weight for a document to be returned. If a 3569 document has a lower score that this, it will not appear in the MSet. 3570 It is usually only possible to choose an appropriate weight for cutoff 3571 based on the results of a previous run of the same query; this is thus 3572 mainly useful for alerting operations. The other potential use is with 3573 a user specified weighting scheme. (default 0 => no weight cut-off). 3574 "; 3575 3576 %feature("docstring") Xapian::Enquire::set_sort_by_relevance " 3577 3578 Set the sorting to be by relevance only. 3579 3580 void Xapian::Enquire::set_sort_by_relevance() 3581 3582 This is the default. "; 3583 3584 %feature("docstring") Xapian::Enquire::set_sort_by_value " 3585 3586 Set the sorting to be by value only. 3587 3588 void Xapian::Enquire::set_sort_by_value(Xapian::valueno sort_key, bool 3589 reverse) 3590 3591 Note that sorting by values uses a string comparison, so to use this 3592 to sort by a numeric value you'll need to store the numeric values in 3593 a manner which sorts appropriately. For example, you could use 3594 Xapian::sortable_serialise() (which works for floating point numbers 3595 as well as integers), or store numbers padded with leading zeros or 3596 spaces, or with the number of digits prepended. 3597 3598 Parameters: 3599 ----------- 3600 3601 sort_key: value number to sort on. 3602 3603 reverse: If true, reverses the sort order. "; 3604 3605 %feature("docstring") Xapian::Enquire::set_sort_by_key " 3606 3607 Set the sorting to be by key generated from values only. 3608 3609 void Xapian::Enquire::set_sort_by_key(Xapian::KeyMaker *sorter, bool 3610 reverse) 3611 3612 Parameters: 3613 ----------- 3614 3615 sorter: The functor to use for generating keys. 3616 3617 reverse: If true, reverses the sort order. "; 3618 3619 %feature("docstring") 3620 Xapian::Enquire::set_sort_by_value_then_relevance " 3621 3622 Set the sorting to be by value, then by relevance for documents with 3623 the same value. 3624 3625 void Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno 3626 sort_key, bool reverse) 3627 3628 Note that sorting by values uses a string comparison, so to use this 3629 to sort by a numeric value you'll need to store the numeric values in 3630 a manner which sorts appropriately. For example, you could use 3631 Xapian::sortable_serialise() (which works for floating point numbers 3632 as well as integers), or store numbers padded with leading zeros or 3633 spaces, or with the number of digits prepended. 3634 3635 Parameters: 3636 ----------- 3637 3638 sort_key: value number to sort on. 3639 3640 reverse: If true, reverses the sort order. "; 3641 3642 %feature("docstring") Xapian::Enquire::set_sort_by_key_then_relevance 3643 " 3644 3645 Set the sorting to be by keys generated from values, then by relevance 3646 for documents with identical keys. 3647 3648 void Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker 3649 *sorter, bool reverse) 3650 3651 Parameters: 3652 ----------- 3653 3654 sorter: The functor to use for generating keys. 3655 3656 reverse: If true, reverses the sort order. "; 3657 3658 %feature("docstring") 3659 Xapian::Enquire::set_sort_by_relevance_then_value " 3660 3661 Set the sorting to be by relevance then value. 3662 3663 void Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno 3664 sort_key, bool reverse) 3665 3666 Note that sorting by values uses a string comparison, so to use this 3667 to sort by a numeric value you'll need to store the numeric values in 3668 a manner which sorts appropriately. For example, you could use 3669 Xapian::sortable_serialise() (which works for floating point numbers 3670 as well as integers), or store numbers padded with leading zeros or 3671 spaces, or with the number of digits prepended. 3672 3673 Note that with the default BM25 weighting scheme parameters, non- 3674 identical documents will rarely have the same weight, so this setting 3675 will give very similar results to set_sort_by_relevance(). It becomes 3676 more useful with particular BM25 parameter settings (e.g. 3677 BM25Weight(1,0,1,0,0)) or custom weighting schemes. 3678 3679 Parameters: 3680 ----------- 3681 3682 sort_key: value number to sort on. 3683 3684 reverse: If true, reverses the sort order of sort_key. Beware that in 3685 1.2.16 and earlier, the sense of this parameter was incorrectly 3686 inverted and inconsistent with the other set_sort_by_... methods. This 3687 was fixed in 1.2.17, so make that version a minimum requirement if 3688 this detail matters to your application. "; 3689 3690 %feature("docstring") Xapian::Enquire::set_sort_by_relevance_then_key 3691 " 3692 3693 Set the sorting to be by relevance, then by keys generated from 3694 values. 3695 3696 void Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker 3697 *sorter, bool reverse) 3698 3699 Note that with the default BM25 weighting scheme parameters, non- 3700 identical documents will rarely have the same weight, so this setting 3701 will give very similar results to set_sort_by_relevance(). It becomes 3702 more useful with particular BM25 parameter settings (e.g. 3703 BM25Weight(1,0,1,0,0)) or custom weighting schemes. 3704 3705 Parameters: 3706 ----------- 3707 3708 sorter: The functor to use for generating keys. 3709 3710 reverse: If true, reverses the sort order of the generated keys. 3711 Beware that in 1.2.16 and earlier, the sense of this parameter was 3712 incorrectly inverted and inconsistent with the other set_sort_by_... 3713 methods. This was fixed in 1.2.17, so make that version a minimum 3714 requirement if this detail matters to your application. "; 3715 3716 %feature("docstring") Xapian::Enquire::set_time_limit " 3717 3718 Set a time limit for the match. 3719 3720 void Xapian::Enquire::set_time_limit(double time_limit) 3721 3722 Matches with check_at_least set high can take a long time in some 3723 cases. You can set a time limit on this, after which check_at_least 3724 will be turned off. 3725 3726 Parameters: 3727 ----------- 3728 3729 time_limit: time in seconds after which to disable check_at_least 3730 (default: 0.0 which means no time limit) 3731 3732 Limitations: 3733 3734 This feature is currently supported on platforms which support POSIX 3735 interval timers. Interaction with the remote backend when using 3736 multiple databases may have bugs. There's not currently a way to force 3737 the match to end after a certain time. "; 3738 3739 %feature("docstring") Xapian::Enquire::get_mset " 3740 3741 Get (a portion of) the match set for the current query. 3742 3743 MSet Xapian::Enquire::get_mset(Xapian::doccount first, 3744 Xapian::doccount maxitems, Xapian::doccount checkatleast=0, const RSet 3745 *omrset=0, const MatchDecider *mdecider=0) const 3746 3747 Parameters: 3748 ----------- 3749 3750 first: the first item in the result set to return. A value of zero 3751 corresponds to the first item returned being that with the highest 3752 score. A value of 10 corresponds to the first 10 items being ignored, 3753 and the returned items starting at the eleventh. 3754 3755 maxitems: the maximum number of items to return. If you want all 3756 matches, then you can pass the result of calling get_doccount() on the 3757 Database object (though if you are doing this so you can filter 3758 results, you are likely to get much better performance by using 3759 Xapian's match-time filtering features instead). You can pass 0 for 3760 maxitems which will give you an empty MSet with valid statistics (such 3761 as get_matches_estimated()) calculated without looking at any 3762 postings, which is very quick, but means the estimates may be more 3763 approximate and the bounds may be much looser. 3764 3765 checkatleast: the minimum number of items to check. Because the 3766 matcher optimises, it won't consider every document which might match, 3767 so the total number of matches is estimated. Setting checkatleast 3768 forces it to consider at least this many matches and so allows for 3769 reliable paging links. 3770 3771 omrset: the relevance set to use when performing the query. 3772 3773 mdecider: a decision functor to use to decide whether a given 3774 document should be put in the MSet. 3775 3776 A Xapian::MSet object containing the results of the query. 3777 3778 Parameters: 3779 ----------- 3780 3781 Xapian::InvalidArgumentError: See class documentation. "; 3782 3783 %feature("docstring") Xapian::Enquire::get_mset " 3784 3785 Get (a portion of) the match set for the current query. 3786 3787 MSet Xapian::Enquire::get_mset(Xapian::doccount first, 3788 Xapian::doccount maxitems, const RSet *omrset, const MatchDecider 3789 *mdecider=0) const 3790 3791 Parameters: 3792 ----------- 3793 3794 first: the first item in the result set to return. A value of zero 3795 corresponds to the first item returned being that with the highest 3796 score. A value of 10 corresponds to the first 10 items being ignored, 3797 and the returned items starting at the eleventh. 3798 3799 maxitems: the maximum number of items to return. If you want all 3800 matches, then you can pass the result of calling get_doccount() on the 3801 Database object (though if you are doing this so you can filter 3802 results, you are likely to get much better performance by using 3803 Xapian's match-time filtering features instead). You can pass 0 for 3804 maxitems which will give you an empty MSet with valid statistics (such 3805 as get_matches_estimated()) calculated without looking at any 3806 postings, which is very quick, but means the estimates may be more 3807 approximate and the bounds may be much looser. 3808 3809 omrset: the relevance set to use when performing the query. 3810 3811 mdecider: a decision functor to use to decide whether a given 3812 document should be put in the MSet. 3813 3814 A Xapian::MSet object containing the results of the query. 3815 3816 Parameters: 3817 ----------- 3818 3819 Xapian::InvalidArgumentError: See class documentation. "; 3820 3821 %feature("docstring") Xapian::Enquire::get_eset " 3822 3823 Get the expand set for the given rset. 3824 3825 ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet 3826 &omrset, int flags=0, const Xapian::ExpandDecider *edecider=0, double 3827 min_wt=0.0) const 3828 3829 Parameters: 3830 ----------- 3831 3832 maxitems: the maximum number of items to return. 3833 3834 omrset: the relevance set to use when performing the expand 3835 operation. 3836 3837 flags: zero or more of these values |-ed together: 3838 Xapian::Enquire::INCLUDE_QUERY_TERMS query terms may be returned from 3839 expand 3840 3841 Xapian::Enquire::USE_EXACT_TERMFREQ for multi dbs, calculate the exact 3842 termfreq; otherwise an approximation is used which can greatly improve 3843 efficiency, but still returns good results. 3844 3845 edecider: a decision functor to use to decide whether a given term 3846 should be put in the ESet 3847 3848 min_wt: the minimum weight for included terms 3849 3850 An ESet object containing the results of the expand. 3851 3852 Parameters: 3853 ----------- 3854 3855 Xapian::InvalidArgumentError: See class documentation. "; 3856 3857 %feature("docstring") Xapian::Enquire::get_eset " 3858 3859 Get the expand set for the given rset. 3860 3861 ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet 3862 &omrset, const Xapian::ExpandDecider *edecider) const 3863 3864 Parameters: 3865 ----------- 3866 3867 maxitems: the maximum number of items to return. 3868 3869 omrset: the relevance set to use when performing the expand 3870 operation. 3871 3872 edecider: a decision functor to use to decide whether a given term 3873 should be put in the ESet 3874 3875 An ESet object containing the results of the expand. 3876 3877 Parameters: 3878 ----------- 3879 3880 Xapian::InvalidArgumentError: See class documentation. "; 3881 3882 %feature("docstring") Xapian::Enquire::get_eset " 3883 3884 Get the expand set for the given rset. 3885 3886 ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet 3887 &rset, int flags, double k, const Xapian::ExpandDecider 3888 *edecider=NULL, double min_wt=0.0) const 3889 3890 Parameters: 3891 ----------- 3892 3893 maxitems: the maximum number of items to return. 3894 3895 rset: the relevance set to use when performing the expand operation. 3896 3897 flags: zero or more of these values |-ed together: 3898 Xapian::Enquire::INCLUDE_QUERY_TERMS query terms may be returned from 3899 expand 3900 3901 Xapian::Enquire::USE_EXACT_TERMFREQ for multi dbs, calculate the exact 3902 termfreq; otherwise an approximation is used which can greatly improve 3903 efficiency, but still returns good results. 3904 3905 k: the parameter k in the query expansion algorithm (default is 1.0) 3906 3907 edecider: a decision functor to use to decide whether a given term 3908 should be put in the ESet 3909 3910 min_wt: the minimum weight for included terms 3911 3912 An ESet object containing the results of the expand. 3913 3914 Parameters: 3915 ----------- 3916 3917 Xapian::InvalidArgumentError: See class documentation. "; 3918 3919 %feature("docstring") Xapian::Enquire::get_matching_terms_begin " 3920 3921 Get terms which match a given document, by document id. 3922 3923 TermIterator Xapian::Enquire::get_matching_terms_begin(Xapian::docid 3924 did) const 3925 3926 This method returns the terms in the current query which match the 3927 given document. 3928 3929 It is possible for the document to have been removed from the database 3930 between the time it is returned in an MSet, and the time that this 3931 call is made. If possible, you should specify an MSetIterator instead 3932 of a Xapian::docid, since this will enable database backends with 3933 suitable support to prevent this occurring. 3934 3935 Note that a query does not need to have been run in order to make this 3936 call. 3937 3938 Parameters: 3939 ----------- 3940 3941 did: The document id for which to retrieve the matching terms. 3942 3943 An iterator returning the terms which match the document. The terms 3944 will be returned (as far as this makes any sense) in the same order as 3945 the terms in the query. Terms will not occur more than once, even if 3946 they do in the query. 3947 3948 Parameters: 3949 ----------- 3950 3951 Xapian::InvalidArgumentError: See class documentation. 3952 3953 Xapian::DocNotFoundError: The document specified could not be found 3954 in the database. "; 3955 3956 %feature("docstring") Xapian::Enquire::get_matching_terms_end " 3957 3958 End iterator corresponding to get_matching_terms_begin() 3959 3960 TermIterator Xapian::Enquire::get_matching_terms_end(Xapian::docid) 3961 const "; 3962 3963 %feature("docstring") Xapian::Enquire::get_matching_terms_begin " 3964 3965 Get terms which match a given document, by match set item. 3966 3967 TermIterator Xapian::Enquire::get_matching_terms_begin(const 3968 MSetIterator &it) const 3969 3970 This method returns the terms in the current query which match the 3971 given document. 3972 3973 If the underlying database has suitable support, using this call 3974 (rather than passing a Xapian::docid) will enable the system to ensure 3975 that the correct data is returned, and that the document has not been 3976 deleted or changed since the query was performed. 3977 3978 Parameters: 3979 ----------- 3980 3981 it: The iterator for which to retrieve the matching terms. 3982 3983 An iterator returning the terms which match the document. The terms 3984 will be returned (as far as this makes any sense) in the same order as 3985 the terms in the query. Terms will not occur more than once, even if 3986 they do in the query. 3987 3988 Parameters: 3989 ----------- 3990 3991 Xapian::InvalidArgumentError: See class documentation. 3992 3993 Xapian::DocNotFoundError: The document specified could not be found 3994 in the database. "; 3995 3996 %feature("docstring") Xapian::Enquire::get_matching_terms_end " 3997 3998 End iterator corresponding to get_matching_terms_begin() 3999 4000 TermIterator Xapian::Enquire::get_matching_terms_end(const 4001 MSetIterator &) const "; 4002 4003 %feature("docstring") Xapian::Enquire::get_description " 4004 4005 Return a string describing this object. 4006 4007 std::string Xapian::Enquire::get_description() const "; 4008 4009 4010 // File: classXapian_1_1Error.xml 4011 %feature("docstring") Xapian::Error " 4012 4013 All exceptions thrown by Xapian are subclasses of Xapian::Error. 4014 4015 This class can not be instantiated directly - instead a subclass 4016 should be used. "; 4017 4018 %feature("docstring") Xapian::Error::get_type " 4019 4020 The type of this error (e.g. \"DocNotFoundError\".) 4021 4022 const char* Xapian::Error::get_type() const "; 4023 4024 %feature("docstring") Xapian::Error::get_msg " 4025 4026 Message giving details of the error, intended for human consumption. 4027 4028 const std::string& Xapian::Error::get_msg() const "; 4029 4030 %feature("docstring") Xapian::Error::get_context " 4031 4032 Optional context information. 4033 4034 const std::string& Xapian::Error::get_context() const 4035 4036 This context is intended for use by Xapian::ErrorHandler (for example 4037 so it can know which remote server is unreliable and report the 4038 problem and remove that server from those being searched). But it's 4039 typically a plain-text string, and so also fit for human consumption. 4040 "; 4041 4042 %feature("docstring") Xapian::Error::get_error_string " 4043 4044 Returns any system error string associated with this exception. 4045 4046 const char* Xapian::Error::get_error_string() const 4047 4048 The system error string may come from errno, h_errno (on UNIX), or 4049 GetLastError() (on MS Windows). If there is no associated system error 4050 string, NULL is returned. "; 4051 4052 %feature("docstring") Xapian::Error::get_description " 4053 4054 Return a string describing this object. 4055 4056 std::string Xapian::Error::get_description() const "; 4057 4058 4059 // File: classXapian_1_1ErrorHandler.xml 4060 %feature("docstring") Xapian::ErrorHandler " 4061 4062 Decide if a Xapian::Error exception should be ignored. 4063 4064 You can create your own subclass of this class and pass in an instance 4065 of it when you construct a Xapian::Enquire object. Xapian::Error 4066 exceptions which happen during the match process are passed to this 4067 object and it can decide whether they should propagate or whether 4068 Enquire should attempt to continue. 4069 4070 The motivation is to allow searching over remote databases to handle a 4071 remote server which has died (both to allow results to be returned, 4072 and also so that such errors can be logged and dead servers 4073 temporarily removed from use). "; 4074 4075 %feature("docstring") Xapian::ErrorHandler::ErrorHandler " 4076 4077 Default constructor. 4078 4079 Xapian::ErrorHandler::ErrorHandler() "; 4080 4081 %feature("docstring") Xapian::ErrorHandler::~ErrorHandler " 4082 4083 We require a virtual destructor because we have virtual methods. 4084 4085 virtual Xapian::ErrorHandler::~ErrorHandler() "; 4086 4087 %feature("docstring") Xapian::ErrorHandler::release " 4088 4089 Start reference counting this object. 4090 4091 ErrorHandler* Xapian::ErrorHandler::release() 4092 4093 You can hand ownership of a dynamically allocated ErrorHandler object 4094 to Xapian by calling release() and then passing the object to a Xapian 4095 method. Xapian will arrange to delete the object once it is no longer 4096 required. "; 4097 4098 %feature("docstring") Xapian::ErrorHandler::release " 4099 4100 Start reference counting this object. 4101 4102 const ErrorHandler* Xapian::ErrorHandler::release() const 4103 4104 You can hand ownership of a dynamically allocated ErrorHandler object 4105 to Xapian by calling release() and then passing the object to a Xapian 4106 method. Xapian will arrange to delete the object once it is no longer 4107 required. "; 4108 4109 4110 // File: classXapian_1_1ESet.xml 4111 %feature("docstring") Xapian::ESet " 4112 4113 Class representing a list of search results. "; 4114 4115 %feature("docstring") Xapian::ESet::ESet " 4116 4117 Copying is allowed. 4118 4119 Xapian::ESet::ESet(const ESet &o) 4120 4121 The internals are reference counted, so copying is cheap. "; 4122 4123 %feature("docstring") Xapian::ESet::ESet " 4124 4125 Default constructor. 4126 4127 Xapian::ESet::ESet() 4128 4129 Creates an empty ESet, mostly useful as a placeholder. "; 4130 4131 %feature("docstring") Xapian::ESet::~ESet " 4132 4133 Destructor. 4134 4135 Xapian::ESet::~ESet() "; 4136 4137 %feature("docstring") Xapian::ESet::size " 4138 4139 Return number of items in this ESet object. 4140 4141 Xapian::doccount Xapian::ESet::size() const "; 4142 4143 %feature("docstring") Xapian::ESet::empty " 4144 4145 Return true if this ESet object is empty. 4146 4147 bool Xapian::ESet::empty() const "; 4148 4149 %feature("docstring") Xapian::ESet::get_ebound " 4150 4151 Return a bound on the full size of this ESet object. 4152 4153 Xapian::termcount Xapian::ESet::get_ebound() const 4154 4155 This is a bound on size() if get_eset() had been called with maxitems 4156 set high enough that all results were returned. "; 4157 4158 %feature("docstring") Xapian::ESet::swap " 4159 4160 Efficiently swap this ESet object with another. 4161 4162 void Xapian::ESet::swap(ESet &o) "; 4163 4164 %feature("docstring") Xapian::ESet::begin " 4165 4166 Return iterator pointing to the first item in this ESet. 4167 4168 ESetIterator Xapian::ESet::begin() const "; 4169 4170 %feature("docstring") Xapian::ESet::end " 4171 4172 Return iterator pointing to just after the last item in this ESet. 4173 4174 ESetIterator Xapian::ESet::end() const "; 4175 4176 %feature("docstring") Xapian::ESet::back " 4177 4178 Return iterator pointing to the last object in this ESet. 4179 4180 ESetIterator Xapian::ESet::back() const "; 4181 4182 %feature("docstring") Xapian::ESet::get_description " 4183 4184 Return a string describing this object. 4185 4186 std::string Xapian::ESet::get_description() const "; 4187 4188 4189 // File: classXapian_1_1ESetIterator.xml 4190 %feature("docstring") Xapian::ESetIterator " 4191 4192 Iterator over a Xapian::ESet. "; 4193 4194 %feature("docstring") Xapian::ESetIterator::ESetIterator " 4195 4196 Create an unpositioned ESetIterator. 4197 4198 Xapian::ESetIterator::ESetIterator() "; 4199 4200 %feature("docstring") Xapian::ESetIterator::get_weight " 4201 4202 Get the weight for the current position. 4203 4204 double Xapian::ESetIterator::get_weight() const "; 4205 4206 %feature("docstring") Xapian::ESetIterator::get_description " 4207 4208 Return a string describing this object. 4209 4210 std::string Xapian::ESetIterator::get_description() const "; 4211 4212 4213 // File: classXapian_1_1ExpandDecider.xml 4214 %feature("docstring") Xapian::ExpandDecider " 4215 4216 Virtual base class for expand decider functor. "; 4217 4218 %feature("docstring") Xapian::ExpandDecider::ExpandDecider " 4219 4220 Default constructor. 4221 4222 Xapian::ExpandDecider::ExpandDecider() "; 4223 4224 %feature("docstring") Xapian::ExpandDecider::~ExpandDecider " 4225 4226 Virtual destructor, because we have virtual methods. 4227 4228 virtual Xapian::ExpandDecider::~ExpandDecider() "; 4229 4230 %feature("docstring") Xapian::ExpandDecider::release " 4231 4232 Start reference counting this object. 4233 4234 ExpandDecider* Xapian::ExpandDecider::release() 4235 4236 You can hand ownership of a dynamically allocated ExpandDecider object 4237 to Xapian by calling release() and then passing the object to a Xapian 4238 method. Xapian will arrange to delete the object once it is no longer 4239 required. "; 4240 4241 %feature("docstring") Xapian::ExpandDecider::release " 4242 4243 Start reference counting this object. 4244 4245 const ExpandDecider* Xapian::ExpandDecider::release() const 4246 4247 You can hand ownership of a dynamically allocated ExpandDecider object 4248 to Xapian by calling release() and then passing the object to a Xapian 4249 method. Xapian will arrange to delete the object once it is no longer 4250 required. "; 4251 4252 4253 // File: classXapian_1_1ExpandDeciderAnd.xml 4254 %feature("docstring") Xapian::ExpandDeciderAnd " 4255 4256 ExpandDecider subclass which rejects terms using two ExpandDeciders. 4257 4258 Terms are only accepted if they are accepted by both of the specified 4259 ExpandDecider objects. "; 4260 4261 %feature("docstring") Xapian::ExpandDeciderAnd::ExpandDeciderAnd " 4262 4263 Terms will be checked with first, and if accepted, then checked with 4264 second. 4265 4266 Xapian::ExpandDeciderAnd::ExpandDeciderAnd(const ExpandDecider 4267 &first_, const ExpandDecider &second_) 4268 4269 Parameters: 4270 ----------- 4271 4272 first_: First ExpandDecider object to test with. 4273 4274 second_: ExpandDecider object to test with if first_ accepts. "; 4275 4276 %feature("docstring") Xapian::ExpandDeciderAnd::ExpandDeciderAnd " 4277 4278 Compatibility method. 4279 4280 Xapian::ExpandDeciderAnd::ExpandDeciderAnd(const ExpandDecider 4281 *first_, const ExpandDecider *second_) 4282 4283 Parameters: 4284 ----------- 4285 4286 first_: First ExpandDecider object to test with. 4287 4288 second_: ExpandDecider object to test with if first_ accepts. "; 4289 4290 4291 // File: classXapian_1_1ExpandDeciderFilterPrefix.xml 4292 %feature("docstring") Xapian::ExpandDeciderFilterPrefix " 4293 4294 ExpandDecider subclass which restrict terms to a particular prefix. 4295 4296 ExpandDeciderFilterPrefix provides an easy way to choose terms with a 4297 particular prefix when generating an ESet. "; 4298 4299 %feature("docstring") 4300 Xapian::ExpandDeciderFilterPrefix::ExpandDeciderFilterPrefix " 4301 4302 The parameter specify the prefix of terms to be retained. 4303 4304 Xapian::ExpandDeciderFilterPrefix::ExpandDeciderFilterPrefix(const 4305 std::string &prefix_) 4306 4307 Parameters: 4308 ----------- 4309 4310 prefix_: restrict terms to the particular prefix_ "; 4311 4312 4313 // File: classXapian_1_1ExpandDeciderFilterTerms.xml 4314 %feature("docstring") Xapian::ExpandDeciderFilterTerms " 4315 4316 ExpandDecider subclass which rejects terms in a specified list. 4317 4318 ExpandDeciderFilterTerms provides an easy way to filter out terms from 4319 a fixed list when generating an ESet. "; 4320 4321 %feature("docstring") 4322 Xapian::ExpandDeciderFilterTerms::ExpandDeciderFilterTerms " 4323 4324 The two iterators specify a list of terms to be rejected. 4325 4326 Xapian::ExpandDeciderFilterTerms::ExpandDeciderFilterTerms(Iterator 4327 reject_begin, Iterator reject_end) 4328 4329 Parameters: 4330 ----------- 4331 4332 reject_begin: Begin iterator for the list of terms to reject. It can 4333 be any input_iterator type which returns std::string or char * (e.g. 4334 TermIterator or char **). 4335 4336 reject_end: End iterator for the list of terms to reject. "; 4337 4338 4339 // File: classXapian_1_1FeatureUnavailableError.xml 4340 %feature("docstring") Xapian::FeatureUnavailableError " 4341 4342 Indicates an attempt to use a feature which is unavailable. 4343 4344 Typically a feature is unavailable because it wasn't compiled in, or 4345 because it requires other software or facilities which aren't 4346 available. "; 4347 4348 %feature("docstring") 4349 Xapian::FeatureUnavailableError::FeatureUnavailableError " 4350 4351 General purpose constructor. 4352 4353 Xapian::FeatureUnavailableError::FeatureUnavailableError(const 4354 std::string &msg_, const std::string &context_=std::string(), int 4355 errno_=0) 4356 4357 Parameters: 4358 ----------- 4359 4360 msg_: Message giving details of the error, intended for human 4361 consumption. 4362 4363 context_: Optional context information for this error. 4364 4365 errno_: Optional errno value associated with this error. "; 4366 4367 %feature("docstring") 4368 Xapian::FeatureUnavailableError::FeatureUnavailableError " 4369 4370 Construct from message and errno value. 4371 4372 Xapian::FeatureUnavailableError::FeatureUnavailableError(const 4373 std::string &msg_, int errno_) 4374 4375 Parameters: 4376 ----------- 4377 4378 msg_: Message giving details of the error, intended for human 4379 consumption. 4380 4381 errno_: Optional errno value associated with this error. "; 4382 4383 4384 // File: classXapian_1_1FieldProcessor.xml 4385 %feature("docstring") Xapian::FieldProcessor " 4386 4387 Base class for field processors. "; 4388 4389 %feature("docstring") Xapian::FieldProcessor::FieldProcessor " 4390 4391 Default constructor. 4392 4393 Xapian::FieldProcessor::FieldProcessor() "; 4394 4395 %feature("docstring") Xapian::FieldProcessor::~FieldProcessor " 4396 4397 Destructor. 4398 4399 virtual Xapian::FieldProcessor::~FieldProcessor() "; 4400 4401 %feature("docstring") Xapian::FieldProcessor::release " 4402 4403 Start reference counting this object. 4404 4405 FieldProcessor* Xapian::FieldProcessor::release() 4406 4407 You can hand ownership of a dynamically allocated FieldProcessor 4408 object to Xapian by calling release() and then passing the object to a 4409 Xapian method. Xapian will arrange to delete the object once it is no 4410 longer required. "; 4411 4412 %feature("docstring") Xapian::FieldProcessor::release " 4413 4414 Start reference counting this object. 4415 4416 const FieldProcessor* Xapian::FieldProcessor::release() const 4417 4418 You can hand ownership of a dynamically allocated FieldProcessor 4419 object to Xapian by calling release() and then passing the object to a 4420 Xapian method. Xapian will arrange to delete the object once it is no 4421 longer required. "; 4422 4423 4424 // File: classXapian_1_1FixedWeightPostingSource.xml 4425 %feature("docstring") Xapian::FixedWeightPostingSource " 4426 4427 A posting source which returns a fixed weight for all documents. 4428 4429 This returns entries for all documents in the given database, with a 4430 fixed weight (specified by a parameter to the constructor). "; 4431 4432 %feature("docstring") 4433 Xapian::FixedWeightPostingSource::FixedWeightPostingSource " 4434 4435 Construct a FixedWeightPostingSource. 4436 4437 Xapian::FixedWeightPostingSource::FixedWeightPostingSource(double wt) 4438 4439 Parameters: 4440 ----------- 4441 4442 wt: The fixed weight to return. "; 4443 4444 %feature("docstring") 4445 Xapian::FixedWeightPostingSource::get_termfreq_min " 4446 4447 A lower bound on the number of documents this object can return. 4448 4449 Xapian::doccount Xapian::FixedWeightPostingSource::get_termfreq_min() 4450 const 4451 4452 Xapian will always call init() on a PostingSource before calling this 4453 for the first time. "; 4454 4455 %feature("docstring") 4456 Xapian::FixedWeightPostingSource::get_termfreq_est " 4457 4458 An estimate of the number of documents this object can return. 4459 4460 Xapian::doccount Xapian::FixedWeightPostingSource::get_termfreq_est() 4461 const 4462 4463 It must always be true that: 4464 4465 get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max() 4466 4467 Xapian will always call init() on a PostingSource before calling this 4468 for the first time. "; 4469 4470 %feature("docstring") 4471 Xapian::FixedWeightPostingSource::get_termfreq_max " 4472 4473 An upper bound on the number of documents this object can return. 4474 4475 Xapian::doccount Xapian::FixedWeightPostingSource::get_termfreq_max() 4476 const 4477 4478 Xapian will always call init() on a PostingSource before calling this 4479 for the first time. "; 4480 4481 %feature("docstring") Xapian::FixedWeightPostingSource::get_weight " 4482 4483 Return the weight contribution for the current document. 4484 4485 double Xapian::FixedWeightPostingSource::get_weight() const 4486 4487 This default implementation always returns 0, for convenience when 4488 implementing \"weight-less\" PostingSource subclasses. 4489 4490 This method may assume that it will only be called when there is a 4491 \"current document\". In detail: Xapian will always call init() on a 4492 PostingSource before calling this for the first time. It will also 4493 only call this if the PostingSource reports that it is pointing to a 4494 valid document (ie, it will not call it before calling at least one of 4495 next(), skip_to() or check(), and will ensure that the PostingSource 4496 is not at the end by calling at_end()). "; 4497 4498 %feature("docstring") Xapian::FixedWeightPostingSource::next " 4499 4500 Advance the current position to the next matching document. 4501 4502 void Xapian::FixedWeightPostingSource::next(double min_wt) 4503 4504 The PostingSource starts before the first entry in the list, so 4505 next(), skip_to() or check() must be called before any methods which 4506 need the context of the current position. 4507 4508 Xapian will always call init() on a PostingSource before calling this 4509 for the first time. 4510 4511 Parameters: 4512 ----------- 4513 4514 min_wt: The minimum weight contribution that is needed (this is just 4515 a hint which subclasses may ignore). "; 4516 4517 %feature("docstring") Xapian::FixedWeightPostingSource::skip_to " 4518 4519 Advance to the specified docid. 4520 4521 void Xapian::FixedWeightPostingSource::skip_to(Xapian::docid 4522 min_docid, double min_wt) 4523 4524 If the specified docid isn't in the list, position ourselves on the 4525 first document after it (or at_end() if no greater docids are 4526 present). 4527 4528 If the current position is already the specified docid, this method 4529 will leave the position unmodified. 4530 4531 If the specified docid is earlier than the current position, the 4532 behaviour is unspecified. A sensible behaviour would be to leave the 4533 current position unmodified, but it is also reasonable to move to the 4534 specified docid. 4535 4536 The default implementation calls next() repeatedly, which works but 4537 skip_to() can often be implemented much more efficiently. 4538 4539 Xapian will always call init() on a PostingSource before calling this 4540 for the first time. 4541 4542 Note: in the case of a multi-database search, the docid specified is 4543 the docid in the single subdatabase relevant to this posting source. 4544 See the init() method for details. 4545 4546 Parameters: 4547 ----------- 4548 4549 did: The document id to advance to. 4550 4551 min_wt: The minimum weight contribution that is needed (this is just 4552 a hint which subclasses may ignore). "; 4553 4554 %feature("docstring") Xapian::FixedWeightPostingSource::check " 4555 4556 Check if the specified docid occurs. 4557 4558 bool Xapian::FixedWeightPostingSource::check(Xapian::docid min_docid, 4559 double min_wt) 4560 4561 The caller is required to ensure that the specified document id did 4562 actually exists in the database. If it does, it must move to that 4563 document id, and return true. If it does not, it may either: 4564 4565 return true, having moved to a definite position (including 4566 \"at_end\"), which must be the same position as skip_to() would have 4567 moved to. 4568 4569 or 4570 4571 return false, having moved to an \"indeterminate\" position, such that 4572 a subsequent call to next() or skip_to() will move to the next 4573 matching position after did. 4574 4575 Generally, this method should act like skip_to() and return true if 4576 that can be done at little extra cost. 4577 4578 Otherwise it should simply check if a particular docid is present, 4579 returning true if it is, and false if it isn't. 4580 4581 The default implementation calls skip_to() and always returns true. 4582 4583 Xapian will always call init() on a PostingSource before calling this 4584 for the first time. 4585 4586 Note: in the case of a multi-database search, the docid specified is 4587 the docid in the single subdatabase relevant to this posting source. 4588 See the init() method for details. 4589 4590 Parameters: 4591 ----------- 4592 4593 did: The document id to check. 4594 4595 min_wt: The minimum weight contribution that is needed (this is just 4596 a hint which subclasses may ignore). "; 4597 4598 %feature("docstring") Xapian::FixedWeightPostingSource::at_end " 4599 4600 Return true if the current position is past the last entry in this 4601 list. 4602 4603 bool Xapian::FixedWeightPostingSource::at_end() const 4604 4605 At least one of next(), skip_to() or check() will be called before 4606 this method is first called. "; 4607 4608 %feature("docstring") Xapian::FixedWeightPostingSource::get_docid " 4609 4610 Return the current docid. 4611 4612 Xapian::docid Xapian::FixedWeightPostingSource::get_docid() const 4613 4614 This method may assume that it will only be called when there is a 4615 \"current document\". See get_weight() for details. 4616 4617 Note: in the case of a multi-database search, the returned docid 4618 should be in the single subdatabase relevant to this posting source. 4619 See the init() method for details. "; 4620 4621 %feature("docstring") Xapian::FixedWeightPostingSource::clone " 4622 4623 Clone the posting source. 4624 4625 FixedWeightPostingSource* Xapian::FixedWeightPostingSource::clone() 4626 const 4627 4628 The clone should inherit the configuration of the parent, but need not 4629 inherit the state. ie, the clone does not need to be in the same 4630 iteration position as the original: the matcher will always call 4631 init() on the clone before attempting to move the iterator, or read 4632 the information about the current position of the iterator. 4633 4634 This may return NULL to indicate that cloning is not supported. In 4635 this case, the PostingSource may only be used with a single-database 4636 search. 4637 4638 The default implementation returns NULL. 4639 4640 Note that the returned object will be deallocated by Xapian after use 4641 with \"delete\". If you want to handle the deletion in a special way 4642 (for example when wrapping the Xapian API for use from another 4643 language) then you can define a static operator delete method in your 4644 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 4645 4646 %feature("docstring") Xapian::FixedWeightPostingSource::name " 4647 4648 Name of the posting source class. 4649 4650 std::string Xapian::FixedWeightPostingSource::name() const 4651 4652 This is used when serialising and unserialising posting sources; for 4653 example, for performing remote searches. 4654 4655 If the subclass is in a C++ namespace, the namespace should be 4656 included in the name, using \"::\" as a separator. For example, for a 4657 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 4658 namespace the result of this call should be 4659 \"Xapian::FooPostingSource\". 4660 4661 This should only be implemented if serialise() and unserialise() are 4662 also implemented. The default implementation returns an empty string. 4663 4664 If this returns an empty string, Xapian will assume that serialise() 4665 and unserialise() are not implemented. "; 4666 4667 %feature("docstring") Xapian::FixedWeightPostingSource::serialise " 4668 4669 Serialise object parameters into a string. 4670 4671 std::string Xapian::FixedWeightPostingSource::serialise() const 4672 4673 The serialised parameters should represent the configuration of the 4674 posting source, but need not (indeed, should not) represent the 4675 current iteration state. 4676 4677 If you don't want to support the remote backend, you can use the 4678 default implementation which simply throws Xapian::UnimplementedError. 4679 "; 4680 4681 %feature("docstring") Xapian::FixedWeightPostingSource::unserialise " 4682 4683 Create object given string serialisation returned by serialise(). 4684 4685 FixedWeightPostingSource* 4686 Xapian::FixedWeightPostingSource::unserialise(const std::string 4687 &serialised) const 4688 4689 Note that the returned object will be deallocated by Xapian after use 4690 with \"delete\". If you want to handle the deletion in a special way 4691 (for example when wrapping the Xapian API for use from another 4692 language) then you can define a static operator delete method in your 4693 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 4694 4695 If you don't want to support the remote backend, you can use the 4696 default implementation which simply throws Xapian::UnimplementedError. 4697 4698 Parameters: 4699 ----------- 4700 4701 serialised: A serialised instance of this PostingSource subclass. "; 4702 4703 %feature("docstring") Xapian::FixedWeightPostingSource::init " 4704 4705 Set this PostingSource to the start of the list of postings. 4706 4707 void Xapian::FixedWeightPostingSource::init(const Database &db_) 4708 4709 This is called automatically by the matcher prior to each query being 4710 processed. 4711 4712 If a PostingSource is used for multiple searches, init() will 4713 therefore be called multiple times, and must handle this by using the 4714 database passed in the most recent call. 4715 4716 Parameters: 4717 ----------- 4718 4719 db: The database which the PostingSource should iterate through. 4720 4721 Note: in the case of a multi-database search, a separate PostingSource 4722 will be used for each database (the separate PostingSources will be 4723 obtained using clone()), and each PostingSource will be passed one of 4724 the sub-databases as the db parameter here. The db parameter will 4725 therefore always refer to a single database. All docids passed to, or 4726 returned from, the PostingSource refer to docids in that single 4727 database, rather than in the multi- database. "; 4728 4729 %feature("docstring") 4730 Xapian::FixedWeightPostingSource::get_description " 4731 4732 Return a string describing this object. 4733 4734 std::string Xapian::FixedWeightPostingSource::get_description() const 4735 4736 This default implementation returns a generic answer. This default it 4737 provided to avoid forcing those deriving their own PostingSource 4738 subclass from having to implement this (they may not care what 4739 get_description() gives for their subclass). "; 4740 4741 4742 // File: classXapian_1_1GreatCircleMetric.xml 4743 %feature("docstring") Xapian::GreatCircleMetric " 4744 4745 Calculate the great-circle distance between two coordinates on a 4746 sphere. 4747 4748 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 4749 features 4750 4751 This uses the haversine formula to calculate the distance. Note that 4752 this formula is subject to inaccuracy due to numerical errors for 4753 coordinates on the opposite side of the sphere. 4754 4755 Seehttps://en.wikipedia.org/wiki/Haversine_formula "; 4756 4757 %feature("docstring") Xapian::GreatCircleMetric::GreatCircleMetric " 4758 4759 Construct a GreatCircleMetric. 4760 4761 Xapian::GreatCircleMetric::GreatCircleMetric() 4762 4763 The (quadratic mean) radius of the Earth will be used by this 4764 calculator. "; 4765 4766 %feature("docstring") Xapian::GreatCircleMetric::GreatCircleMetric " 4767 4768 Construct a GreatCircleMetric using a specified radius. 4769 4770 Xapian::GreatCircleMetric::GreatCircleMetric(double radius_) 4771 4772 This is useful for data sets in which the points are not on Earth (eg, 4773 a database of features on Mars). 4774 4775 Parameters: 4776 ----------- 4777 4778 radius_: The radius of the sphere to use, in metres. "; 4779 4780 %feature("docstring") Xapian::GreatCircleMetric::pointwise_distance " 4781 4782 Return the great-circle distance between points on the sphere. 4783 4784 double Xapian::GreatCircleMetric::pointwise_distance(const 4785 LatLongCoord &a, const LatLongCoord &b) const "; 4786 4787 %feature("docstring") Xapian::GreatCircleMetric::clone " 4788 4789 Clone the metric. 4790 4791 LatLongMetric* Xapian::GreatCircleMetric::clone() const "; 4792 4793 %feature("docstring") Xapian::GreatCircleMetric::name " 4794 4795 Return the full name of the metric. 4796 4797 std::string Xapian::GreatCircleMetric::name() const 4798 4799 This is used when serialising and unserialising metrics; for example, 4800 for performing remote searches. 4801 4802 If the subclass is in a C++ namespace, the namespace should be 4803 included in the name, using \"::\" as a separator. For example, for a 4804 LatLongMetric subclass called \"FooLatLongMetric\" in the \"Xapian\" 4805 namespace the result of this call should be 4806 \"Xapian::FooLatLongMetric\". "; 4807 4808 %feature("docstring") Xapian::GreatCircleMetric::serialise " 4809 4810 Serialise object parameters into a string. 4811 4812 std::string Xapian::GreatCircleMetric::serialise() const 4813 4814 The serialised parameters should represent the configuration of the 4815 metric. "; 4816 4817 %feature("docstring") Xapian::GreatCircleMetric::unserialise " 4818 4819 Create object given string serialisation returned by serialise(). 4820 4821 LatLongMetric* Xapian::GreatCircleMetric::unserialise(const 4822 std::string &serialised) const 4823 4824 Parameters: 4825 ----------- 4826 4827 serialised: A serialised instance of this LatLongMetric subclass. "; 4828 4829 4830 // File: classXapian_1_1IfB2Weight.xml 4831 %feature("docstring") Xapian::IfB2Weight " 4832 4833 This class implements the IfB2 weighting scheme. 4834 4835 IfB2 is a representative scheme of the Divergence from Randomness 4836 Framework by Gianni Amati. 4837 4838 It uses the Inverse term frequency model (If), the Bernoulli method to 4839 find the aftereffect of sampling (B) and the second wdf normalization 4840 proposed by Amati to normalize the wdf in the document to the length 4841 of the document (H2). 4842 4843 For more information about the DFR Framework and the IfB2 scheme, 4844 please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen 4845 Probabilistic models of information retrieval based on measuring the 4846 divergence from randomness ACM Transactions on Information Systems 4847 (TOIS) 20, (4), 2002, pp. 357-389. "; 4848 4849 %feature("docstring") Xapian::IfB2Weight::IfB2Weight " 4850 4851 Construct an IfB2Weight. 4852 4853 Xapian::IfB2Weight::IfB2Weight(double c) 4854 4855 Parameters: 4856 ----------- 4857 4858 c: A strictly positive parameter controlling the extent of the 4859 normalization of the wdf to the document length. The default value of 4860 1 is suitable for longer queries but it may need to be changed for 4861 shorter queries. For more information, please refer to Gianni Amati's 4862 PHD thesis titled Probabilistic Models for Information Retrieval based 4863 on Divergence from Randomness. "; 4864 4865 %feature("docstring") Xapian::IfB2Weight::IfB2Weight "Xapian::IfB2Weight::IfB2Weight() "; 4866 4867 %feature("docstring") Xapian::IfB2Weight::name " 4868 4869 Return the name of this weighting scheme. 4870 4871 std::string Xapian::IfB2Weight::name() const 4872 4873 This name is used by the remote backend. It is passed along with the 4874 serialised parameters to the remote server so that it knows which 4875 class to create. 4876 4877 Return the full namespace-qualified name of your class here - if your 4878 class is called FooWeight, return \"FooWeight\" from this method ( 4879 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 4880 4881 If you don't want to support the remote backend, you can use the 4882 default implementation which simply returns an empty string. "; 4883 4884 %feature("docstring") Xapian::IfB2Weight::serialise " 4885 4886 Return this object's parameters serialised as a single string. 4887 4888 std::string Xapian::IfB2Weight::serialise() const 4889 4890 If you don't want to support the remote backend, you can use the 4891 default implementation which simply throws Xapian::UnimplementedError. 4892 "; 4893 4894 %feature("docstring") Xapian::IfB2Weight::unserialise " 4895 4896 Unserialise parameters. 4897 4898 IfB2Weight* Xapian::IfB2Weight::unserialise(const std::string 4899 &serialised) const 4900 4901 This method unserialises parameters serialised by the serialise() 4902 method and allocates and returns a new object initialised with them. 4903 4904 If you don't want to support the remote backend, you can use the 4905 default implementation which simply throws Xapian::UnimplementedError. 4906 4907 Note that the returned object will be deallocated by Xapian after use 4908 with \"delete\". If you want to handle the deletion in a special way 4909 (for example when wrapping the Xapian API for use from another 4910 language) then you can define a static operator delete method in your 4911 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 4912 4913 Parameters: 4914 ----------- 4915 4916 serialised: A string containing the serialised parameters. "; 4917 4918 %feature("docstring") Xapian::IfB2Weight::get_sumpart " 4919 4920 Calculate the weight contribution for this object's term to a 4921 document. 4922 4923 double Xapian::IfB2Weight::get_sumpart(Xapian::termcount wdf, 4924 Xapian::termcount doclen, Xapian::termcount uniqterm) const 4925 4926 The parameters give information about the document which may be used 4927 in the calculations: 4928 4929 Parameters: 4930 ----------- 4931 4932 wdf: The within document frequency of the term in the document. 4933 4934 doclen: The document's length (unnormalised). 4935 4936 uniqterms: Number of unique terms in the document (used for absolute 4937 smoothing). "; 4938 4939 %feature("docstring") Xapian::IfB2Weight::get_maxpart " 4940 4941 Return an upper bound on what get_sumpart() can return for any 4942 document. 4943 4944 double Xapian::IfB2Weight::get_maxpart() const 4945 4946 This information is used by the matcher to perform various 4947 optimisations, so strive to make the bound as tight as possible. "; 4948 4949 %feature("docstring") Xapian::IfB2Weight::get_sumextra " 4950 4951 Calculate the term-independent weight component for a document. 4952 4953 double Xapian::IfB2Weight::get_sumextra(Xapian::termcount doclen, 4954 Xapian::termcount uniqterms) const 4955 4956 The parameter gives information about the document which may be used 4957 in the calculations: 4958 4959 Parameters: 4960 ----------- 4961 4962 doclen: The document's length (unnormalised). 4963 4964 uniqterms: The number of unique terms in the document. "; 4965 4966 %feature("docstring") Xapian::IfB2Weight::get_maxextra " 4967 4968 Return an upper bound on what get_sumextra() can return for any 4969 document. 4970 4971 double Xapian::IfB2Weight::get_maxextra() const 4972 4973 This information is used by the matcher to perform various 4974 optimisations, so strive to make the bound as tight as possible. "; 4975 4976 4977 // File: classXapian_1_1IneB2Weight.xml 4978 %feature("docstring") Xapian::IneB2Weight " 4979 4980 This class implements the IneB2 weighting scheme. 4981 4982 IneB2 is a representative scheme of the Divergence from Randomness 4983 Framework by Gianni Amati. 4984 4985 It uses the Inverse expected document frequency model (Ine), the 4986 Bernoulli method to find the aftereffect of sampling (B) and the 4987 second wdf normalization proposed by Amati to normalize the wdf in the 4988 document to the length of the document (H2). 4989 4990 For more information about the DFR Framework and the IneB2 scheme, 4991 please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen 4992 Probabilistic models of information retrieval based on measuring the 4993 divergence from randomness ACM Transactions on Information Systems 4994 (TOIS) 20, (4), 2002, pp. 357-389. "; 4995 4996 %feature("docstring") Xapian::IneB2Weight::IneB2Weight " 4997 4998 Construct an IneB2Weight. 4999 5000 Xapian::IneB2Weight::IneB2Weight(double c) 5001 5002 Parameters: 5003 ----------- 5004 5005 c: A strictly positive parameter controlling the extent of the 5006 normalization of the wdf to the document length. The default value of 5007 1 is suitable for longer queries but it may need to be changed for 5008 shorter queries. For more information, please refer to Gianni Amati's 5009 PHD thesis. "; 5010 5011 %feature("docstring") Xapian::IneB2Weight::IneB2Weight "Xapian::IneB2Weight::IneB2Weight() "; 5012 5013 %feature("docstring") Xapian::IneB2Weight::name " 5014 5015 Return the name of this weighting scheme. 5016 5017 std::string Xapian::IneB2Weight::name() const 5018 5019 This name is used by the remote backend. It is passed along with the 5020 serialised parameters to the remote server so that it knows which 5021 class to create. 5022 5023 Return the full namespace-qualified name of your class here - if your 5024 class is called FooWeight, return \"FooWeight\" from this method ( 5025 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 5026 5027 If you don't want to support the remote backend, you can use the 5028 default implementation which simply returns an empty string. "; 5029 5030 %feature("docstring") Xapian::IneB2Weight::serialise " 5031 5032 Return this object's parameters serialised as a single string. 5033 5034 std::string Xapian::IneB2Weight::serialise() const 5035 5036 If you don't want to support the remote backend, you can use the 5037 default implementation which simply throws Xapian::UnimplementedError. 5038 "; 5039 5040 %feature("docstring") Xapian::IneB2Weight::unserialise " 5041 5042 Unserialise parameters. 5043 5044 IneB2Weight* Xapian::IneB2Weight::unserialise(const std::string 5045 &serialised) const 5046 5047 This method unserialises parameters serialised by the serialise() 5048 method and allocates and returns a new object initialised with them. 5049 5050 If you don't want to support the remote backend, you can use the 5051 default implementation which simply throws Xapian::UnimplementedError. 5052 5053 Note that the returned object will be deallocated by Xapian after use 5054 with \"delete\". If you want to handle the deletion in a special way 5055 (for example when wrapping the Xapian API for use from another 5056 language) then you can define a static operator delete method in your 5057 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 5058 5059 Parameters: 5060 ----------- 5061 5062 serialised: A string containing the serialised parameters. "; 5063 5064 %feature("docstring") Xapian::IneB2Weight::get_sumpart " 5065 5066 Calculate the weight contribution for this object's term to a 5067 document. 5068 5069 double Xapian::IneB2Weight::get_sumpart(Xapian::termcount wdf, 5070 Xapian::termcount doclen, Xapian::termcount uniqterms) const 5071 5072 The parameters give information about the document which may be used 5073 in the calculations: 5074 5075 Parameters: 5076 ----------- 5077 5078 wdf: The within document frequency of the term in the document. 5079 5080 doclen: The document's length (unnormalised). 5081 5082 uniqterms: Number of unique terms in the document (used for absolute 5083 smoothing). "; 5084 5085 %feature("docstring") Xapian::IneB2Weight::get_maxpart " 5086 5087 Return an upper bound on what get_sumpart() can return for any 5088 document. 5089 5090 double Xapian::IneB2Weight::get_maxpart() const 5091 5092 This information is used by the matcher to perform various 5093 optimisations, so strive to make the bound as tight as possible. "; 5094 5095 %feature("docstring") Xapian::IneB2Weight::get_sumextra " 5096 5097 Calculate the term-independent weight component for a document. 5098 5099 double Xapian::IneB2Weight::get_sumextra(Xapian::termcount doclen, 5100 Xapian::termcount uniqterms) const 5101 5102 The parameter gives information about the document which may be used 5103 in the calculations: 5104 5105 Parameters: 5106 ----------- 5107 5108 doclen: The document's length (unnormalised). 5109 5110 uniqterms: The number of unique terms in the document. "; 5111 5112 %feature("docstring") Xapian::IneB2Weight::get_maxextra " 5113 5114 Return an upper bound on what get_sumextra() can return for any 5115 document. 5116 5117 double Xapian::IneB2Weight::get_maxextra() const 5118 5119 This information is used by the matcher to perform various 5120 optimisations, so strive to make the bound as tight as possible. "; 5121 5122 5123 // File: classXapian_1_1InL2Weight.xml 5124 %feature("docstring") Xapian::InL2Weight " 5125 5126 This class implements the InL2 weighting scheme. 5127 5128 InL2 is a representative scheme of the Divergence from Randomness 5129 Framework by Gianni Amati. 5130 5131 This weighting scheme is useful for tasks that require early 5132 precision. 5133 5134 It uses the Inverse document frequency model (In), the Laplace method 5135 to find the aftereffect of sampling (L) and the second wdf 5136 normalization proposed by Amati to normalize the wdf in the document 5137 to the length of the document (H2). 5138 5139 For more information about the DFR Framework and the InL2 scheme, 5140 please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen 5141 Probabilistic models of information retrieval based on measuring the 5142 divergence from randomness ACM Transactions on Information Systems 5143 (TOIS) 20, (4), 2002, pp. 357-389. "; 5144 5145 %feature("docstring") Xapian::InL2Weight::InL2Weight " 5146 5147 Construct an InL2Weight. 5148 5149 Xapian::InL2Weight::InL2Weight(double c) 5150 5151 Parameters: 5152 ----------- 5153 5154 c: A strictly positive parameter controlling the extent of the 5155 normalization of the wdf to the document length. The default value of 5156 1 is suitable for longer queries but it may need to be changed for 5157 shorter queries. For more information, please refer to Gianni Amati's 5158 PHD thesis. "; 5159 5160 %feature("docstring") Xapian::InL2Weight::InL2Weight "Xapian::InL2Weight::InL2Weight() "; 5161 5162 %feature("docstring") Xapian::InL2Weight::name " 5163 5164 Return the name of this weighting scheme. 5165 5166 std::string Xapian::InL2Weight::name() const 5167 5168 This name is used by the remote backend. It is passed along with the 5169 serialised parameters to the remote server so that it knows which 5170 class to create. 5171 5172 Return the full namespace-qualified name of your class here - if your 5173 class is called FooWeight, return \"FooWeight\" from this method ( 5174 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 5175 5176 If you don't want to support the remote backend, you can use the 5177 default implementation which simply returns an empty string. "; 5178 5179 %feature("docstring") Xapian::InL2Weight::serialise " 5180 5181 Return this object's parameters serialised as a single string. 5182 5183 std::string Xapian::InL2Weight::serialise() const 5184 5185 If you don't want to support the remote backend, you can use the 5186 default implementation which simply throws Xapian::UnimplementedError. 5187 "; 5188 5189 %feature("docstring") Xapian::InL2Weight::unserialise " 5190 5191 Unserialise parameters. 5192 5193 InL2Weight* Xapian::InL2Weight::unserialise(const std::string 5194 &serialised) const 5195 5196 This method unserialises parameters serialised by the serialise() 5197 method and allocates and returns a new object initialised with them. 5198 5199 If you don't want to support the remote backend, you can use the 5200 default implementation which simply throws Xapian::UnimplementedError. 5201 5202 Note that the returned object will be deallocated by Xapian after use 5203 with \"delete\". If you want to handle the deletion in a special way 5204 (for example when wrapping the Xapian API for use from another 5205 language) then you can define a static operator delete method in your 5206 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 5207 5208 Parameters: 5209 ----------- 5210 5211 serialised: A string containing the serialised parameters. "; 5212 5213 %feature("docstring") Xapian::InL2Weight::get_sumpart " 5214 5215 Calculate the weight contribution for this object's term to a 5216 document. 5217 5218 double Xapian::InL2Weight::get_sumpart(Xapian::termcount wdf, 5219 Xapian::termcount doclen, Xapian::termcount uniqterms) const 5220 5221 The parameters give information about the document which may be used 5222 in the calculations: 5223 5224 Parameters: 5225 ----------- 5226 5227 wdf: The within document frequency of the term in the document. 5228 5229 doclen: The document's length (unnormalised). 5230 5231 uniqterms: Number of unique terms in the document (used for absolute 5232 smoothing). "; 5233 5234 %feature("docstring") Xapian::InL2Weight::get_maxpart " 5235 5236 Return an upper bound on what get_sumpart() can return for any 5237 document. 5238 5239 double Xapian::InL2Weight::get_maxpart() const 5240 5241 This information is used by the matcher to perform various 5242 optimisations, so strive to make the bound as tight as possible. "; 5243 5244 %feature("docstring") Xapian::InL2Weight::get_sumextra " 5245 5246 Calculate the term-independent weight component for a document. 5247 5248 double Xapian::InL2Weight::get_sumextra(Xapian::termcount doclen, 5249 Xapian::termcount uniqterms) const 5250 5251 The parameter gives information about the document which may be used 5252 in the calculations: 5253 5254 Parameters: 5255 ----------- 5256 5257 doclen: The document's length (unnormalised). 5258 5259 uniqterms: The number of unique terms in the document. "; 5260 5261 %feature("docstring") Xapian::InL2Weight::get_maxextra " 5262 5263 Return an upper bound on what get_sumextra() can return for any 5264 document. 5265 5266 double Xapian::InL2Weight::get_maxextra() const 5267 5268 This information is used by the matcher to perform various 5269 optimisations, so strive to make the bound as tight as possible. "; 5270 5271 5272 // File: classXapian_1_1Query_1_1Internal.xml 5273 5274 5275 // File: structXapian_1_1ValueCountMatchSpy_1_1Internal.xml 5276 5277 5278 // File: classXapian_1_1InternalError.xml 5279 %feature("docstring") Xapian::InternalError " 5280 5281 InternalError indicates a runtime problem of some sort. "; 5282 5283 %feature("docstring") Xapian::InternalError::InternalError " 5284 5285 General purpose constructor. 5286 5287 Xapian::InternalError::InternalError(const std::string &msg_, const 5288 std::string &context_=std::string(), int errno_=0) 5289 5290 Parameters: 5291 ----------- 5292 5293 msg_: Message giving details of the error, intended for human 5294 consumption. 5295 5296 context_: Optional context information for this error. 5297 5298 errno_: Optional errno value associated with this error. "; 5299 5300 %feature("docstring") Xapian::InternalError::InternalError " 5301 5302 Construct from message and errno value. 5303 5304 Xapian::InternalError::InternalError(const std::string &msg_, int 5305 errno_) 5306 5307 Parameters: 5308 ----------- 5309 5310 msg_: Message giving details of the error, intended for human 5311 consumption. 5312 5313 errno_: Optional errno value associated with this error. "; 5314 5315 5316 // File: classXapian_1_1InvalidArgumentError.xml 5317 %feature("docstring") Xapian::InvalidArgumentError " 5318 5319 InvalidArgumentError indicates an invalid parameter value was passed 5320 to the API. "; 5321 5322 %feature("docstring") 5323 Xapian::InvalidArgumentError::InvalidArgumentError " 5324 5325 General purpose constructor. 5326 5327 Xapian::InvalidArgumentError::InvalidArgumentError(const std::string 5328 &msg_, const std::string &context_=std::string(), int errno_=0) 5329 5330 Parameters: 5331 ----------- 5332 5333 msg_: Message giving details of the error, intended for human 5334 consumption. 5335 5336 context_: Optional context information for this error. 5337 5338 errno_: Optional errno value associated with this error. "; 5339 5340 %feature("docstring") 5341 Xapian::InvalidArgumentError::InvalidArgumentError " 5342 5343 Construct from message and errno value. 5344 5345 Xapian::InvalidArgumentError::InvalidArgumentError(const std::string 5346 &msg_, int errno_) 5347 5348 Parameters: 5349 ----------- 5350 5351 msg_: Message giving details of the error, intended for human 5352 consumption. 5353 5354 errno_: Optional errno value associated with this error. "; 5355 5356 5357 // File: classXapian_1_1InvalidOperationError.xml 5358 %feature("docstring") Xapian::InvalidOperationError " 5359 5360 InvalidOperationError indicates the API was used in an invalid way. "; 5361 5362 %feature("docstring") 5363 Xapian::InvalidOperationError::InvalidOperationError " 5364 5365 General purpose constructor. 5366 5367 Xapian::InvalidOperationError::InvalidOperationError(const std::string 5368 &msg_, const std::string &context_=std::string(), int errno_=0) 5369 5370 Parameters: 5371 ----------- 5372 5373 msg_: Message giving details of the error, intended for human 5374 consumption. 5375 5376 context_: Optional context information for this error. 5377 5378 errno_: Optional errno value associated with this error. "; 5379 5380 %feature("docstring") 5381 Xapian::InvalidOperationError::InvalidOperationError " 5382 5383 Construct from message and errno value. 5384 5385 Xapian::InvalidOperationError::InvalidOperationError(const std::string 5386 &msg_, int errno_) 5387 5388 Parameters: 5389 ----------- 5390 5391 msg_: Message giving details of the error, intended for human 5392 consumption. 5393 5394 errno_: Optional errno value associated with this error. "; 5395 5396 5397 // File: classXapian_1_1InvertedQuery__.xml 5398 5399 5400 // File: classXapian_1_1KeyMaker.xml 5401 %feature("docstring") Xapian::KeyMaker " 5402 5403 Virtual base class for key making functors. "; 5404 5405 %feature("docstring") Xapian::KeyMaker::KeyMaker " 5406 5407 Default constructor. 5408 5409 Xapian::KeyMaker::KeyMaker() "; 5410 5411 %feature("docstring") Xapian::KeyMaker::~KeyMaker " 5412 5413 Virtual destructor, because we have virtual methods. 5414 5415 virtual Xapian::KeyMaker::~KeyMaker() "; 5416 5417 %feature("docstring") Xapian::KeyMaker::release " 5418 5419 Start reference counting this object. 5420 5421 KeyMaker* Xapian::KeyMaker::release() 5422 5423 You can hand ownership of a dynamically allocated KeyMaker object to 5424 Xapian by calling release() and then passing the object to a Xapian 5425 method. Xapian will arrange to delete the object once it is no longer 5426 required. "; 5427 5428 %feature("docstring") Xapian::KeyMaker::release " 5429 5430 Start reference counting this object. 5431 5432 const KeyMaker* Xapian::KeyMaker::release() const 5433 5434 You can hand ownership of a dynamically allocated KeyMaker object to 5435 Xapian by calling release() and then passing the object to a Xapian 5436 method. Xapian will arrange to delete the object once it is no longer 5437 required. "; 5438 5439 5440 // File: structXapian_1_1MultiValueKeyMaker_1_1KeySpec.xml 5441 5442 5443 // File: structXapian_1_1LatLongCoord.xml 5444 %feature("docstring") Xapian::LatLongCoord " 5445 5446 A latitude-longitude coordinate. 5447 5448 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 5449 features 5450 5451 Note that latitude-longitude coordinates are only precisely meaningful 5452 if the datum used to define them is specified. This class ignores this 5453 issue - it is up to the caller to ensure that the datum used for each 5454 coordinate in a system is consistent. "; 5455 5456 %feature("docstring") Xapian::LatLongCoord::LatLongCoord " 5457 5458 Construct an uninitialised coordinate. 5459 5460 Xapian::LatLongCoord::LatLongCoord() "; 5461 5462 %feature("docstring") Xapian::LatLongCoord::LatLongCoord " 5463 5464 Construct a coordinate. 5465 5466 Xapian::LatLongCoord::LatLongCoord(double latitude_, double 5467 longitude_) 5468 5469 If the supplied longitude is out of the standard range, it will be 5470 normalised to the range 0 <= longitude < 360. 5471 5472 If you want to avoid the checks (for example, you know that your 5473 values are already in range), you can use the alternate constructor to 5474 construct an uninitialised coordinate, and then set the latitude and 5475 longitude directly. 5476 5477 Parameters: 5478 ----------- 5479 5480 InvalidArgumentError: the supplied latitude is out of range. "; 5481 5482 %feature("docstring") Xapian::LatLongCoord::unserialise " 5483 5484 Unserialise a string and set this object to its coordinate. 5485 5486 void Xapian::LatLongCoord::unserialise(const std::string &serialised) 5487 5488 Parameters: 5489 ----------- 5490 5491 serialised: the string to unserialise the coordinate from. 5492 5493 Parameters: 5494 ----------- 5495 5496 Xapian::SerialisationError: if the string does not contain a valid 5497 serialised latitude-longitude pair, or contains extra data at the end 5498 of it. "; 5499 5500 %feature("docstring") Xapian::LatLongCoord::unserialise " 5501 5502 Unserialise a buffer and set this object to its coordinate. 5503 5504 void Xapian::LatLongCoord::unserialise(const char **ptr, const char 5505 *end) 5506 5507 The buffer may contain further data after that for the coordinate. 5508 5509 Parameters: 5510 ----------- 5511 5512 ptr: A pointer to the start of the string. This will be updated to 5513 point to the end of the data representing the coordinate. 5514 5515 end: A pointer to the end of the string. 5516 5517 Parameters: 5518 ----------- 5519 5520 Xapian::SerialisationError: if the string does not start with a valid 5521 serialised latitude- longitude pair. "; 5522 5523 %feature("docstring") Xapian::LatLongCoord::serialise " 5524 5525 Return a serialised representation of the coordinate. 5526 5527 std::string Xapian::LatLongCoord::serialise() const "; 5528 5529 %feature("docstring") Xapian::LatLongCoord::get_description " 5530 5531 Return a string describing this object. 5532 5533 std::string Xapian::LatLongCoord::get_description() const "; 5534 5535 5536 // File: classXapian_1_1LatLongCoords.xml 5537 %feature("docstring") Xapian::LatLongCoords " 5538 5539 A sequence of latitude-longitude coordinates. 5540 5541 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 5542 features "; 5543 5544 %feature("docstring") Xapian::LatLongCoords::begin " 5545 5546 Get a begin iterator for the coordinates. 5547 5548 LatLongCoordsIterator Xapian::LatLongCoords::begin() const "; 5549 5550 %feature("docstring") Xapian::LatLongCoords::end " 5551 5552 Get an end iterator for the coordinates. 5553 5554 LatLongCoordsIterator Xapian::LatLongCoords::end() const "; 5555 5556 %feature("docstring") Xapian::LatLongCoords::size " 5557 5558 Get the number of coordinates in the container. 5559 5560 size_t Xapian::LatLongCoords::size() const "; 5561 5562 %feature("docstring") Xapian::LatLongCoords::empty " 5563 5564 Return true if and only if there are no coordinates in the container. 5565 5566 bool Xapian::LatLongCoords::empty() const "; 5567 5568 %feature("docstring") Xapian::LatLongCoords::append " 5569 5570 Append a coordinate to the end of the sequence. 5571 5572 void Xapian::LatLongCoords::append(const LatLongCoord &coord) "; 5573 5574 %feature("docstring") Xapian::LatLongCoords::LatLongCoords " 5575 5576 Construct an empty container. 5577 5578 Xapian::LatLongCoords::LatLongCoords() "; 5579 5580 %feature("docstring") Xapian::LatLongCoords::LatLongCoords " 5581 5582 Construct a container holding one coordinate. 5583 5584 Xapian::LatLongCoords::LatLongCoords(const LatLongCoord &coord) "; 5585 5586 %feature("docstring") Xapian::LatLongCoords::unserialise " 5587 5588 Unserialise a string and set this object to the coordinates in it. 5589 5590 void Xapian::LatLongCoords::unserialise(const std::string &serialised) 5591 5592 Parameters: 5593 ----------- 5594 5595 serialised: the string to unserialise the coordinates from. 5596 5597 Parameters: 5598 ----------- 5599 5600 Xapian::SerialisationError: if the string does not contain a valid 5601 serialised latitude-longitude pair, or contains junk at the end of it. 5602 "; 5603 5604 %feature("docstring") Xapian::LatLongCoords::serialise " 5605 5606 Return a serialised form of the coordinate list. 5607 5608 std::string Xapian::LatLongCoords::serialise() const "; 5609 5610 %feature("docstring") Xapian::LatLongCoords::get_description " 5611 5612 Return a string describing this object. 5613 5614 std::string Xapian::LatLongCoords::get_description() const "; 5615 5616 5617 // File: classXapian_1_1LatLongCoordsIterator.xml 5618 %feature("docstring") Xapian::LatLongCoordsIterator " 5619 5620 An iterator across the values in a LatLongCoords object. 5621 5622 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 5623 features "; 5624 5625 %feature("docstring") 5626 Xapian::LatLongCoordsIterator::LatLongCoordsIterator " 5627 5628 Default constructor. Produces an uninitialised iterator. 5629 5630 Xapian::LatLongCoordsIterator::LatLongCoordsIterator() "; 5631 5632 5633 // File: classXapian_1_1LatLongDistanceKeyMaker.xml 5634 %feature("docstring") Xapian::LatLongDistanceKeyMaker " 5635 5636 KeyMaker subclass which sorts by distance from a latitude/longitude. 5637 5638 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 5639 features 5640 5641 Results are ordered by the distance from a fixed point, or list of 5642 points, calculated according to the metric supplied. If multiple 5643 points are supplied (either in the constructor, or in the coordinates 5644 stored in a document), the closest pointwise distance is used. 5645 5646 If a document contains no coordinate stored in the specified slot, a 5647 special value for the distance will be used. This defaults to a large 5648 number, so that such results get a low rank, but may be specified by a 5649 constructor parameter. "; 5650 5651 %feature("docstring") 5652 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5653 5654 Construct a LatLongDistanceKeyMaker. 5655 5656 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5657 slot_, const LatLongCoords ¢re_, const LatLongMetric &metric_, 5658 double defdistance) 5659 5660 Parameters: 5661 ----------- 5662 5663 slot_: Value slot to use. 5664 5665 centre_: List of points to calculate distance from (closest distance 5666 is used). 5667 5668 metric_: LatLongMetric to use. 5669 5670 defdistance: Distance to use for docs with no value set. "; 5671 5672 %feature("docstring") 5673 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5674 5675 Construct a LatLongDistanceKeyMaker. 5676 5677 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5678 slot_, const LatLongCoords ¢re_, const LatLongMetric &metric_) 5679 5680 Parameters: 5681 ----------- 5682 5683 slot_: Value slot to use. 5684 5685 centre_: List of points to calculate distance from (closest distance 5686 is used). 5687 5688 metric_: LatLongMetric to use. 5689 5690 Documents where no value is set are assumed to be a large distance 5691 away. "; 5692 5693 %feature("docstring") 5694 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5695 5696 Construct a LatLongDistanceKeyMaker. 5697 5698 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5699 slot_, const LatLongCoords ¢re_) 5700 5701 Parameters: 5702 ----------- 5703 5704 slot_: Value slot to use. 5705 5706 centre_: List of points to calculate distance from (closest distance 5707 is used). 5708 5709 Xapian::GreatCircleMetric is used as the metric. 5710 5711 Documents where no value is set are assumed to be a large distance 5712 away. "; 5713 5714 %feature("docstring") 5715 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5716 5717 Construct a LatLongDistanceKeyMaker. 5718 5719 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5720 slot_, const LatLongCoord ¢re_, const LatLongMetric &metric_, 5721 double defdistance) 5722 5723 Parameters: 5724 ----------- 5725 5726 slot_: Value slot to use. 5727 5728 centre_: Point to calculate distance from. 5729 5730 metric_: LatLongMetric to use. 5731 5732 defdistance: Distance to use for docs with no value set. "; 5733 5734 %feature("docstring") 5735 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5736 5737 Construct a LatLongDistanceKeyMaker. 5738 5739 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5740 slot_, const LatLongCoord ¢re_, const LatLongMetric &metric_) 5741 5742 Parameters: 5743 ----------- 5744 5745 slot_: Value slot to use. 5746 5747 centre_: Point to calculate distance from. 5748 5749 metric_: LatLongMetric to use. 5750 5751 Documents where no value is set are assumed to be a large distance 5752 away. "; 5753 5754 %feature("docstring") 5755 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker " 5756 5757 Construct a LatLongDistanceKeyMaker. 5758 5759 Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno 5760 slot_, const LatLongCoord ¢re_) 5761 5762 Parameters: 5763 ----------- 5764 5765 slot_: Value slot to use. 5766 5767 centre_: Point to calculate distance from. 5768 5769 Xapian::GreatCircleMetric is used as the metric. 5770 5771 Documents where no value is set are assumed to be a large distance 5772 away. "; 5773 5774 %feature("docstring") 5775 Xapian::LatLongDistanceKeyMaker::~LatLongDistanceKeyMaker "Xapian::LatLongDistanceKeyMaker::~LatLongDistanceKeyMaker() "; 5776 5777 5778 // File: classXapian_1_1LatLongDistancePostingSource.xml 5779 %feature("docstring") Xapian::LatLongDistancePostingSource " 5780 5781 Posting source which returns a weight based on geospatial distance. 5782 5783 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 5784 features 5785 5786 Results are weighted by the distance from a fixed point, or list of 5787 points, calculated according to the metric supplied. If multiple 5788 points are supplied (either in the constructor, or in the coordinates 5789 stored in a document), the closest pointwise distance is used. 5790 5791 Documents further away than a specified maximum range (or with no 5792 location stored in the specified slot) will not be returned. 5793 5794 The weight returned is computed from the distance using the formula: 5795 5796 k1 * pow(distance + k1, -k2) 5797 5798 (Where k1 and k2 are (strictly) positive, floating point constants, 5799 which default to 1000 and 1, respectively. Distance is measured in 5800 metres, so this means that something at the centre gets a weight of 5801 1.0, something 1km away gets a weight of 0.5, and something 3km away 5802 gets a weight of 0.25, etc) "; 5803 5804 %feature("docstring") 5805 Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource " 5806 5807 Construct a new posting source which returns only documents within 5808 range of one of the central coordinates. 5809 5810 Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource(Xapian::valueno 5811 slot_, const LatLongCoords ¢re_, const LatLongMetric &metric_, 5812 double max_range_=0.0, double k1_=1000.0, double k2_=1.0) 5813 5814 Parameters: 5815 ----------- 5816 5817 slot_: The value slot to read values from. 5818 5819 centre_: The centre point to use for distance calculations. 5820 5821 metric_: The metric to use for distance calculations. 5822 5823 max_range_: The maximum distance for documents which are returned. 5824 5825 k1_: The k1 constant to use in the weighting function. 5826 5827 k2_: The k2 constant to use in the weighting function. "; 5828 5829 %feature("docstring") 5830 Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource " 5831 5832 Construct a new posting source which returns only documents within 5833 range of one of the central coordinates. 5834 5835 Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource(Xapian::valueno 5836 slot_, const LatLongCoords ¢re_, double max_range_=0.0, double 5837 k1_=1000.0, double k2_=1.0) 5838 5839 Parameters: 5840 ----------- 5841 5842 slot_: The value slot to read values from. 5843 5844 centre_: The centre point to use for distance calculations. 5845 5846 max_range_: The maximum distance for documents which are returned. 5847 5848 k1_: The k1 constant to use in the weighting function. 5849 5850 k2_: The k2 constant to use in the weighting function. 5851 5852 Xapian::GreatCircleMetric is used as the metric. "; 5853 5854 %feature("docstring") 5855 Xapian::LatLongDistancePostingSource::~LatLongDistancePostingSource "Xapian::LatLongDistancePostingSource::~LatLongDistancePostingSource() 5856 "; 5857 5858 %feature("docstring") Xapian::LatLongDistancePostingSource::next " 5859 5860 Advance the current position to the next matching document. 5861 5862 void Xapian::LatLongDistancePostingSource::next(double min_wt) 5863 5864 The PostingSource starts before the first entry in the list, so 5865 next(), skip_to() or check() must be called before any methods which 5866 need the context of the current position. 5867 5868 Xapian will always call init() on a PostingSource before calling this 5869 for the first time. 5870 5871 Parameters: 5872 ----------- 5873 5874 min_wt: The minimum weight contribution that is needed (this is just 5875 a hint which subclasses may ignore). "; 5876 5877 %feature("docstring") Xapian::LatLongDistancePostingSource::skip_to " 5878 5879 Advance to the specified docid. 5880 5881 void Xapian::LatLongDistancePostingSource::skip_to(Xapian::docid 5882 min_docid, double min_wt) 5883 5884 If the specified docid isn't in the list, position ourselves on the 5885 first document after it (or at_end() if no greater docids are 5886 present). 5887 5888 If the current position is already the specified docid, this method 5889 will leave the position unmodified. 5890 5891 If the specified docid is earlier than the current position, the 5892 behaviour is unspecified. A sensible behaviour would be to leave the 5893 current position unmodified, but it is also reasonable to move to the 5894 specified docid. 5895 5896 The default implementation calls next() repeatedly, which works but 5897 skip_to() can often be implemented much more efficiently. 5898 5899 Xapian will always call init() on a PostingSource before calling this 5900 for the first time. 5901 5902 Note: in the case of a multi-database search, the docid specified is 5903 the docid in the single subdatabase relevant to this posting source. 5904 See the init() method for details. 5905 5906 Parameters: 5907 ----------- 5908 5909 did: The document id to advance to. 5910 5911 min_wt: The minimum weight contribution that is needed (this is just 5912 a hint which subclasses may ignore). "; 5913 5914 %feature("docstring") Xapian::LatLongDistancePostingSource::check " 5915 5916 Check if the specified docid occurs. 5917 5918 bool Xapian::LatLongDistancePostingSource::check(Xapian::docid 5919 min_docid, double min_wt) 5920 5921 The caller is required to ensure that the specified document id did 5922 actually exists in the database. If it does, it must move to that 5923 document id, and return true. If it does not, it may either: 5924 5925 return true, having moved to a definite position (including 5926 \"at_end\"), which must be the same position as skip_to() would have 5927 moved to. 5928 5929 or 5930 5931 return false, having moved to an \"indeterminate\" position, such that 5932 a subsequent call to next() or skip_to() will move to the next 5933 matching position after did. 5934 5935 Generally, this method should act like skip_to() and return true if 5936 that can be done at little extra cost. 5937 5938 Otherwise it should simply check if a particular docid is present, 5939 returning true if it is, and false if it isn't. 5940 5941 The default implementation calls skip_to() and always returns true. 5942 5943 Xapian will always call init() on a PostingSource before calling this 5944 for the first time. 5945 5946 Note: in the case of a multi-database search, the docid specified is 5947 the docid in the single subdatabase relevant to this posting source. 5948 See the init() method for details. 5949 5950 Parameters: 5951 ----------- 5952 5953 did: The document id to check. 5954 5955 min_wt: The minimum weight contribution that is needed (this is just 5956 a hint which subclasses may ignore). "; 5957 5958 %feature("docstring") 5959 Xapian::LatLongDistancePostingSource::get_weight " 5960 5961 Return the weight contribution for the current document. 5962 5963 double Xapian::LatLongDistancePostingSource::get_weight() const 5964 5965 This default implementation always returns 0, for convenience when 5966 implementing \"weight-less\" PostingSource subclasses. 5967 5968 This method may assume that it will only be called when there is a 5969 \"current document\". In detail: Xapian will always call init() on a 5970 PostingSource before calling this for the first time. It will also 5971 only call this if the PostingSource reports that it is pointing to a 5972 valid document (ie, it will not call it before calling at least one of 5973 next(), skip_to() or check(), and will ensure that the PostingSource 5974 is not at the end by calling at_end()). "; 5975 5976 %feature("docstring") Xapian::LatLongDistancePostingSource::clone " 5977 5978 Clone the posting source. 5979 5980 LatLongDistancePostingSource* 5981 Xapian::LatLongDistancePostingSource::clone() const 5982 5983 The clone should inherit the configuration of the parent, but need not 5984 inherit the state. ie, the clone does not need to be in the same 5985 iteration position as the original: the matcher will always call 5986 init() on the clone before attempting to move the iterator, or read 5987 the information about the current position of the iterator. 5988 5989 This may return NULL to indicate that cloning is not supported. In 5990 this case, the PostingSource may only be used with a single-database 5991 search. 5992 5993 The default implementation returns NULL. 5994 5995 Note that the returned object will be deallocated by Xapian after use 5996 with \"delete\". If you want to handle the deletion in a special way 5997 (for example when wrapping the Xapian API for use from another 5998 language) then you can define a static operator delete method in your 5999 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 6000 6001 %feature("docstring") Xapian::LatLongDistancePostingSource::name " 6002 6003 Name of the posting source class. 6004 6005 std::string Xapian::LatLongDistancePostingSource::name() const 6006 6007 This is used when serialising and unserialising posting sources; for 6008 example, for performing remote searches. 6009 6010 If the subclass is in a C++ namespace, the namespace should be 6011 included in the name, using \"::\" as a separator. For example, for a 6012 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 6013 namespace the result of this call should be 6014 \"Xapian::FooPostingSource\". 6015 6016 This should only be implemented if serialise() and unserialise() are 6017 also implemented. The default implementation returns an empty string. 6018 6019 If this returns an empty string, Xapian will assume that serialise() 6020 and unserialise() are not implemented. "; 6021 6022 %feature("docstring") Xapian::LatLongDistancePostingSource::serialise 6023 " 6024 6025 Serialise object parameters into a string. 6026 6027 std::string Xapian::LatLongDistancePostingSource::serialise() const 6028 6029 The serialised parameters should represent the configuration of the 6030 posting source, but need not (indeed, should not) represent the 6031 current iteration state. 6032 6033 If you don't want to support the remote backend, you can use the 6034 default implementation which simply throws Xapian::UnimplementedError. 6035 "; 6036 6037 %feature("docstring") 6038 Xapian::LatLongDistancePostingSource::unserialise_with_registry " 6039 6040 Create object given string serialisation returned by serialise(). 6041 6042 LatLongDistancePostingSource* 6043 Xapian::LatLongDistancePostingSource::unserialise_with_registry(const 6044 std::string &serialised, const Registry ®istry) const 6045 6046 Note that the returned object will be deallocated by Xapian after use 6047 with \"delete\". If you want to handle the deletion in a special way 6048 (for example when wrapping the Xapian API for use from another 6049 language) then you can define a static operator delete method in your 6050 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 6051 6052 This method is supplied with a Registry object, which can be used when 6053 unserialising objects contained within the posting source. The default 6054 implementation simply calls unserialise() which doesn't take the 6055 Registry object, so you do not need to implement this method unless 6056 you want to take advantage of the Registry object when unserialising. 6057 6058 Parameters: 6059 ----------- 6060 6061 serialised: A serialised instance of this PostingSource subclass. 6062 6063 registry: The Xapian::Registry object to use. "; 6064 6065 %feature("docstring") Xapian::LatLongDistancePostingSource::init " 6066 6067 Set this PostingSource to the start of the list of postings. 6068 6069 void Xapian::LatLongDistancePostingSource::init(const Database &db_) 6070 6071 This is called automatically by the matcher prior to each query being 6072 processed. 6073 6074 If a PostingSource is used for multiple searches, init() will 6075 therefore be called multiple times, and must handle this by using the 6076 database passed in the most recent call. 6077 6078 Parameters: 6079 ----------- 6080 6081 db: The database which the PostingSource should iterate through. 6082 6083 Note: in the case of a multi-database search, a separate PostingSource 6084 will be used for each database (the separate PostingSources will be 6085 obtained using clone()), and each PostingSource will be passed one of 6086 the sub-databases as the db parameter here. The db parameter will 6087 therefore always refer to a single database. All docids passed to, or 6088 returned from, the PostingSource refer to docids in that single 6089 database, rather than in the multi- database. "; 6090 6091 %feature("docstring") 6092 Xapian::LatLongDistancePostingSource::get_description " 6093 6094 Return a string describing this object. 6095 6096 std::string Xapian::LatLongDistancePostingSource::get_description() 6097 const 6098 6099 This default implementation returns a generic answer. This default it 6100 provided to avoid forcing those deriving their own PostingSource 6101 subclass from having to implement this (they may not care what 6102 get_description() gives for their subclass). "; 6103 6104 6105 // File: classXapian_1_1LatLongMetric.xml 6106 %feature("docstring") Xapian::LatLongMetric " 6107 6108 Base class for calculating distances between two lat/long coordinates. 6109 6110 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 6111 features "; 6112 6113 %feature("docstring") Xapian::LatLongMetric::~LatLongMetric " 6114 6115 Destructor. 6116 6117 virtual Xapian::LatLongMetric::~LatLongMetric() "; 6118 6119 %feature("docstring") Xapian::LatLongMetric::pointwise_distance " 6120 6121 Return the distance between two coordinates, in metres. 6122 6123 virtual double Xapian::LatLongMetric::pointwise_distance(const 6124 LatLongCoord &a, const LatLongCoord &b) const =0 "; 6125 6126 %feature("docstring") Xapian::LatLongMetric::clone " 6127 6128 Clone the metric. 6129 6130 virtual LatLongMetric* Xapian::LatLongMetric::clone() const =0 "; 6131 6132 %feature("docstring") Xapian::LatLongMetric::name " 6133 6134 Return the full name of the metric. 6135 6136 virtual std::string Xapian::LatLongMetric::name() const =0 6137 6138 This is used when serialising and unserialising metrics; for example, 6139 for performing remote searches. 6140 6141 If the subclass is in a C++ namespace, the namespace should be 6142 included in the name, using \"::\" as a separator. For example, for a 6143 LatLongMetric subclass called \"FooLatLongMetric\" in the \"Xapian\" 6144 namespace the result of this call should be 6145 \"Xapian::FooLatLongMetric\". "; 6146 6147 %feature("docstring") Xapian::LatLongMetric::serialise " 6148 6149 Serialise object parameters into a string. 6150 6151 virtual std::string Xapian::LatLongMetric::serialise() const =0 6152 6153 The serialised parameters should represent the configuration of the 6154 metric. "; 6155 6156 %feature("docstring") Xapian::LatLongMetric::unserialise " 6157 6158 Create object given string serialisation returned by serialise(). 6159 6160 virtual LatLongMetric* Xapian::LatLongMetric::unserialise(const 6161 std::string &serialised) const =0 6162 6163 Parameters: 6164 ----------- 6165 6166 serialised: A serialised instance of this LatLongMetric subclass. "; 6167 6168 6169 // File: classXapian_1_1LMWeight.xml 6170 %feature("docstring") Xapian::LMWeight " 6171 6172 Xapian::Weight subclass implementing the Language Model formula. 6173 6174 This class implements the \"Language Model\" Weighting scheme, as 6175 described by the early papers on LM by Bruce Croft. 6176 6177 LM works by comparing the query to a Language Model of the document. 6178 The language model itself is parameter-free, though LMWeight takes 6179 parameters which specify the smoothing used. "; 6180 6181 %feature("docstring") Xapian::LMWeight::LMWeight " 6182 6183 Construct a LMWeight. 6184 6185 Xapian::LMWeight::LMWeight(double param_log_=0.0, type_smoothing 6186 select_smoothing_=TWO_STAGE_SMOOTHING, double param_smoothing1_=-1.0, 6187 double param_smoothing2_=-1.0) 6188 6189 Parameters: 6190 ----------- 6191 6192 param_log_: A non-negative parameter controlling how much to clamp 6193 negative values returned by the log. The log is calculated by 6194 multiplying the actual weight by param_log. If param_log is 0.0, then 6195 the document length upper bound will be used (default: document length 6196 upper bound) 6197 6198 select_smoothing_: A parameter of type enum type_smoothing. This 6199 parameter controls which smoothing type to use. (default: 6200 TWO_STAGE_SMOOTHING) 6201 6202 param_smoothing1_: A non-negative parameter for smoothing whose 6203 meaning depends on select_smoothing_. In JELINEK_MERCER_SMOOTHING, it 6204 plays the role of estimation and in DIRICHLET_SMOOTHING the role of 6205 query modelling. (default JELINEK_MERCER, ABSOLUTE, TWOSTAGE(0.7), 6206 DIRCHLET(2000)) 6207 6208 param_smoothing2_: A non-negative parameter which is used with 6209 TWO_STAGE_SMOOTHING as parameter for Dirichlet's smoothing (default: 6210 2000) and as parameter delta to control the scale of the tf lower 6211 bound in the DIRICHLET_PLUS_SMOOTHING (default 0.05). "; 6212 6213 %feature("docstring") Xapian::LMWeight::name " 6214 6215 Return the name of this weighting scheme. 6216 6217 std::string Xapian::LMWeight::name() const 6218 6219 This name is used by the remote backend. It is passed along with the 6220 serialised parameters to the remote server so that it knows which 6221 class to create. 6222 6223 Return the full namespace-qualified name of your class here - if your 6224 class is called FooWeight, return \"FooWeight\" from this method ( 6225 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 6226 6227 If you don't want to support the remote backend, you can use the 6228 default implementation which simply returns an empty string. "; 6229 6230 %feature("docstring") Xapian::LMWeight::serialise " 6231 6232 Return this object's parameters serialised as a single string. 6233 6234 std::string Xapian::LMWeight::serialise() const 6235 6236 If you don't want to support the remote backend, you can use the 6237 default implementation which simply throws Xapian::UnimplementedError. 6238 "; 6239 6240 %feature("docstring") Xapian::LMWeight::unserialise " 6241 6242 Unserialise parameters. 6243 6244 LMWeight* Xapian::LMWeight::unserialise(const std::string &serialised) 6245 const 6246 6247 This method unserialises parameters serialised by the serialise() 6248 method and allocates and returns a new object initialised with them. 6249 6250 If you don't want to support the remote backend, you can use the 6251 default implementation which simply throws Xapian::UnimplementedError. 6252 6253 Note that the returned object will be deallocated by Xapian after use 6254 with \"delete\". If you want to handle the deletion in a special way 6255 (for example when wrapping the Xapian API for use from another 6256 language) then you can define a static operator delete method in your 6257 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 6258 6259 Parameters: 6260 ----------- 6261 6262 serialised: A string containing the serialised parameters. "; 6263 6264 %feature("docstring") Xapian::LMWeight::get_sumpart " 6265 6266 Calculate the weight contribution for this object's term to a 6267 document. 6268 6269 double Xapian::LMWeight::get_sumpart(Xapian::termcount wdf, 6270 Xapian::termcount doclen, Xapian::termcount uniqterm) const 6271 6272 The parameters give information about the document which may be used 6273 in the calculations: 6274 6275 Parameters: 6276 ----------- 6277 6278 wdf: The within document frequency of the term in the document. 6279 6280 doclen: The document's length (unnormalised). 6281 6282 uniqterms: Number of unique terms in the document (used for absolute 6283 smoothing). "; 6284 6285 %feature("docstring") Xapian::LMWeight::get_maxpart " 6286 6287 Return an upper bound on what get_sumpart() can return for any 6288 document. 6289 6290 double Xapian::LMWeight::get_maxpart() const 6291 6292 This information is used by the matcher to perform various 6293 optimisations, so strive to make the bound as tight as possible. "; 6294 6295 %feature("docstring") Xapian::LMWeight::get_sumextra " 6296 6297 Calculate the term-independent weight component for a document. 6298 6299 double Xapian::LMWeight::get_sumextra(Xapian::termcount doclen, 6300 Xapian::termcount) const 6301 6302 The parameter gives information about the document which may be used 6303 in the calculations: 6304 6305 Parameters: 6306 ----------- 6307 6308 doclen: The document's length (unnormalised). 6309 6310 uniqterms: The number of unique terms in the document. "; 6311 6312 %feature("docstring") Xapian::LMWeight::get_maxextra " 6313 6314 Return an upper bound on what get_sumextra() can return for any 6315 document. 6316 6317 double Xapian::LMWeight::get_maxextra() const 6318 6319 This information is used by the matcher to perform various 6320 optimisations, so strive to make the bound as tight as possible. "; 6321 6322 6323 // File: classXapian_1_1LogicError.xml 6324 %feature("docstring") Xapian::LogicError " 6325 6326 The base class for exceptions indicating errors in the program logic. 6327 6328 A subclass of LogicError will be thrown if Xapian detects a violation 6329 of a class invariant or a logical precondition or postcondition, etc. 6330 "; 6331 6332 6333 // File: classXapian_1_1MatchDecider.xml 6334 %feature("docstring") Xapian::MatchDecider " 6335 6336 Base class for matcher decision functor. "; 6337 6338 %feature("docstring") Xapian::MatchDecider::MatchDecider " 6339 6340 Default constructor. 6341 6342 Xapian::MatchDecider::MatchDecider() "; 6343 6344 %feature("docstring") Xapian::MatchDecider::~MatchDecider " 6345 6346 Destructor. 6347 6348 virtual Xapian::MatchDecider::~MatchDecider() "; 6349 6350 6351 // File: classXapian_1_1MatchSpy.xml 6352 %feature("docstring") Xapian::MatchSpy " 6353 6354 Abstract base class for match spies. 6355 6356 The subclasses will generally accumulate information seen during the 6357 match, to calculate aggregate functions, or other profiles of the 6358 matching documents. "; 6359 6360 %feature("docstring") Xapian::MatchSpy::MatchSpy " 6361 6362 Default constructor, needed by subclass constructors. 6363 6364 Xapian::MatchSpy::MatchSpy() "; 6365 6366 %feature("docstring") Xapian::MatchSpy::~MatchSpy " 6367 6368 Virtual destructor, because we have virtual methods. 6369 6370 virtual Xapian::MatchSpy::~MatchSpy() "; 6371 6372 %feature("docstring") Xapian::MatchSpy::clone " 6373 6374 Clone the match spy. 6375 6376 virtual MatchSpy* Xapian::MatchSpy::clone() const 6377 6378 The clone should inherit the configuration of the parent, but need not 6379 inherit the state. ie, the clone does not need to be passed 6380 information about the results seen by the parent. 6381 6382 If you don't want to support the remote backend in your match spy, you 6383 can use the default implementation which simply throws 6384 Xapian::UnimplementedError. 6385 6386 Note that the returned object will be deallocated by Xapian after use 6387 with \"delete\". If you want to handle the deletion in a special way 6388 (for example when wrapping the Xapian API for use from another 6389 language) then you can define a static operator delete method in your 6390 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 6391 6392 %feature("docstring") Xapian::MatchSpy::name " 6393 6394 Return the name of this match spy. 6395 6396 virtual std::string Xapian::MatchSpy::name() const 6397 6398 This name is used by the remote backend. It is passed with the 6399 serialised parameters to the remote server so that it knows which 6400 class to create. 6401 6402 Return the full namespace-qualified name of your class here - if your 6403 class is called MyApp::FooMatchSpy, return \"MyApp::FooMatchSpy\" from 6404 this method. 6405 6406 If you don't want to support the remote backend in your match spy, you 6407 can use the default implementation which simply throws 6408 Xapian::UnimplementedError. "; 6409 6410 %feature("docstring") Xapian::MatchSpy::serialise " 6411 6412 Return this object's parameters serialised as a single string. 6413 6414 virtual std::string Xapian::MatchSpy::serialise() const 6415 6416 If you don't want to support the remote backend in your match spy, you 6417 can use the default implementation which simply throws 6418 Xapian::UnimplementedError. "; 6419 6420 %feature("docstring") Xapian::MatchSpy::unserialise " 6421 6422 Unserialise parameters. 6423 6424 virtual MatchSpy* Xapian::MatchSpy::unserialise(const std::string 6425 &serialised, const Registry &context) const 6426 6427 This method unserialises parameters serialised by the serialise() 6428 method and allocates and returns a new object initialised with them. 6429 6430 If you don't want to support the remote backend in your match spy, you 6431 can use the default implementation which simply throws 6432 Xapian::UnimplementedError. 6433 6434 Note that the returned object will be deallocated by Xapian after use 6435 with \"delete\". If you want to handle the deletion in a special way 6436 (for example when wrapping the Xapian API for use from another 6437 language) then you can define a static operator delete method in your 6438 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 6439 6440 Parameters: 6441 ----------- 6442 6443 serialised: A string containing the serialised results. 6444 6445 context: Registry object to use for unserialisation to permit 6446 MatchSpy subclasses with sub-MatchSpy objects to be implemented. "; 6447 6448 %feature("docstring") Xapian::MatchSpy::serialise_results " 6449 6450 Serialise the results of this match spy. 6451 6452 virtual std::string Xapian::MatchSpy::serialise_results() const 6453 6454 If you don't want to support the remote backend in your match spy, you 6455 can use the default implementation which simply throws 6456 Xapian::UnimplementedError. "; 6457 6458 %feature("docstring") Xapian::MatchSpy::merge_results " 6459 6460 Unserialise some results, and merge them into this matchspy. 6461 6462 virtual void Xapian::MatchSpy::merge_results(const std::string 6463 &serialised) 6464 6465 The order in which results are merged should not be significant, since 6466 this order is not specified (and will vary depending on the speed of 6467 the search in each sub-database). 6468 6469 If you don't want to support the remote backend in your match spy, you 6470 can use the default implementation which simply throws 6471 Xapian::UnimplementedError. 6472 6473 Parameters: 6474 ----------- 6475 6476 serialised: A string containing the serialised results. "; 6477 6478 %feature("docstring") Xapian::MatchSpy::get_description " 6479 6480 Return a string describing this object. 6481 6482 virtual std::string Xapian::MatchSpy::get_description() const 6483 6484 This default implementation returns a generic answer, to avoid forcing 6485 those deriving their own MatchSpy subclasses from having to implement 6486 this (they may not care what get_description() gives for their 6487 subclass). "; 6488 6489 %feature("docstring") Xapian::MatchSpy::release " 6490 6491 Start reference counting this object. 6492 6493 MatchSpy* Xapian::MatchSpy::release() 6494 6495 You can hand ownership of a dynamically allocated MatchSpy object to 6496 Xapian by calling release() and then passing the object to a Xapian 6497 method. Xapian will arrange to delete the object once it is no longer 6498 required. "; 6499 6500 %feature("docstring") Xapian::MatchSpy::release " 6501 6502 Start reference counting this object. 6503 6504 const MatchSpy* Xapian::MatchSpy::release() const 6505 6506 You can hand ownership of a dynamically allocated MatchSpy object to 6507 Xapian by calling release() and then passing the object to a Xapian 6508 method. Xapian will arrange to delete the object once it is no longer 6509 required. "; 6510 6511 6512 // File: classXapian_1_1MSet.xml 6513 %feature("docstring") Xapian::MSet " 6514 6515 Class representing a list of search results. "; 6516 6517 %feature("docstring") Xapian::MSet::MSet " 6518 6519 Copying is allowed. 6520 6521 Xapian::MSet::MSet(const MSet &o) 6522 6523 The internals are reference counted, so copying is cheap. "; 6524 6525 %feature("docstring") Xapian::MSet::MSet " 6526 6527 Default constructor. 6528 6529 Xapian::MSet::MSet() 6530 6531 Creates an empty MSet, mostly useful as a placeholder. "; 6532 6533 %feature("docstring") Xapian::MSet::~MSet " 6534 6535 Destructor. 6536 6537 Xapian::MSet::~MSet() "; 6538 6539 %feature("docstring") Xapian::MSet::convert_to_percent " 6540 6541 Convert a weight to a percentage. 6542 6543 int Xapian::MSet::convert_to_percent(double weight) const 6544 6545 The matching document with the highest weight will get 100% if it 6546 matches all the weighted query terms, and proportionally less if it 6547 only matches some, and other weights are scaled by the same factor. 6548 6549 Documents with a non-zero score will always score at least 1%. 6550 6551 Note that these generally aren't percentages of anything meaningful 6552 (unless you use a custom weighting formula where they are!) "; 6553 6554 %feature("docstring") Xapian::MSet::convert_to_percent " 6555 6556 Convert the weight of the current iterator position to a percentage. 6557 6558 int Xapian::MSet::convert_to_percent(const MSetIterator &it) const 6559 6560 The matching document with the highest weight will get 100% if it 6561 matches all the weighted query terms, and proportionally less if it 6562 only matches some, and other weights are scaled by the same factor. 6563 6564 Documents with a non-zero score will always score at least 1%. 6565 6566 Note that these generally aren't percentages of anything meaningful 6567 (unless you use a custom weighting formula where they are!) "; 6568 6569 %feature("docstring") Xapian::MSet::get_termfreq " 6570 6571 Get the termfreq of a term. 6572 6573 Xapian::doccount Xapian::MSet::get_termfreq(const std::string &term) 6574 const 6575 6576 The number of documents which term occurs in. This considers all 6577 documents in the database being searched, so gives the same answer as 6578 db.get_termfreq(term) (but is more efficient for query terms as it 6579 returns a value cached during the search.) "; 6580 6581 %feature("docstring") Xapian::MSet::get_termweight " 6582 6583 Get the term weight of a term. 6584 6585 double Xapian::MSet::get_termweight(const std::string &term) const 6586 6587 The maximum weight that term could have contributed to a document. "; 6588 6589 %feature("docstring") Xapian::MSet::get_firstitem " 6590 6591 Rank of first item in this MSet. 6592 6593 Xapian::doccount Xapian::MSet::get_firstitem() const 6594 6595 This is the parameter first passed to Xapian::Enquire::get_mset(). "; 6596 6597 %feature("docstring") Xapian::MSet::get_matches_lower_bound " 6598 6599 Lower bound on the total number of matching documents. 6600 6601 Xapian::doccount Xapian::MSet::get_matches_lower_bound() const "; 6602 6603 %feature("docstring") Xapian::MSet::get_matches_estimated " 6604 6605 Estimate of the total number of matching documents. 6606 6607 Xapian::doccount Xapian::MSet::get_matches_estimated() const "; 6608 6609 %feature("docstring") Xapian::MSet::get_matches_upper_bound " 6610 6611 Upper bound on the total number of matching documents. 6612 6613 Xapian::doccount Xapian::MSet::get_matches_upper_bound() const "; 6614 6615 %feature("docstring") 6616 Xapian::MSet::get_uncollapsed_matches_lower_bound " 6617 6618 Lower bound on the total number of matching documents before 6619 collapsing. 6620 6621 Xapian::doccount Xapian::MSet::get_uncollapsed_matches_lower_bound() 6622 const 6623 6624 Conceptually the same as get_matches_lower_bound() for the same query 6625 without any collapse part (though the actual value may differ). "; 6626 6627 %feature("docstring") Xapian::MSet::get_uncollapsed_matches_estimated 6628 " 6629 6630 Estimate of the total number of matching documents before collapsing. 6631 6632 Xapian::doccount Xapian::MSet::get_uncollapsed_matches_estimated() 6633 const 6634 6635 Conceptually the same as get_matches_estimated() for the same query 6636 without any collapse part (though the actual value may differ). "; 6637 6638 %feature("docstring") 6639 Xapian::MSet::get_uncollapsed_matches_upper_bound " 6640 6641 Upper bound on the total number of matching documents before 6642 collapsing. 6643 6644 Xapian::doccount Xapian::MSet::get_uncollapsed_matches_upper_bound() 6645 const 6646 6647 Conceptually the same as get_matches_upper_bound() for the same query 6648 without any collapse part (though the actual value may differ). "; 6649 6650 %feature("docstring") Xapian::MSet::get_max_attained " 6651 6652 The maximum weight attained by any document. 6653 6654 double Xapian::MSet::get_max_attained() const "; 6655 6656 %feature("docstring") Xapian::MSet::get_max_possible " 6657 6658 The maximum possible weight any document could achieve. 6659 6660 double Xapian::MSet::get_max_possible() const "; 6661 6662 %feature("docstring") Xapian::MSet::snippet " 6663 6664 Generate a snippet. 6665 6666 std::string Xapian::MSet::snippet(const std::string &text, size_t 6667 length=500, const Xapian::Stem &stemmer=Xapian::Stem(), unsigned 6668 flags=SNIPPET_BACKGROUND_MODEL|SNIPPET_EXHAUSTIVE, const std::string 6669 &hi_start=\"<b>\", const std::string &hi_end=\"</b>\", const 6670 std::string &omit=\"...\") const 6671 6672 This method selects a continuous run of words from text, based mainly 6673 on where the query matches (currently terms, exact phrases and 6674 wildcards are taken into account). If flag SNIPPET_BACKGROUND_MODEL is 6675 used (which it is by default) then the selection algorithm also 6676 considers the non-query terms in the text with the aim of showing a 6677 context which provides more useful information. 6678 6679 The size of the text selected can be controlled by the length 6680 parameter, which specifies a number of bytes of text to aim to select. 6681 However slightly more text may be selected. Also the size of any 6682 escaping, highlighting or omission markers is not considered. 6683 6684 The returned text is escaped to make it suitable for use in HTML 6685 (though beware that in upstream releases 1.4.5 and earlier this 6686 escaping was sometimes incomplete), and matches with the query will be 6687 highlighted using hi_start and hi_end. 6688 6689 If the snippet seems to start or end mid-sentence, then omit is 6690 prepended or append (respectively) to indicate this. 6691 6692 The same stemming algorithm which was used to build the query should 6693 be specified in stemmer. 6694 6695 And flags contains flags controlling behaviour. 6696 6697 Added in 1.3.5. "; 6698 6699 %feature("docstring") Xapian::MSet::fetch " 6700 6701 Prefetch hint a range of items. 6702 6703 void Xapian::MSet::fetch(const MSetIterator &begin, const MSetIterator 6704 &end) const 6705 6706 For a remote database, this may start a pipelined fetch of the 6707 requested documents from the remote server. 6708 6709 For a disk-based database, this may send prefetch hints to the 6710 operating system such that the disk blocks the requested documents are 6711 stored in are more likely to be in the cache when we come to actually 6712 read them. "; 6713 6714 %feature("docstring") Xapian::MSet::fetch " 6715 6716 Prefetch hint a single MSet item. 6717 6718 void Xapian::MSet::fetch(const MSetIterator &item) const 6719 6720 For a remote database, this may start a pipelined fetch of the 6721 requested documents from the remote server. 6722 6723 For a disk-based database, this may send prefetch hints to the 6724 operating system such that the disk blocks the requested documents are 6725 stored in are more likely to be in the cache when we come to actually 6726 read them. "; 6727 6728 %feature("docstring") Xapian::MSet::fetch " 6729 6730 Prefetch hint the whole MSet. 6731 6732 void Xapian::MSet::fetch() const 6733 6734 For a remote database, this may start a pipelined fetch of the 6735 requested documents from the remote server. 6736 6737 For a disk-based database, this may send prefetch hints to the 6738 operating system such that the disk blocks the requested documents are 6739 stored in are more likely to be in the cache when we come to actually 6740 read them. "; 6741 6742 %feature("docstring") Xapian::MSet::size " 6743 6744 Return number of items in this MSet object. 6745 6746 Xapian::doccount Xapian::MSet::size() const "; 6747 6748 %feature("docstring") Xapian::MSet::empty " 6749 6750 Return true if this MSet object is empty. 6751 6752 bool Xapian::MSet::empty() const "; 6753 6754 %feature("docstring") Xapian::MSet::swap " 6755 6756 Efficiently swap this MSet object with another. 6757 6758 void Xapian::MSet::swap(MSet &o) "; 6759 6760 %feature("docstring") Xapian::MSet::begin " 6761 6762 Return iterator pointing to the first item in this MSet. 6763 6764 MSetIterator Xapian::MSet::begin() const "; 6765 6766 %feature("docstring") Xapian::MSet::end " 6767 6768 Return iterator pointing to just after the last item in this MSet. 6769 6770 MSetIterator Xapian::MSet::end() const "; 6771 6772 %feature("docstring") Xapian::MSet::back " 6773 6774 Return iterator pointing to the last object in this MSet. 6775 6776 MSetIterator Xapian::MSet::back() const "; 6777 6778 %feature("docstring") Xapian::MSet::get_description " 6779 6780 Return a string describing this object. 6781 6782 std::string Xapian::MSet::get_description() const "; 6783 6784 6785 // File: classXapian_1_1MSetIterator.xml 6786 %feature("docstring") Xapian::MSetIterator " 6787 6788 Iterator over a Xapian::MSet. "; 6789 6790 %feature("docstring") Xapian::MSetIterator::MSetIterator " 6791 6792 Create an unpositioned MSetIterator. 6793 6794 Xapian::MSetIterator::MSetIterator() "; 6795 6796 %feature("docstring") Xapian::MSetIterator::get_rank " 6797 6798 Return the MSet rank for the current position. 6799 6800 Xapian::doccount Xapian::MSetIterator::get_rank() const 6801 6802 The rank of mset[0] is mset.get_firstitem(). "; 6803 6804 %feature("docstring") Xapian::MSetIterator::get_document " 6805 6806 Get the Document object for the current position. 6807 6808 Xapian::Document Xapian::MSetIterator::get_document() const "; 6809 6810 %feature("docstring") Xapian::MSetIterator::get_weight " 6811 6812 Get the weight for the current position. 6813 6814 double Xapian::MSetIterator::get_weight() const "; 6815 6816 %feature("docstring") Xapian::MSetIterator::get_collapse_key " 6817 6818 Return the collapse key for the current position. 6819 6820 std::string Xapian::MSetIterator::get_collapse_key() const 6821 6822 If collapsing isn't in use, an empty string will be returned. "; 6823 6824 %feature("docstring") Xapian::MSetIterator::get_collapse_count " 6825 6826 Return a count of the number of collapses done onto the current key. 6827 6828 Xapian::doccount Xapian::MSetIterator::get_collapse_count() const 6829 6830 This starts at 0, and is incremented each time an item is eliminated 6831 because its key is the same as that of the current item (as returned 6832 by get_collapse_key()). 6833 6834 Note that this is NOT necessarily one less than the total number of 6835 matching documents with this collapse key due to various optimisations 6836 implemented in the matcher - for example, it can skip documents 6837 completely if it can prove their weight wouldn't be enough to make the 6838 result set. 6839 6840 You can say is that if get_collapse_count() > 0 then there are >= 6841 get_collapse_count() other documents with the current collapse key. 6842 But if get_collapse_count() == 0 then there may or may not be other 6843 such documents. "; 6844 6845 %feature("docstring") Xapian::MSetIterator::get_sort_key " 6846 6847 Return the sort key for the current position. 6848 6849 std::string Xapian::MSetIterator::get_sort_key() const 6850 6851 If sorting didn't use a key then an empty string will be returned. 6852 6853 Added in Xapian 1.4.6. "; 6854 6855 %feature("docstring") Xapian::MSetIterator::get_percent " 6856 6857 Convert the weight of the current iterator position to a percentage. 6858 6859 int Xapian::MSetIterator::get_percent() const 6860 6861 The matching document with the highest weight will get 100% if it 6862 matches all the weighted query terms, and proportionally less if it 6863 only matches some, and other weights are scaled by the same factor. 6864 6865 Documents with a non-zero score will always score at least 1%. 6866 6867 Note that these generally aren't percentages of anything meaningful 6868 (unless you use a custom weighting formula where they are!) "; 6869 6870 %feature("docstring") Xapian::MSetIterator::get_description " 6871 6872 Return a string describing this object. 6873 6874 std::string Xapian::MSetIterator::get_description() const "; 6875 6876 6877 // File: classXapian_1_1MultiValueKeyMaker.xml 6878 %feature("docstring") Xapian::MultiValueKeyMaker " 6879 6880 KeyMaker subclass which combines several values. 6881 6882 When the result is used for sorting, results are ordered by the first 6883 value. In the event of a tie, the second is used. If this is the same 6884 for both, the third is used, and so on. If reverse is true for a 6885 value, then the sort order for that value is reversed. 6886 6887 When used for collapsing, the documents will only be considered equal 6888 if all the values specified match. If none of the specified values are 6889 set then the generated key will be empty, so such documents won't be 6890 collapsed (which is consistent with the behaviour in the \"collapse on 6891 a value\" case). If you'd prefer that documents with none of the keys 6892 set are collapsed together, then you can set reverse for at least one 6893 of the values. Other than this, it isn't useful to set reverse for 6894 collapsing. "; 6895 6896 %feature("docstring") Xapian::MultiValueKeyMaker::MultiValueKeyMaker 6897 "Xapian::MultiValueKeyMaker::MultiValueKeyMaker() "; 6898 6899 %feature("docstring") Xapian::MultiValueKeyMaker::MultiValueKeyMaker 6900 " 6901 6902 Construct a MultiValueKeyMaker from a pair of iterators. 6903 6904 Xapian::MultiValueKeyMaker::MultiValueKeyMaker(Iterator begin, 6905 Iterator end) 6906 6907 The iterators must be a begin/end pair returning Xapian::valueno (or a 6908 compatible type) when dereferenced. "; 6909 6910 %feature("docstring") Xapian::MultiValueKeyMaker::add_value " 6911 6912 Add a value slot to the list to build a key from. 6913 6914 void Xapian::MultiValueKeyMaker::add_value(Xapian::valueno slot, bool 6915 reverse=false, const std::string &defvalue=std::string()) 6916 6917 Parameters: 6918 ----------- 6919 6920 slot: The value slot to add 6921 6922 reverse: Adjust values from this slot to reverse their sort order 6923 (default: false) 6924 6925 defvalue: Value to use for documents which don't have a value set in 6926 this slot (default: empty). This can be used to make such documents 6927 sort after all others by passing get_value_upper_bound(slot) + \"x\" 6928 this is guaranteed to be greater than any value in this slot. "; 6929 6930 6931 // File: classXapian_1_1NetworkError.xml 6932 %feature("docstring") Xapian::NetworkError " 6933 6934 Indicates a problem communicating with a remote database. "; 6935 6936 %feature("docstring") Xapian::NetworkError::NetworkError " 6937 6938 General purpose constructor. 6939 6940 Xapian::NetworkError::NetworkError(const std::string &msg_, const 6941 std::string &context_=std::string(), int errno_=0) 6942 6943 Parameters: 6944 ----------- 6945 6946 msg_: Message giving details of the error, intended for human 6947 consumption. 6948 6949 context_: Optional context information for this error. 6950 6951 errno_: Optional errno value associated with this error. "; 6952 6953 %feature("docstring") Xapian::NetworkError::NetworkError " 6954 6955 Construct from message and errno value. 6956 6957 Xapian::NetworkError::NetworkError(const std::string &msg_, int 6958 errno_) 6959 6960 Parameters: 6961 ----------- 6962 6963 msg_: Message giving details of the error, intended for human 6964 consumption. 6965 6966 errno_: Optional errno value associated with this error. "; 6967 6968 6969 // File: classXapian_1_1NetworkTimeoutError.xml 6970 %feature("docstring") Xapian::NetworkTimeoutError " 6971 6972 Indicates a timeout expired while communicating with a remote 6973 database. "; 6974 6975 %feature("docstring") 6976 Xapian::NetworkTimeoutError::NetworkTimeoutError " 6977 6978 General purpose constructor. 6979 6980 Xapian::NetworkTimeoutError::NetworkTimeoutError(const std::string 6981 &msg_, const std::string &context_=std::string(), int errno_=0) 6982 6983 Parameters: 6984 ----------- 6985 6986 msg_: Message giving details of the error, intended for human 6987 consumption. 6988 6989 context_: Optional context information for this error. 6990 6991 errno_: Optional errno value associated with this error. "; 6992 6993 %feature("docstring") 6994 Xapian::NetworkTimeoutError::NetworkTimeoutError " 6995 6996 Construct from message and errno value. 6997 6998 Xapian::NetworkTimeoutError::NetworkTimeoutError(const std::string 6999 &msg_, int errno_) 7000 7001 Parameters: 7002 ----------- 7003 7004 msg_: Message giving details of the error, intended for human 7005 consumption. 7006 7007 errno_: Optional errno value associated with this error. "; 7008 7009 7010 // File: classXapian_1_1NumberRangeProcessor.xml 7011 %feature("docstring") Xapian::NumberRangeProcessor " 7012 7013 Handle a number range. 7014 7015 This class must be used on values which have been encoded using 7016 Xapian::sortable_serialise() which turns numbers into strings which 7017 will sort in the same order as the numbers (the same values can be 7018 used to implement a numeric sort). "; 7019 7020 %feature("docstring") 7021 Xapian::NumberRangeProcessor::NumberRangeProcessor " 7022 7023 Constructor. 7024 7025 Xapian::NumberRangeProcessor::NumberRangeProcessor(Xapian::valueno 7026 slot_, const std::string &str_=std::string(), unsigned flags_=0) 7027 7028 Parameters: 7029 ----------- 7030 7031 slot_: The value slot number to query. 7032 7033 str_: A string to look for to recognise values as belonging to this 7034 numeric range. 7035 7036 flags_: Zero or more of the following flags, combined with bitwise- 7037 or: Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix. 7038 7039 Xapian::RP_REPEATED - optionally allow str_ on both ends of the range 7040 - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on 7041 the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the 7042 end (e.g. 2..12kg). 7043 7044 The string supplied in str_ is used by operator() to decide whether 7045 the pair of strings supplied to it constitute a valid range. If 7046 prefix_ is true, the first value in a range must begin with str_ (and 7047 the second value may optionally begin with str_); if prefix_ is false, 7048 the second value in a range must end with str_ (and the first value 7049 may optionally end with str_). 7050 7051 If str_ is empty, the setting of prefix_ is irrelevant, and no special 7052 strings are required at the start or end of the strings defining the 7053 range. 7054 7055 The remainder of both strings defining the endpoints must be valid 7056 floating point numbers. (FIXME: define format recognised). 7057 7058 For example, if str_ is \"$\" and prefix_ is true, and the range 7059 processor has been added to the queryparser, the queryparser will 7060 accept \"$10..50\" or \"$10..$50\", but not \"10..50\" or \"10..$50\" 7061 as valid ranges. If str_ is \"kg\" and prefix_ is false, the 7062 queryparser will accept \"10..50kg\" or \"10kg..50kg\", but not 7063 \"10..50\" or \"10kg..50\" as valid ranges. "; 7064 7065 7066 // File: classXapian_1_1NumberValueRangeProcessor.xml 7067 %feature("docstring") Xapian::NumberValueRangeProcessor " 7068 7069 Handle a number range. 7070 7071 This class must be used on values which have been encoded using 7072 Xapian::sortable_serialise() which turns numbers into strings which 7073 will sort in the same order as the numbers (the same values can be 7074 used to implement a numeric sort). 7075 7076 Deprecated Use Xapian::NumberRangeProcessor instead (added in 1.3.6). 7077 "; 7078 7079 %feature("docstring") 7080 Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor " 7081 7082 Constructor. 7083 7084 Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno 7085 slot_) 7086 7087 Parameters: 7088 ----------- 7089 7090 slot_: The value number to return from operator(). "; 7091 7092 %feature("docstring") 7093 Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor " 7094 7095 Constructor. 7096 7097 Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno 7098 slot_, const std::string &str_, bool prefix_=true) 7099 7100 Parameters: 7101 ----------- 7102 7103 slot_: The value number to return from operator(). 7104 7105 str_: A string to look for to recognise values as belonging to this 7106 numeric range. 7107 7108 prefix_: Whether to look for the string at the start or end of the 7109 values. If true, the string is a prefix; if false, the string is a 7110 suffix (default: true). 7111 7112 The string supplied in str_ is used by operator() to decide whether 7113 the pair of strings supplied to it constitute a valid range. If 7114 prefix_ is true, the first value in a range must begin with str_ (and 7115 the second value may optionally begin with str_); if prefix_ is false, 7116 the second value in a range must end with str_ (and the first value 7117 may optionally end with str_). 7118 7119 If str_ is empty, the setting of prefix_ is irrelevant, and no special 7120 strings are required at the start or end of the strings defining the 7121 range. 7122 7123 The remainder of both strings defining the endpoints must be valid 7124 floating point numbers. (FIXME: define format recognised). 7125 7126 For example, if str_ is \"$\" and prefix_ is true, and the range 7127 processor has been added to the queryparser, the queryparser will 7128 accept \"$10..50\" or \"$10..$50\", but not \"10..50\" or \"10..$50\" 7129 as valid ranges. If str_ is \"kg\" and prefix_ is false, the 7130 queryparser will accept \"10..50kg\" or \"10kg..50kg\", but not 7131 \"10..50\" or \"10kg..50\" as valid ranges. "; 7132 7133 7134 // File: classXapian_1_1PL2PlusWeight.xml 7135 %feature("docstring") Xapian::PL2PlusWeight " 7136 7137 Xapian::Weight subclass implementing the PL2+ probabilistic formula. 7138 "; 7139 7140 %feature("docstring") Xapian::PL2PlusWeight::PL2PlusWeight " 7141 7142 Construct a PL2PlusWeight. 7143 7144 Xapian::PL2PlusWeight::PL2PlusWeight(double c, double delta) 7145 7146 Parameters: 7147 ----------- 7148 7149 c: A strictly positive parameter controlling the extent of the 7150 normalization of the wdf to the document length. The default value of 7151 1 is suitable for longer queries but it may need to be changed for 7152 shorter queries. For more information, please refer to Gianni Amati's 7153 PHD thesis titled Probabilistic Models for Information Retrieval based 7154 on Divergence from Randomness. 7155 7156 delta: A parameter for pseudo tf value to control the scale of the tf 7157 lower bound. Delta(δ) should be a positive real number. It can be 7158 tuned for example from 0.1 to 1.5 in increments of 0.1 or so. 7159 Experiments have shown that PL2+ works effectively across collections 7160 with a fixed δ = 0.8 (default 0.8) "; 7161 7162 %feature("docstring") Xapian::PL2PlusWeight::PL2PlusWeight "Xapian::PL2PlusWeight::PL2PlusWeight() "; 7163 7164 %feature("docstring") Xapian::PL2PlusWeight::name " 7165 7166 Return the name of this weighting scheme. 7167 7168 std::string Xapian::PL2PlusWeight::name() const 7169 7170 This name is used by the remote backend. It is passed along with the 7171 serialised parameters to the remote server so that it knows which 7172 class to create. 7173 7174 Return the full namespace-qualified name of your class here - if your 7175 class is called FooWeight, return \"FooWeight\" from this method ( 7176 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 7177 7178 If you don't want to support the remote backend, you can use the 7179 default implementation which simply returns an empty string. "; 7180 7181 %feature("docstring") Xapian::PL2PlusWeight::serialise " 7182 7183 Return this object's parameters serialised as a single string. 7184 7185 std::string Xapian::PL2PlusWeight::serialise() const 7186 7187 If you don't want to support the remote backend, you can use the 7188 default implementation which simply throws Xapian::UnimplementedError. 7189 "; 7190 7191 %feature("docstring") Xapian::PL2PlusWeight::unserialise " 7192 7193 Unserialise parameters. 7194 7195 PL2PlusWeight* Xapian::PL2PlusWeight::unserialise(const std::string 7196 &serialised) const 7197 7198 This method unserialises parameters serialised by the serialise() 7199 method and allocates and returns a new object initialised with them. 7200 7201 If you don't want to support the remote backend, you can use the 7202 default implementation which simply throws Xapian::UnimplementedError. 7203 7204 Note that the returned object will be deallocated by Xapian after use 7205 with \"delete\". If you want to handle the deletion in a special way 7206 (for example when wrapping the Xapian API for use from another 7207 language) then you can define a static operator delete method in your 7208 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 7209 7210 Parameters: 7211 ----------- 7212 7213 serialised: A string containing the serialised parameters. "; 7214 7215 %feature("docstring") Xapian::PL2PlusWeight::get_sumpart " 7216 7217 Calculate the weight contribution for this object's term to a 7218 document. 7219 7220 double Xapian::PL2PlusWeight::get_sumpart(Xapian::termcount wdf, 7221 Xapian::termcount doclen, Xapian::termcount uniqterms) const 7222 7223 The parameters give information about the document which may be used 7224 in the calculations: 7225 7226 Parameters: 7227 ----------- 7228 7229 wdf: The within document frequency of the term in the document. 7230 7231 doclen: The document's length (unnormalised). 7232 7233 uniqterms: Number of unique terms in the document (used for absolute 7234 smoothing). "; 7235 7236 %feature("docstring") Xapian::PL2PlusWeight::get_maxpart " 7237 7238 Return an upper bound on what get_sumpart() can return for any 7239 document. 7240 7241 double Xapian::PL2PlusWeight::get_maxpart() const 7242 7243 This information is used by the matcher to perform various 7244 optimisations, so strive to make the bound as tight as possible. "; 7245 7246 %feature("docstring") Xapian::PL2PlusWeight::get_sumextra " 7247 7248 Calculate the term-independent weight component for a document. 7249 7250 double Xapian::PL2PlusWeight::get_sumextra(Xapian::termcount doclen, 7251 Xapian::termcount uniqterms) const 7252 7253 The parameter gives information about the document which may be used 7254 in the calculations: 7255 7256 Parameters: 7257 ----------- 7258 7259 doclen: The document's length (unnormalised). 7260 7261 uniqterms: The number of unique terms in the document. "; 7262 7263 %feature("docstring") Xapian::PL2PlusWeight::get_maxextra " 7264 7265 Return an upper bound on what get_sumextra() can return for any 7266 document. 7267 7268 double Xapian::PL2PlusWeight::get_maxextra() const 7269 7270 This information is used by the matcher to perform various 7271 optimisations, so strive to make the bound as tight as possible. "; 7272 7273 7274 // File: classXapian_1_1PL2Weight.xml 7275 %feature("docstring") Xapian::PL2Weight " 7276 7277 This class implements the PL2 weighting scheme. 7278 7279 PL2 is a representative scheme of the Divergence from Randomness 7280 Framework by Gianni Amati. 7281 7282 This weighting scheme is useful for tasks that require early 7283 precision. 7284 7285 It uses the Poisson approximation of the Binomial Probabilistic 7286 distribution (P) along with Stirling's approximation for the factorial 7287 value, the Laplace method to find the aftereffect of sampling (L) and 7288 the second wdf normalization proposed by Amati to normalize the wdf in 7289 the document to the length of the document (H2). 7290 7291 For more information about the DFR Framework and the PL2 scheme, 7292 please refer to : Gianni Amati and Cornelis Joost Van Rijsbergen 7293 Probabilistic models of information retrieval based on measuring the 7294 divergence from randomness ACM Transactions on Information Systems 7295 (TOIS) 20, (4), 2002, pp. 357-389. "; 7296 7297 %feature("docstring") Xapian::PL2Weight::PL2Weight " 7298 7299 Construct a PL2Weight. 7300 7301 Xapian::PL2Weight::PL2Weight(double c) 7302 7303 Parameters: 7304 ----------- 7305 7306 c: A strictly positive parameter controlling the extent of the 7307 normalization of the wdf to the document length. The default value of 7308 1 is suitable for longer queries but it may need to be changed for 7309 shorter queries. For more information, please refer to Gianni Amati's 7310 PHD thesis titled Probabilistic Models for Information Retrieval based 7311 on Divergence from Randomness. "; 7312 7313 %feature("docstring") Xapian::PL2Weight::PL2Weight "Xapian::PL2Weight::PL2Weight() "; 7314 7315 %feature("docstring") Xapian::PL2Weight::name " 7316 7317 Return the name of this weighting scheme. 7318 7319 std::string Xapian::PL2Weight::name() const 7320 7321 This name is used by the remote backend. It is passed along with the 7322 serialised parameters to the remote server so that it knows which 7323 class to create. 7324 7325 Return the full namespace-qualified name of your class here - if your 7326 class is called FooWeight, return \"FooWeight\" from this method ( 7327 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 7328 7329 If you don't want to support the remote backend, you can use the 7330 default implementation which simply returns an empty string. "; 7331 7332 %feature("docstring") Xapian::PL2Weight::serialise " 7333 7334 Return this object's parameters serialised as a single string. 7335 7336 std::string Xapian::PL2Weight::serialise() const 7337 7338 If you don't want to support the remote backend, you can use the 7339 default implementation which simply throws Xapian::UnimplementedError. 7340 "; 7341 7342 %feature("docstring") Xapian::PL2Weight::unserialise " 7343 7344 Unserialise parameters. 7345 7346 PL2Weight* Xapian::PL2Weight::unserialise(const std::string 7347 &serialised) const 7348 7349 This method unserialises parameters serialised by the serialise() 7350 method and allocates and returns a new object initialised with them. 7351 7352 If you don't want to support the remote backend, you can use the 7353 default implementation which simply throws Xapian::UnimplementedError. 7354 7355 Note that the returned object will be deallocated by Xapian after use 7356 with \"delete\". If you want to handle the deletion in a special way 7357 (for example when wrapping the Xapian API for use from another 7358 language) then you can define a static operator delete method in your 7359 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 7360 7361 Parameters: 7362 ----------- 7363 7364 serialised: A string containing the serialised parameters. "; 7365 7366 %feature("docstring") Xapian::PL2Weight::get_sumpart " 7367 7368 Calculate the weight contribution for this object's term to a 7369 document. 7370 7371 double Xapian::PL2Weight::get_sumpart(Xapian::termcount wdf, 7372 Xapian::termcount doclen, Xapian::termcount uniqterms) const 7373 7374 The parameters give information about the document which may be used 7375 in the calculations: 7376 7377 Parameters: 7378 ----------- 7379 7380 wdf: The within document frequency of the term in the document. 7381 7382 doclen: The document's length (unnormalised). 7383 7384 uniqterms: Number of unique terms in the document (used for absolute 7385 smoothing). "; 7386 7387 %feature("docstring") Xapian::PL2Weight::get_maxpart " 7388 7389 Return an upper bound on what get_sumpart() can return for any 7390 document. 7391 7392 double Xapian::PL2Weight::get_maxpart() const 7393 7394 This information is used by the matcher to perform various 7395 optimisations, so strive to make the bound as tight as possible. "; 7396 7397 %feature("docstring") Xapian::PL2Weight::get_sumextra " 7398 7399 Calculate the term-independent weight component for a document. 7400 7401 double Xapian::PL2Weight::get_sumextra(Xapian::termcount doclen, 7402 Xapian::termcount uniqterms) const 7403 7404 The parameter gives information about the document which may be used 7405 in the calculations: 7406 7407 Parameters: 7408 ----------- 7409 7410 doclen: The document's length (unnormalised). 7411 7412 uniqterms: The number of unique terms in the document. "; 7413 7414 %feature("docstring") Xapian::PL2Weight::get_maxextra " 7415 7416 Return an upper bound on what get_sumextra() can return for any 7417 document. 7418 7419 double Xapian::PL2Weight::get_maxextra() const 7420 7421 This information is used by the matcher to perform various 7422 optimisations, so strive to make the bound as tight as possible. "; 7423 7424 7425 // File: classXapian_1_1PositionIterator.xml 7426 %feature("docstring") Xapian::PositionIterator " 7427 7428 Class for iterating over term positions. "; 7429 7430 %feature("docstring") Xapian::PositionIterator::PositionIterator " 7431 7432 Copy constructor. 7433 7434 Xapian::PositionIterator::PositionIterator(const PositionIterator &o) 7435 "; 7436 7437 %feature("docstring") Xapian::PositionIterator::PositionIterator " 7438 7439 Default constructor. 7440 7441 Xapian::PositionIterator::PositionIterator() 7442 7443 Creates an uninitialised iterator, which can't be used before being 7444 assigned to, but is sometimes syntactically convenient. "; 7445 7446 %feature("docstring") Xapian::PositionIterator::~PositionIterator " 7447 7448 Destructor. 7449 7450 Xapian::PositionIterator::~PositionIterator() "; 7451 7452 %feature("docstring") Xapian::PositionIterator::skip_to " 7453 7454 Advance the iterator to term position termpos. 7455 7456 void Xapian::PositionIterator::skip_to(Xapian::termpos termpos) 7457 7458 Parameters: 7459 ----------- 7460 7461 termpos: The position to advance to. If this position isn't in the 7462 stream being iterated, then the iterator is moved to the next term 7463 position after it which is. "; 7464 7465 %feature("docstring") Xapian::PositionIterator::get_description " 7466 7467 Return a string describing this object. 7468 7469 std::string Xapian::PositionIterator::get_description() const "; 7470 7471 7472 // File: classXapian_1_1PostingIterator.xml 7473 %feature("docstring") Xapian::PostingIterator " 7474 7475 Class for iterating over a list of terms. "; 7476 7477 %feature("docstring") Xapian::PostingIterator::PostingIterator " 7478 7479 Copy constructor. 7480 7481 Xapian::PostingIterator::PostingIterator(const PostingIterator &o) "; 7482 7483 %feature("docstring") Xapian::PostingIterator::PostingIterator " 7484 7485 Default constructor. 7486 7487 Xapian::PostingIterator::PostingIterator() 7488 7489 Creates an uninitialised iterator, which can't be used before being 7490 assigned to, but is sometimes syntactically convenient. "; 7491 7492 %feature("docstring") Xapian::PostingIterator::~PostingIterator " 7493 7494 Destructor. 7495 7496 Xapian::PostingIterator::~PostingIterator() "; 7497 7498 %feature("docstring") Xapian::PostingIterator::get_wdf " 7499 7500 Return the wdf for the document at the current position. 7501 7502 Xapian::termcount Xapian::PostingIterator::get_wdf() const "; 7503 7504 %feature("docstring") Xapian::PostingIterator::get_doclength " 7505 7506 Return the length of the document at the current position. 7507 7508 Xapian::termcount Xapian::PostingIterator::get_doclength() const "; 7509 7510 %feature("docstring") Xapian::PostingIterator::get_unique_terms " 7511 7512 Return the number of unique terms in the current document. 7513 7514 Xapian::termcount Xapian::PostingIterator::get_unique_terms() const "; 7515 7516 %feature("docstring") Xapian::PostingIterator::positionlist_begin " 7517 7518 Return a PositionIterator for the current document. 7519 7520 PositionIterator Xapian::PostingIterator::positionlist_begin() const 7521 "; 7522 7523 %feature("docstring") Xapian::PostingIterator::positionlist_end " 7524 7525 Return an end PositionIterator for the current document. 7526 7527 PositionIterator Xapian::PostingIterator::positionlist_end() const "; 7528 7529 %feature("docstring") Xapian::PostingIterator::skip_to " 7530 7531 Advance the iterator to document did. 7532 7533 void Xapian::PostingIterator::skip_to(Xapian::docid did) 7534 7535 Parameters: 7536 ----------- 7537 7538 did: The document id to advance to. If this document id isn't in the 7539 stream being iterated, then the iterator is moved to the next document 7540 id after it which is. "; 7541 7542 %feature("docstring") Xapian::PostingIterator::get_description " 7543 7544 Return a string describing this object. 7545 7546 std::string Xapian::PostingIterator::get_description() const "; 7547 7548 7549 // File: classXapian_1_1PostingSource.xml 7550 %feature("docstring") Xapian::PostingSource " 7551 7552 Base class which provides an \"external\" source of postings. "; 7553 7554 %feature("docstring") Xapian::PostingSource::PostingSource " 7555 7556 Allow subclasses to be instantiated. 7557 7558 Xapian::PostingSource::PostingSource() "; 7559 7560 %feature("docstring") Xapian::PostingSource::~PostingSource "virtual 7561 Xapian::PostingSource::~PostingSource() "; 7562 7563 %feature("docstring") Xapian::PostingSource::get_termfreq_min " 7564 7565 A lower bound on the number of documents this object can return. 7566 7567 virtual Xapian::doccount Xapian::PostingSource::get_termfreq_min() 7568 const =0 7569 7570 Xapian will always call init() on a PostingSource before calling this 7571 for the first time. "; 7572 7573 %feature("docstring") Xapian::PostingSource::get_termfreq_est " 7574 7575 An estimate of the number of documents this object can return. 7576 7577 virtual Xapian::doccount Xapian::PostingSource::get_termfreq_est() 7578 const =0 7579 7580 It must always be true that: 7581 7582 get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max() 7583 7584 Xapian will always call init() on a PostingSource before calling this 7585 for the first time. "; 7586 7587 %feature("docstring") Xapian::PostingSource::get_termfreq_max " 7588 7589 An upper bound on the number of documents this object can return. 7590 7591 virtual Xapian::doccount Xapian::PostingSource::get_termfreq_max() 7592 const =0 7593 7594 Xapian will always call init() on a PostingSource before calling this 7595 for the first time. "; 7596 7597 %feature("docstring") Xapian::PostingSource::set_maxweight " 7598 7599 Specify an upper bound on what get_weight() will return from now on. 7600 7601 void Xapian::PostingSource::set_maxweight(double max_weight) 7602 7603 This upper bound is used by the matcher to perform various 7604 optimisations, so if you can return a good bound, then matches will 7605 generally run faster. 7606 7607 This method should be called after calling init(), and may be called 7608 during iteration if the upper bound drops. It is probably only useful 7609 to call from subclasses (it was actually a \"protected\" method prior 7610 to Xapian 1.3.4, but that makes it tricky to wrap for other 7611 languages). 7612 7613 It is valid for the posting source to have returned a higher value 7614 from get_weight() earlier in the iteration, but the posting source 7615 must not return a higher value from get_weight() than the currently 7616 set upper bound, and the upper bound must not be increased (until 7617 init() has been called). 7618 7619 If you don't call this method, the upper bound will default to 0, for 7620 convenience when implementing \"weight-less\" PostingSource 7621 subclasses. 7622 7623 Parameters: 7624 ----------- 7625 7626 max_weight: The upper bound to set. "; 7627 7628 %feature("docstring") Xapian::PostingSource::get_maxweight " 7629 7630 Return the currently set upper bound on what get_weight() can return. 7631 7632 double Xapian::PostingSource::get_maxweight() const "; 7633 7634 %feature("docstring") Xapian::PostingSource::get_weight " 7635 7636 Return the weight contribution for the current document. 7637 7638 virtual double Xapian::PostingSource::get_weight() const 7639 7640 This default implementation always returns 0, for convenience when 7641 implementing \"weight-less\" PostingSource subclasses. 7642 7643 This method may assume that it will only be called when there is a 7644 \"current document\". In detail: Xapian will always call init() on a 7645 PostingSource before calling this for the first time. It will also 7646 only call this if the PostingSource reports that it is pointing to a 7647 valid document (ie, it will not call it before calling at least one of 7648 next(), skip_to() or check(), and will ensure that the PostingSource 7649 is not at the end by calling at_end()). "; 7650 7651 %feature("docstring") Xapian::PostingSource::get_docid " 7652 7653 Return the current docid. 7654 7655 virtual Xapian::docid Xapian::PostingSource::get_docid() const =0 7656 7657 This method may assume that it will only be called when there is a 7658 \"current document\". See get_weight() for details. 7659 7660 Note: in the case of a multi-database search, the returned docid 7661 should be in the single subdatabase relevant to this posting source. 7662 See the init() method for details. "; 7663 7664 %feature("docstring") Xapian::PostingSource::next " 7665 7666 Advance the current position to the next matching document. 7667 7668 virtual void Xapian::PostingSource::next(double min_wt)=0 7669 7670 The PostingSource starts before the first entry in the list, so 7671 next(), skip_to() or check() must be called before any methods which 7672 need the context of the current position. 7673 7674 Xapian will always call init() on a PostingSource before calling this 7675 for the first time. 7676 7677 Parameters: 7678 ----------- 7679 7680 min_wt: The minimum weight contribution that is needed (this is just 7681 a hint which subclasses may ignore). "; 7682 7683 %feature("docstring") Xapian::PostingSource::skip_to " 7684 7685 Advance to the specified docid. 7686 7687 virtual void Xapian::PostingSource::skip_to(Xapian::docid did, double 7688 min_wt) 7689 7690 If the specified docid isn't in the list, position ourselves on the 7691 first document after it (or at_end() if no greater docids are 7692 present). 7693 7694 If the current position is already the specified docid, this method 7695 will leave the position unmodified. 7696 7697 If the specified docid is earlier than the current position, the 7698 behaviour is unspecified. A sensible behaviour would be to leave the 7699 current position unmodified, but it is also reasonable to move to the 7700 specified docid. 7701 7702 The default implementation calls next() repeatedly, which works but 7703 skip_to() can often be implemented much more efficiently. 7704 7705 Xapian will always call init() on a PostingSource before calling this 7706 for the first time. 7707 7708 Note: in the case of a multi-database search, the docid specified is 7709 the docid in the single subdatabase relevant to this posting source. 7710 See the init() method for details. 7711 7712 Parameters: 7713 ----------- 7714 7715 did: The document id to advance to. 7716 7717 min_wt: The minimum weight contribution that is needed (this is just 7718 a hint which subclasses may ignore). "; 7719 7720 %feature("docstring") Xapian::PostingSource::check " 7721 7722 Check if the specified docid occurs. 7723 7724 virtual bool Xapian::PostingSource::check(Xapian::docid did, double 7725 min_wt) 7726 7727 The caller is required to ensure that the specified document id did 7728 actually exists in the database. If it does, it must move to that 7729 document id, and return true. If it does not, it may either: 7730 7731 return true, having moved to a definite position (including 7732 \"at_end\"), which must be the same position as skip_to() would have 7733 moved to. 7734 7735 or 7736 7737 return false, having moved to an \"indeterminate\" position, such that 7738 a subsequent call to next() or skip_to() will move to the next 7739 matching position after did. 7740 7741 Generally, this method should act like skip_to() and return true if 7742 that can be done at little extra cost. 7743 7744 Otherwise it should simply check if a particular docid is present, 7745 returning true if it is, and false if it isn't. 7746 7747 The default implementation calls skip_to() and always returns true. 7748 7749 Xapian will always call init() on a PostingSource before calling this 7750 for the first time. 7751 7752 Note: in the case of a multi-database search, the docid specified is 7753 the docid in the single subdatabase relevant to this posting source. 7754 See the init() method for details. 7755 7756 Parameters: 7757 ----------- 7758 7759 did: The document id to check. 7760 7761 min_wt: The minimum weight contribution that is needed (this is just 7762 a hint which subclasses may ignore). "; 7763 7764 %feature("docstring") Xapian::PostingSource::at_end " 7765 7766 Return true if the current position is past the last entry in this 7767 list. 7768 7769 virtual bool Xapian::PostingSource::at_end() const =0 7770 7771 At least one of next(), skip_to() or check() will be called before 7772 this method is first called. "; 7773 7774 %feature("docstring") Xapian::PostingSource::clone " 7775 7776 Clone the posting source. 7777 7778 virtual PostingSource* Xapian::PostingSource::clone() const 7779 7780 The clone should inherit the configuration of the parent, but need not 7781 inherit the state. ie, the clone does not need to be in the same 7782 iteration position as the original: the matcher will always call 7783 init() on the clone before attempting to move the iterator, or read 7784 the information about the current position of the iterator. 7785 7786 This may return NULL to indicate that cloning is not supported. In 7787 this case, the PostingSource may only be used with a single-database 7788 search. 7789 7790 The default implementation returns NULL. 7791 7792 Note that the returned object will be deallocated by Xapian after use 7793 with \"delete\". If you want to handle the deletion in a special way 7794 (for example when wrapping the Xapian API for use from another 7795 language) then you can define a static operator delete method in your 7796 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 7797 7798 %feature("docstring") Xapian::PostingSource::name " 7799 7800 Name of the posting source class. 7801 7802 virtual std::string Xapian::PostingSource::name() const 7803 7804 This is used when serialising and unserialising posting sources; for 7805 example, for performing remote searches. 7806 7807 If the subclass is in a C++ namespace, the namespace should be 7808 included in the name, using \"::\" as a separator. For example, for a 7809 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 7810 namespace the result of this call should be 7811 \"Xapian::FooPostingSource\". 7812 7813 This should only be implemented if serialise() and unserialise() are 7814 also implemented. The default implementation returns an empty string. 7815 7816 If this returns an empty string, Xapian will assume that serialise() 7817 and unserialise() are not implemented. "; 7818 7819 %feature("docstring") Xapian::PostingSource::serialise " 7820 7821 Serialise object parameters into a string. 7822 7823 virtual std::string Xapian::PostingSource::serialise() const 7824 7825 The serialised parameters should represent the configuration of the 7826 posting source, but need not (indeed, should not) represent the 7827 current iteration state. 7828 7829 If you don't want to support the remote backend, you can use the 7830 default implementation which simply throws Xapian::UnimplementedError. 7831 "; 7832 7833 %feature("docstring") Xapian::PostingSource::unserialise " 7834 7835 Create object given string serialisation returned by serialise(). 7836 7837 virtual PostingSource* Xapian::PostingSource::unserialise(const 7838 std::string &serialised) const 7839 7840 Note that the returned object will be deallocated by Xapian after use 7841 with \"delete\". If you want to handle the deletion in a special way 7842 (for example when wrapping the Xapian API for use from another 7843 language) then you can define a static operator delete method in your 7844 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 7845 7846 If you don't want to support the remote backend, you can use the 7847 default implementation which simply throws Xapian::UnimplementedError. 7848 7849 Parameters: 7850 ----------- 7851 7852 serialised: A serialised instance of this PostingSource subclass. "; 7853 7854 %feature("docstring") 7855 Xapian::PostingSource::unserialise_with_registry " 7856 7857 Create object given string serialisation returned by serialise(). 7858 7859 virtual PostingSource* 7860 Xapian::PostingSource::unserialise_with_registry(const std::string 7861 &serialised, const Registry ®istry) const 7862 7863 Note that the returned object will be deallocated by Xapian after use 7864 with \"delete\". If you want to handle the deletion in a special way 7865 (for example when wrapping the Xapian API for use from another 7866 language) then you can define a static operator delete method in your 7867 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 7868 7869 This method is supplied with a Registry object, which can be used when 7870 unserialising objects contained within the posting source. The default 7871 implementation simply calls unserialise() which doesn't take the 7872 Registry object, so you do not need to implement this method unless 7873 you want to take advantage of the Registry object when unserialising. 7874 7875 Parameters: 7876 ----------- 7877 7878 serialised: A serialised instance of this PostingSource subclass. 7879 7880 registry: The Xapian::Registry object to use. "; 7881 7882 %feature("docstring") Xapian::PostingSource::init " 7883 7884 Set this PostingSource to the start of the list of postings. 7885 7886 virtual void Xapian::PostingSource::init(const Database &db)=0 7887 7888 This is called automatically by the matcher prior to each query being 7889 processed. 7890 7891 If a PostingSource is used for multiple searches, init() will 7892 therefore be called multiple times, and must handle this by using the 7893 database passed in the most recent call. 7894 7895 Parameters: 7896 ----------- 7897 7898 db: The database which the PostingSource should iterate through. 7899 7900 Note: in the case of a multi-database search, a separate PostingSource 7901 will be used for each database (the separate PostingSources will be 7902 obtained using clone()), and each PostingSource will be passed one of 7903 the sub-databases as the db parameter here. The db parameter will 7904 therefore always refer to a single database. All docids passed to, or 7905 returned from, the PostingSource refer to docids in that single 7906 database, rather than in the multi- database. "; 7907 7908 %feature("docstring") Xapian::PostingSource::get_description " 7909 7910 Return a string describing this object. 7911 7912 virtual std::string Xapian::PostingSource::get_description() const 7913 7914 This default implementation returns a generic answer. This default it 7915 provided to avoid forcing those deriving their own PostingSource 7916 subclass from having to implement this (they may not care what 7917 get_description() gives for their subclass). "; 7918 7919 %feature("docstring") Xapian::PostingSource::release " 7920 7921 Start reference counting this object. 7922 7923 PostingSource* Xapian::PostingSource::release() 7924 7925 You can hand ownership of a dynamically allocated PostingSource object 7926 to Xapian by calling release() and then passing the object to a Xapian 7927 method. Xapian will arrange to delete the object once it is no longer 7928 required. "; 7929 7930 %feature("docstring") Xapian::PostingSource::release " 7931 7932 Start reference counting this object. 7933 7934 const PostingSource* Xapian::PostingSource::release() const 7935 7936 You can hand ownership of a dynamically allocated PostingSource object 7937 to Xapian by calling release() and then passing the object to a Xapian 7938 method. Xapian will arrange to delete the object once it is no longer 7939 required. "; 7940 7941 7942 // File: classXapian_1_1Query.xml 7943 %feature("docstring") Xapian::Query " 7944 7945 Class representing a query. "; 7946 7947 %feature("docstring") Xapian::Query::Query " 7948 7949 Construct a query matching no documents. 7950 7951 Xapian::Query::Query() 7952 7953 MatchNothing is a static instance of this. 7954 7955 When combined with other Query objects using the various supported 7956 operators, Query() works like false in boolean logic, so Query() & q 7957 is Query(), while Query() | q is q. "; 7958 7959 %feature("docstring") Xapian::Query::~Query " 7960 7961 Destructor. 7962 7963 Xapian::Query::~Query() "; 7964 7965 %feature("docstring") Xapian::Query::Query " 7966 7967 Copying is allowed. 7968 7969 Xapian::Query::Query(const Query &o) 7970 7971 The internals are reference counted, so copying is cheap. "; 7972 7973 %feature("docstring") Xapian::Query::Query " 7974 7975 Construct a Query object for a term. 7976 7977 Xapian::Query::Query(const std::string &term, Xapian::termcount wqf=1, 7978 Xapian::termpos pos=0) 7979 7980 Parameters: 7981 ----------- 7982 7983 term: The term. An empty string constructs a query matching all 7984 documents ( MatchAll is a static instance of this). 7985 7986 wqf: The within-query frequency. (default: 1) 7987 7988 pos: The query position. Currently this is mainly used to determine 7989 the order of terms obtained via get_terms_begin(). (default: 0) "; 7990 7991 %feature("docstring") Xapian::Query::Query " 7992 7993 Construct a Query object for a PostingSource. 7994 7995 Xapian::Query::Query(Xapian::PostingSource *source) "; 7996 7997 %feature("docstring") Xapian::Query::Query " 7998 7999 Scale using OP_SCALE_WEIGHT. 8000 8001 Xapian::Query::Query(double factor, const Xapian::Query &subquery) 8002 8003 Parameters: 8004 ----------- 8005 8006 factor: Non-negative real number to multiply weights by. 8007 8008 subquery: Query object to scale weights from. "; 8009 8010 %feature("docstring") Xapian::Query::Query " 8011 8012 Scale using OP_SCALE_WEIGHT. 8013 8014 Xapian::Query::Query(op op_, const Xapian::Query &subquery, double 8015 factor) 8016 8017 In this form, the op_ parameter is totally redundant - use 8018 Query(factor, subquery) in preference. 8019 8020 Parameters: 8021 ----------- 8022 8023 op_: Must be OP_SCALE_WEIGHT. 8024 8025 factor: Non-negative real number to multiply weights by. 8026 8027 subquery: Query object to scale weights from. "; 8028 8029 %feature("docstring") Xapian::Query::Query " 8030 8031 Construct a Query object by combining two others. 8032 8033 Xapian::Query::Query(op op_, const Xapian::Query &a, const 8034 Xapian::Query &b) 8035 8036 Parameters: 8037 ----------- 8038 8039 op_: The operator to combine the queries with. 8040 8041 a: First subquery. 8042 8043 b: Second subquery. "; 8044 8045 %feature("docstring") Xapian::Query::Query " 8046 8047 Construct a Query object by combining two terms. 8048 8049 Xapian::Query::Query(op op_, const std::string &a, const std::string 8050 &b) 8051 8052 Parameters: 8053 ----------- 8054 8055 op_: The operator to combine the terms with. 8056 8057 a: First term. 8058 8059 b: Second term. "; 8060 8061 %feature("docstring") Xapian::Query::Query " 8062 8063 Construct a Query object for a single-ended value range. 8064 8065 Xapian::Query::Query(op op_, Xapian::valueno slot, const std::string 8066 &range_limit) 8067 8068 Parameters: 8069 ----------- 8070 8071 op_: Must be OP_VALUE_LE or OP_VALUE_GE currently. 8072 8073 slot: The value slot to work over. 8074 8075 range_limit: The limit of the range. "; 8076 8077 %feature("docstring") Xapian::Query::Query " 8078 8079 Construct a Query object for a value range. 8080 8081 Xapian::Query::Query(op op_, Xapian::valueno slot, const std::string 8082 &range_lower, const std::string &range_upper) 8083 8084 Parameters: 8085 ----------- 8086 8087 op_: Must be OP_VALUE_RANGE currently. 8088 8089 slot: The value slot to work over. 8090 8091 range_lower: Lower end of the range. 8092 8093 range_upper: Upper end of the range. "; 8094 8095 %feature("docstring") Xapian::Query::Query " 8096 8097 Query constructor for OP_WILDCARD queries. 8098 8099 Xapian::Query::Query(op op_, const std::string &pattern, 8100 Xapian::termcount max_expansion=0, int max_type=WILDCARD_LIMIT_ERROR, 8101 op combiner=OP_SYNONYM) 8102 8103 Parameters: 8104 ----------- 8105 8106 op_: Must be OP_WILDCARD 8107 8108 pattern: The wildcard pattern - currently this is just a string and 8109 the wildcard expands to terms which start with exactly this string. 8110 8111 max_expansion: The maximum number of terms to expand to (default: 0, 8112 which means no limit) 8113 8114 max_type: How to enforce max_expansion - one of WILDCARD_LIMIT_ERROR 8115 (the default), WILDCARD_LIMIT_FIRST or WILDCARD_LIMIT_MOST_FREQUENT. 8116 When searching multiple databases, the expansion limit is currently 8117 applied independently for each database, so the total number of terms 8118 may be higher than the limit. This is arguably a bug, and may change 8119 in future versions. 8120 8121 combiner: The Query::op to combine the terms with - one of 8122 OP_SYNONYM (the default), OP_OR or OP_MAX. "; 8123 8124 %feature("docstring") Xapian::Query::Query " 8125 8126 Construct a Query object from a begin/end iterator pair. 8127 8128 Xapian::Query::Query(op op_, I begin, I end, Xapian::termcount 8129 window=0) 8130 8131 Dereferencing the iterator should return a Xapian::Query, a non-NULL 8132 Xapian::Query*, a std::string or a type which converts to one of these 8133 (e.g. const char*). 8134 8135 If begin == end then there are no subqueries and the resulting Query 8136 won't match anything. 8137 8138 Parameters: 8139 ----------- 8140 8141 op_: The operator to combine the queries with. 8142 8143 begin: Begin iterator. 8144 8145 end: End iterator. 8146 8147 window: Window size for OP_NEAR and OP_PHRASE, or 0 to use the number 8148 of subqueries as the window size (default: 0). "; 8149 8150 %feature("docstring") Xapian::Query::get_terms_begin " 8151 8152 Begin iterator for terms in the query object. 8153 8154 const TermIterator Xapian::Query::get_terms_begin() const 8155 8156 The iterator returns terms in ascending query position order, and will 8157 return the same term in each unique position it occurs in. If you want 8158 the terms in sorted order and without duplicates, see 8159 get_unique_terms_begin(). "; 8160 8161 %feature("docstring") Xapian::Query::get_terms_end " 8162 8163 End iterator for terms in the query object. 8164 8165 const TermIterator Xapian::Query::get_terms_end() const "; 8166 8167 %feature("docstring") Xapian::Query::get_unique_terms_begin " 8168 8169 Begin iterator for unique terms in the query object. 8170 8171 const TermIterator Xapian::Query::get_unique_terms_begin() const 8172 8173 Terms are sorted and terms with the same name removed from the list. 8174 8175 If you want the terms in ascending query position order, see 8176 get_terms_begin(). "; 8177 8178 %feature("docstring") Xapian::Query::get_unique_terms_end " 8179 8180 End iterator for unique terms in the query object. 8181 8182 const TermIterator Xapian::Query::get_unique_terms_end() const "; 8183 8184 %feature("docstring") Xapian::Query::get_length " 8185 8186 Return the length of this query object. 8187 8188 Xapian::termcount Xapian::Query::get_length() const "; 8189 8190 %feature("docstring") Xapian::Query::empty " 8191 8192 Check if this query is Xapian::Query::MatchNothing. 8193 8194 bool Xapian::Query::empty() const "; 8195 8196 %feature("docstring") Xapian::Query::serialise " 8197 8198 Serialise this object into a string. 8199 8200 std::string Xapian::Query::serialise() const "; 8201 8202 %feature("docstring") Xapian::Query::get_type " 8203 8204 Get the type of the top level of the query. 8205 8206 op Xapian::Query::get_type() const "; 8207 8208 %feature("docstring") Xapian::Query::get_num_subqueries " 8209 8210 Get the number of subqueries of the top level query. 8211 8212 size_t Xapian::Query::get_num_subqueries() const "; 8213 8214 %feature("docstring") Xapian::Query::get_subquery " 8215 8216 Read a top level subquery. 8217 8218 const Query Xapian::Query::get_subquery(size_t n) const 8219 8220 Parameters: 8221 ----------- 8222 8223 n: Return the n-th subquery (starting from 0) - only valid when 0 <= 8224 n < get_num_subqueries(). "; 8225 8226 %feature("docstring") Xapian::Query::get_description " 8227 8228 Return a string describing this object. 8229 8230 std::string Xapian::Query::get_description() const "; 8231 8232 %feature("docstring") Xapian::Query::Query " 8233 8234 Construct with just an operator. 8235 8236 Xapian::Query::Query(Query::op op_) 8237 8238 Parameters: 8239 ----------- 8240 8241 op_: The operator to use - currently only OP_INVALID is useful. "; 8242 8243 8244 // File: classXapian_1_1QueryParser.xml 8245 %feature("docstring") Xapian::QueryParser " 8246 8247 Build a Xapian::Query object from a user query string. "; 8248 8249 %feature("docstring") Xapian::QueryParser::QueryParser " 8250 8251 Copy constructor. 8252 8253 Xapian::QueryParser::QueryParser(const QueryParser &o) "; 8254 8255 %feature("docstring") Xapian::QueryParser::QueryParser " 8256 8257 Default constructor. 8258 8259 Xapian::QueryParser::QueryParser() "; 8260 8261 %feature("docstring") Xapian::QueryParser::~QueryParser " 8262 8263 Destructor. 8264 8265 Xapian::QueryParser::~QueryParser() "; 8266 8267 %feature("docstring") Xapian::QueryParser::set_stemmer " 8268 8269 Set the stemmer. 8270 8271 void Xapian::QueryParser::set_stemmer(const Xapian::Stem &stemmer) 8272 8273 This sets the stemming algorithm which will be used by the query 8274 parser. The stemming algorithm will be used according to the stemming 8275 strategy set by set_stemming_strategy(). As of 1.3.1, this defaults to 8276 STEM_SOME, but in earlier versions the default was STEM_NONE. If you 8277 want to work with older versions, you should explicitly set a stemming 8278 strategy as well as setting a stemmer, otherwise your stemmer won't 8279 actually be used. 8280 8281 Parameters: 8282 ----------- 8283 8284 stemmer: The Xapian::Stem object to set. "; 8285 8286 %feature("docstring") Xapian::QueryParser::set_stemming_strategy " 8287 8288 Set the stemming strategy. 8289 8290 void Xapian::QueryParser::set_stemming_strategy(stem_strategy 8291 strategy) 8292 8293 This controls how the query parser will apply the stemming algorithm. 8294 Note that the stemming algorithm is only applied to words in free-text 8295 fields - boolean filter terms are never stemmed. 8296 8297 Parameters: 8298 ----------- 8299 8300 strategy: The strategy to use - possible values are: STEM_NONE: Don't 8301 perform any stemming. (default in Xapian <= 1.3.0) 8302 8303 STEM_SOME: Stem all terms except for those which start with a capital 8304 letter, or are followed by certain characters (currently: (/@<>=*[{\" 8305 ), or are used with operators which need positional information. 8306 Stemmed terms are prefixed with 'Z'. (default in Xapian >= 1.3.1) 8307 8308 STEM_SOME_FULL_POS: Like STEM_SOME but also stems terms used with 8309 operators which need positional information. Added in Xapian 1.4.8. 8310 8311 STEM_ALL: Stem all terms (note: no 'Z' prefix is added). 8312 8313 STEM_ALL_Z: Stem all terms (note: 'Z' prefix is added). (new in Xapian 8314 1.2.11 and 1.3.1) "; 8315 8316 %feature("docstring") Xapian::QueryParser::set_stopper " 8317 8318 Set the stopper. 8319 8320 void Xapian::QueryParser::set_stopper(const Stopper *stop=NULL) 8321 8322 Parameters: 8323 ----------- 8324 8325 stop: The Stopper object to set (default NULL, which means no 8326 stopwords). "; 8327 8328 %feature("docstring") Xapian::QueryParser::set_default_op " 8329 8330 Set the default operator. 8331 8332 void Xapian::QueryParser::set_default_op(Query::op default_op) 8333 8334 Parameters: 8335 ----------- 8336 8337 default_op: The operator to use to combine non-filter query items 8338 when no explicit operator is used. 8339 8340 So for example, 'weather forecast' is parsed as if it were 'weather OR 8341 forecast' by default. 8342 8343 The most useful values for this are OP_OR (the default) and OP_AND. 8344 OP_NEAR, OP_PHRASE, OP_ELITE_SET, OP_SYNONYM and OP_MAX are also 8345 permitted. Passing other values will result in InvalidArgumentError 8346 being thrown. "; 8347 8348 %feature("docstring") Xapian::QueryParser::get_default_op " 8349 8350 Get the current default operator. 8351 8352 Query::op Xapian::QueryParser::get_default_op() const "; 8353 8354 %feature("docstring") Xapian::QueryParser::set_database " 8355 8356 Specify the database being searched. 8357 8358 void Xapian::QueryParser::set_database(const Database &db) 8359 8360 Parameters: 8361 ----------- 8362 8363 db: The database to use for spelling correction 8364 (FLAG_SPELLING_CORRECTION), and synonyms (FLAG_SYNONYM, 8365 FLAG_AUTO_SYNONYMS, and FLAG_AUTO_MULTIWORD_SYNONYMS). "; 8366 8367 %feature("docstring") Xapian::QueryParser::set_max_expansion " 8368 8369 Specify the maximum expansion of a wildcard and/or partial term. 8370 8371 void Xapian::QueryParser::set_max_expansion(Xapian::termcount 8372 max_expansion, int max_type=Xapian::Query::WILDCARD_LIMIT_ERROR, 8373 unsigned flags=FLAG_WILDCARD|FLAG_PARTIAL) 8374 8375 Note: you must also set FLAG_WILDCARD and/or FLAG_PARTIAL in the flags 8376 parameter to parse_query() for this setting to have anything to 8377 affect. 8378 8379 If you don't call this method, the default settings are no limit on 8380 wildcard expansion, and partial terms expanding to the most frequent 8381 100 terms - i.e. as if you'd called: 8382 8383 set_max_expansion(0); set_max_expansion(100, 8384 Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT, 8385 Xapian::QueryParser::FLAG_PARTIAL); 8386 8387 Parameters: 8388 ----------- 8389 8390 max_expansion: The maximum number of terms each wildcard in the query 8391 can expand to, or 0 for no limit (which is the default). 8392 8393 max_type: Xapian::Query::WILDCARD_LIMIT_ERROR, 8394 Xapian::Query::WILDCARD_LIMIT_FIRST or 8395 Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT (default: 8396 Xapian::Query::WILDCARD_LIMIT_ERROR). 8397 8398 flags: What to set the limit for (default: 8399 FLAG_WILDCARD|FLAG_PARTIAL, setting the limit for both wildcards and 8400 partial terms). 8401 8402 1.3.3 "; 8403 8404 %feature("docstring") Xapian::QueryParser::set_max_wildcard_expansion 8405 " 8406 8407 Specify the maximum expansion of a wildcard. 8408 8409 void 8410 Xapian::QueryParser::set_max_wildcard_expansion(Xapian::termcount) 8411 8412 If any wildcard expands to more than max_expansion terms, an exception 8413 will be thrown. 8414 8415 This method is provided for API compatibility with Xapian 1.2.x and is 8416 deprecated - replace it with: 8417 8418 set_max_wildcard_expansion(max_expansion, 8419 Xapian::Query::WILDCARD_LIMIT_ERROR, 8420 Xapian::QueryParser::FLAG_WILDCARD); "; 8421 8422 %feature("docstring") Xapian::QueryParser::parse_query " 8423 8424 Parse a query. 8425 8426 Query Xapian::QueryParser::parse_query(const std::string 8427 &query_string, unsigned flags=FLAG_DEFAULT, const std::string 8428 &default_prefix=std::string()) 8429 8430 Parameters: 8431 ----------- 8432 8433 query_string: A free-text query as entered by a user 8434 8435 flags: Zero or more QueryParser::feature_flag specifying what 8436 features the QueryParser should support. Combine multiple values with 8437 bitwise-or (|) (default FLAG_DEFAULT). 8438 8439 default_prefix: The default term prefix to use (default none). For 8440 example, you can pass \"A\" when parsing an \"Author\" field. 8441 8442 Parameters: 8443 ----------- 8444 8445 If: the query string can't be parsed, then Xapian::QueryParserError 8446 is thrown. You can get an English error message to report to the user 8447 by catching it and calling get_msg() on the caught exception. The 8448 current possible values (in case you want to translate them) are: 8449 8450 Unknown range operation 8451 8452 parse error 8453 8454 Syntax: <expression> AND <expression> 8455 8456 Syntax: <expression> AND NOT <expression> 8457 8458 Syntax: <expression> NOT <expression> 8459 8460 Syntax: <expression> OR <expression> 8461 8462 Syntax: <expression> XOR <expression> "; 8463 8464 %feature("docstring") Xapian::QueryParser::add_prefix " 8465 8466 Add a free-text field term prefix. 8467 8468 void Xapian::QueryParser::add_prefix(const std::string &field, const 8469 std::string &prefix) 8470 8471 For example: 8472 8473 This allows the user to search for author:Orwell which will be 8474 converted to a search for the term \"Aorwell\". 8475 8476 Multiple fields can be mapped to the same prefix. For example, you can 8477 make title: and subject: aliases for each other. 8478 8479 As of 1.0.4, you can call this method multiple times with the same 8480 value of field to allow a single field to be mapped to multiple 8481 prefixes. Multiple terms being generated for such a field, and 8482 combined with Xapian::Query::OP_OR. 8483 8484 If any prefixes are specified for the empty field name (i.e. you call 8485 this method with an empty string as the first parameter) these 8486 prefixes will be used for terms without a field specifier. If you do 8487 this and also specify the default_prefix parameter to parse_query(), 8488 then the default_prefix parameter will override. 8489 8490 If the prefix parameter is empty, then \"field:word\" will produce the 8491 term \"word\" (and this can be one of several prefixes for a 8492 particular field, or for terms without a field specifier). 8493 8494 If you call add_prefix() and add_boolean_prefix() for the same value 8495 of field, a Xapian::InvalidOperationError exception will be thrown. 8496 8497 In 1.0.3 and earlier, subsequent calls to this method with the same 8498 value of field had no effect. 8499 8500 Parameters: 8501 ----------- 8502 8503 field: The user visible field name 8504 8505 prefix: The term prefix to map this to "; 8506 8507 %feature("docstring") Xapian::QueryParser::add_prefix " 8508 8509 Register a FieldProcessor. 8510 8511 void Xapian::QueryParser::add_prefix(const std::string &field, 8512 Xapian::FieldProcessor *proc) "; 8513 8514 %feature("docstring") Xapian::QueryParser::add_boolean_prefix " 8515 8516 Add a boolean term prefix allowing the user to restrict a search with 8517 a boolean filter specified in the free text query. 8518 8519 void Xapian::QueryParser::add_boolean_prefix(const std::string &field, 8520 const std::string &prefix, const std::string *grouping=NULL) 8521 8522 For example: 8523 8524 This allows the user to restrict a search with site:xapian.org which 8525 will be converted to Hxapian.org combined with any weighted query with 8526 Xapian::Query::OP_FILTER. 8527 8528 If multiple boolean filters are specified in a query for the same 8529 prefix, they will be combined with the Xapian::Query::OP_OR operator. 8530 Then, if there are boolean filters for different prefixes, they will 8531 be combined with the Xapian::Query::OP_AND operator. 8532 8533 Multiple fields can be mapped to the same prefix (so for example you 8534 can make site: and domain: aliases for each other). Instances of 8535 fields with different aliases but the same prefix will still be 8536 combined with the OR operator. 8537 8538 For example, if \"site\" and \"domain\" map to \"H\", but author maps 8539 to \"A\", a search for \"site:foo domain:bar author:Fred\" will map to 8540 \"(Hfoo OR Hbar) AND Afred\". 8541 8542 As of 1.0.4, you can call this method multiple times with the same 8543 value of field to allow a single field to be mapped to multiple 8544 prefixes. Multiple terms being generated for such a field, and 8545 combined with Xapian::Query::OP_OR. 8546 8547 Calling this method with an empty string for field will cause a 8548 Xapian::InvalidArgumentError. 8549 8550 If you call add_prefix() and add_boolean_prefix() for the same value 8551 of field, a Xapian::InvalidOperationError exception will be thrown. 8552 8553 In 1.0.3 and earlier, subsequent calls to this method with the same 8554 value of field had no effect. 8555 8556 Parameters: 8557 ----------- 8558 8559 field: The user visible field name 8560 8561 prefix: The term prefix to map this to 8562 8563 grouping: Controls how multiple filters are combined - filters with 8564 the same grouping value are combined with OP_OR, then the resulting 8565 queries are combined with OP_AND. If NULL, then field is used for 8566 grouping. If an empty string, then a unique grouping is created for 8567 each filter (this is sometimes useful when each document can have 8568 multiple terms with this prefix). [default: NULL] "; 8569 8570 %feature("docstring") Xapian::QueryParser::add_boolean_prefix " 8571 8572 Add a boolean term prefix allowing the user to restrict a search with 8573 a boolean filter specified in the free text query. 8574 8575 void Xapian::QueryParser::add_boolean_prefix(const std::string &field, 8576 const std::string &prefix, bool exclusive) 8577 8578 This is an older version of this method - use the version with the 8579 grouping parameter in preference to this one. 8580 8581 Parameters: 8582 ----------- 8583 8584 field: The user visible field name 8585 8586 prefix: The term prefix to map this to 8587 8588 exclusive: Controls how multiple filters are combined. If true then 8589 prefix is used as the grouping value, so terms with the same prefix 8590 are combined with OP_OR, then the resulting queries are combined with 8591 OP_AND. If false, then a unique grouping is created for each filter 8592 (this is sometimes useful when each document can have multiple terms 8593 with this prefix). "; 8594 8595 %feature("docstring") Xapian::QueryParser::add_boolean_prefix " 8596 8597 Register a FieldProcessor for a boolean prefix. 8598 8599 void Xapian::QueryParser::add_boolean_prefix(const std::string &field, 8600 Xapian::FieldProcessor *proc, const std::string *grouping=NULL) "; 8601 8602 %feature("docstring") Xapian::QueryParser::add_boolean_prefix " 8603 8604 Register a FieldProcessor for a boolean prefix. 8605 8606 void Xapian::QueryParser::add_boolean_prefix(const std::string &field, 8607 Xapian::FieldProcessor *proc, bool exclusive) 8608 8609 This is an older version of this method - use the version with the 8610 grouping parameter in preference to this one. "; 8611 8612 %feature("docstring") Xapian::QueryParser::stoplist_begin " 8613 8614 Begin iterator over terms omitted from the query as stopwords. 8615 8616 TermIterator Xapian::QueryParser::stoplist_begin() const "; 8617 8618 %feature("docstring") Xapian::QueryParser::stoplist_end " 8619 8620 End iterator over terms omitted from the query as stopwords. 8621 8622 TermIterator Xapian::QueryParser::stoplist_end() const "; 8623 8624 %feature("docstring") Xapian::QueryParser::unstem_begin " 8625 8626 Begin iterator over unstemmed forms of the given stemmed query term. 8627 8628 TermIterator Xapian::QueryParser::unstem_begin(const std::string 8629 &term) const "; 8630 8631 %feature("docstring") Xapian::QueryParser::unstem_end " 8632 8633 End iterator over unstemmed forms of the given stemmed query term. 8634 8635 TermIterator Xapian::QueryParser::unstem_end(const std::string &) 8636 const "; 8637 8638 %feature("docstring") Xapian::QueryParser::add_rangeprocessor " 8639 8640 Register a RangeProcessor. 8641 8642 void Xapian::QueryParser::add_rangeprocessor(Xapian::RangeProcessor 8643 *range_proc, const std::string *grouping=NULL) "; 8644 8645 %feature("docstring") Xapian::QueryParser::add_valuerangeprocessor " 8646 8647 Register a ValueRangeProcessor. 8648 8649 void 8650 Xapian::QueryParser::add_valuerangeprocessor(Xapian::ValueRangeProcessor 8651 *vrproc) 8652 8653 This method is provided for API compatibility with Xapian 1.2.x and is 8654 deprecated - use add_rangeprocessor() with a RangeProcessor instead. 8655 8656 Compatibility shim. "; 8657 8658 %feature("docstring") Xapian::QueryParser::get_corrected_query_string 8659 " 8660 8661 Get the spelling-corrected query string. 8662 8663 std::string Xapian::QueryParser::get_corrected_query_string() const 8664 8665 This will only be set if FLAG_SPELLING_CORRECTION is specified when 8666 QueryParser::parse_query() was last called. 8667 8668 If there were no corrections, an empty string is returned. "; 8669 8670 %feature("docstring") Xapian::QueryParser::get_description " 8671 8672 Return a string describing this object. 8673 8674 std::string Xapian::QueryParser::get_description() const "; 8675 8676 8677 // File: classXapian_1_1QueryParserError.xml 8678 %feature("docstring") Xapian::QueryParserError " 8679 8680 Indicates a query string can't be parsed. "; 8681 8682 %feature("docstring") Xapian::QueryParserError::QueryParserError " 8683 8684 General purpose constructor. 8685 8686 Xapian::QueryParserError::QueryParserError(const std::string &msg_, 8687 const std::string &context_=std::string(), int errno_=0) 8688 8689 Parameters: 8690 ----------- 8691 8692 msg_: Message giving details of the error, intended for human 8693 consumption. 8694 8695 context_: Optional context information for this error. 8696 8697 errno_: Optional errno value associated with this error. "; 8698 8699 %feature("docstring") Xapian::QueryParserError::QueryParserError " 8700 8701 Construct from message and errno value. 8702 8703 Xapian::QueryParserError::QueryParserError(const std::string &msg_, 8704 int errno_) 8705 8706 Parameters: 8707 ----------- 8708 8709 msg_: Message giving details of the error, intended for human 8710 consumption. 8711 8712 errno_: Optional errno value associated with this error. "; 8713 8714 8715 // File: classXapian_1_1RangeError.xml 8716 %feature("docstring") Xapian::RangeError " 8717 8718 RangeError indicates an attempt to access outside the bounds of a 8719 container. "; 8720 8721 %feature("docstring") Xapian::RangeError::RangeError " 8722 8723 General purpose constructor. 8724 8725 Xapian::RangeError::RangeError(const std::string &msg_, const 8726 std::string &context_=std::string(), int errno_=0) 8727 8728 Parameters: 8729 ----------- 8730 8731 msg_: Message giving details of the error, intended for human 8732 consumption. 8733 8734 context_: Optional context information for this error. 8735 8736 errno_: Optional errno value associated with this error. "; 8737 8738 %feature("docstring") Xapian::RangeError::RangeError " 8739 8740 Construct from message and errno value. 8741 8742 Xapian::RangeError::RangeError(const std::string &msg_, int errno_) 8743 8744 Parameters: 8745 ----------- 8746 8747 msg_: Message giving details of the error, intended for human 8748 consumption. 8749 8750 errno_: Optional errno value associated with this error. "; 8751 8752 8753 // File: classXapian_1_1RangeProcessor.xml 8754 %feature("docstring") Xapian::RangeProcessor " 8755 8756 Base class for range processors. "; 8757 8758 %feature("docstring") Xapian::RangeProcessor::RangeProcessor " 8759 8760 Default constructor. 8761 8762 Xapian::RangeProcessor::RangeProcessor() "; 8763 8764 %feature("docstring") Xapian::RangeProcessor::RangeProcessor " 8765 8766 Constructor. 8767 8768 Xapian::RangeProcessor::RangeProcessor(Xapian::valueno slot_, const 8769 std::string &str_=std::string(), unsigned flags_=0) 8770 8771 Parameters: 8772 ----------- 8773 8774 slot_: Which value slot to generate ranges over. 8775 8776 str_: A string to look for to recognise values as belonging to this 8777 range (as a prefix by default, or as a suffix if flags 8778 Xapian::RP_SUFFIX is specified). 8779 8780 flags_: Zero or more of the following flags, combined with bitwise-or 8781 (| in C++): Xapian::RP_SUFFIX - require str_ as a suffix instead of a 8782 prefix. 8783 8784 Xapian::RP_REPEATED - optionally allow str_ on both ends of the range 8785 - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on 8786 the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the 8787 end (e.g. 2..12kg). "; 8788 8789 %feature("docstring") Xapian::RangeProcessor::~RangeProcessor " 8790 8791 Destructor. 8792 8793 virtual Xapian::RangeProcessor::~RangeProcessor() "; 8794 8795 %feature("docstring") Xapian::RangeProcessor::check_range " 8796 8797 Check prefix/suffix on range. 8798 8799 Xapian::Query Xapian::RangeProcessor::check_range(const std::string 8800 &b, const std::string &e) 8801 8802 If they match, remove the prefix/suffix and then call operator()() to 8803 try to handle the range. "; 8804 8805 %feature("docstring") Xapian::RangeProcessor::release " 8806 8807 Start reference counting this object. 8808 8809 RangeProcessor* Xapian::RangeProcessor::release() 8810 8811 You can hand ownership of a dynamically allocated RangeProcessor 8812 object to Xapian by calling release() and then passing the object to a 8813 Xapian method. Xapian will arrange to delete the object once it is no 8814 longer required. "; 8815 8816 %feature("docstring") Xapian::RangeProcessor::release " 8817 8818 Start reference counting this object. 8819 8820 const RangeProcessor* Xapian::RangeProcessor::release() const 8821 8822 You can hand ownership of a dynamically allocated RangeProcessor 8823 object to Xapian by calling release() and then passing the object to a 8824 Xapian method. Xapian will arrange to delete the object once it is no 8825 longer required. "; 8826 8827 8828 // File: classXapian_1_1Registry.xml 8829 %feature("docstring") Xapian::Registry " 8830 8831 Registry for user subclasses. 8832 8833 This class provides a way for the remote server to look up user 8834 subclasses when unserialising. "; 8835 8836 %feature("docstring") Xapian::Registry::Registry " 8837 8838 Copy constructor. 8839 8840 Xapian::Registry::Registry(const Registry &other) 8841 8842 The internals are reference counted, so copying is cheap. 8843 8844 Parameters: 8845 ----------- 8846 8847 other: The object to copy. "; 8848 8849 %feature("docstring") Xapian::Registry::Registry " 8850 8851 Default constructor. 8852 8853 Xapian::Registry::Registry() 8854 8855 The registry will contain all standard subclasses of user-subclassable 8856 classes. "; 8857 8858 %feature("docstring") Xapian::Registry::~Registry "Xapian::Registry::~Registry() "; 8859 8860 %feature("docstring") Xapian::Registry::register_weighting_scheme " 8861 8862 Register a weighting scheme. 8863 8864 void Xapian::Registry::register_weighting_scheme(const Xapian::Weight 8865 &wt) 8866 8867 Parameters: 8868 ----------- 8869 8870 wt: The weighting scheme to register. "; 8871 8872 %feature("docstring") Xapian::Registry::get_weighting_scheme " 8873 8874 Get the weighting scheme given a name. 8875 8876 const Xapian::Weight* Xapian::Registry::get_weighting_scheme(const 8877 std::string &name) const 8878 8879 Parameters: 8880 ----------- 8881 8882 name: The name of the weighting scheme to find. 8883 8884 An object with the requested name, or NULL if the weighting scheme 8885 could not be found. The returned object is owned by the registry and 8886 so must not be deleted by the caller. "; 8887 8888 %feature("docstring") Xapian::Registry::register_posting_source " 8889 8890 Register a user-defined posting source class. 8891 8892 void Xapian::Registry::register_posting_source(const 8893 Xapian::PostingSource &source) 8894 8895 Parameters: 8896 ----------- 8897 8898 source: The posting source to register. "; 8899 8900 %feature("docstring") Xapian::Registry::get_posting_source " 8901 8902 Get a posting source given a name. 8903 8904 const Xapian::PostingSource* 8905 Xapian::Registry::get_posting_source(const std::string &name) const 8906 8907 Parameters: 8908 ----------- 8909 8910 name: The name of the posting source to find. 8911 8912 An object with the requested name, or NULL if the posting source could 8913 not be found. The returned object is owned by the registry and so must 8914 not be deleted by the caller. "; 8915 8916 %feature("docstring") Xapian::Registry::register_match_spy " 8917 8918 Register a user-defined match spy class. 8919 8920 void Xapian::Registry::register_match_spy(const Xapian::MatchSpy &spy) 8921 8922 Parameters: 8923 ----------- 8924 8925 spy: The match spy to register. "; 8926 8927 %feature("docstring") Xapian::Registry::get_match_spy " 8928 8929 Get a match spy given a name. 8930 8931 const Xapian::MatchSpy* Xapian::Registry::get_match_spy(const 8932 std::string &name) const 8933 8934 Parameters: 8935 ----------- 8936 8937 name: The name of the match spy to find. 8938 8939 An object with the requested name, or NULL if the match spy could not 8940 be found. The returned object is owned by the registry and so must not 8941 be deleted by the caller. "; 8942 8943 %feature("docstring") Xapian::Registry::register_lat_long_metric " 8944 8945 Register a user-defined lat-long metric class. 8946 8947 void Xapian::Registry::register_lat_long_metric(const 8948 Xapian::LatLongMetric &metric) "; 8949 8950 %feature("docstring") Xapian::Registry::get_lat_long_metric " 8951 8952 Get a lat-long metric given a name. 8953 8954 const Xapian::LatLongMetric* 8955 Xapian::Registry::get_lat_long_metric(const std::string &name) const 8956 8957 The returned metric is owned by the registry object. 8958 8959 Returns NULL if the metric could not be found. "; 8960 8961 8962 // File: classXapian_1_1RSet.xml 8963 %feature("docstring") Xapian::RSet " 8964 8965 A relevance set (R-Set). 8966 8967 This is the set of documents which are marked as relevant, for use in 8968 modifying the term weights, and in performing query expansion. "; 8969 8970 %feature("docstring") Xapian::RSet::RSet " 8971 8972 Copy constructor. 8973 8974 Xapian::RSet::RSet(const RSet &rset) "; 8975 8976 %feature("docstring") Xapian::RSet::RSet " 8977 8978 Default constructor. 8979 8980 Xapian::RSet::RSet() "; 8981 8982 %feature("docstring") Xapian::RSet::~RSet " 8983 8984 Destructor. 8985 8986 Xapian::RSet::~RSet() "; 8987 8988 %feature("docstring") Xapian::RSet::size " 8989 8990 The number of documents in this R-Set. 8991 8992 Xapian::doccount Xapian::RSet::size() const "; 8993 8994 %feature("docstring") Xapian::RSet::empty " 8995 8996 Test if this R-Set is empty. 8997 8998 bool Xapian::RSet::empty() const "; 8999 9000 %feature("docstring") Xapian::RSet::add_document " 9001 9002 Add a document to the relevance set. 9003 9004 void Xapian::RSet::add_document(Xapian::docid did) "; 9005 9006 %feature("docstring") Xapian::RSet::add_document " 9007 9008 Add a document to the relevance set. 9009 9010 void Xapian::RSet::add_document(const Xapian::MSetIterator &i) "; 9011 9012 %feature("docstring") Xapian::RSet::remove_document " 9013 9014 Remove a document from the relevance set. 9015 9016 void Xapian::RSet::remove_document(Xapian::docid did) "; 9017 9018 %feature("docstring") Xapian::RSet::remove_document " 9019 9020 Remove a document from the relevance set. 9021 9022 void Xapian::RSet::remove_document(const Xapian::MSetIterator &i) "; 9023 9024 %feature("docstring") Xapian::RSet::contains " 9025 9026 Test if a given document in the relevance set. 9027 9028 bool Xapian::RSet::contains(Xapian::docid did) const "; 9029 9030 %feature("docstring") Xapian::RSet::contains " 9031 9032 Test if a given document in the relevance set. 9033 9034 bool Xapian::RSet::contains(const Xapian::MSetIterator &i) const "; 9035 9036 %feature("docstring") Xapian::RSet::get_description " 9037 9038 Return a string describing this object. 9039 9040 std::string Xapian::RSet::get_description() const "; 9041 9042 9043 // File: classXapian_1_1RuntimeError.xml 9044 %feature("docstring") Xapian::RuntimeError " 9045 9046 The base class for exceptions indicating errors only detectable at 9047 runtime. 9048 9049 A subclass of RuntimeError will be thrown if Xapian detects an error 9050 which is exception derived from RuntimeError is thrown when an error 9051 is caused by problems with the data or environment rather than a 9052 programming mistake. "; 9053 9054 9055 // File: classXapian_1_1SerialisationError.xml 9056 %feature("docstring") Xapian::SerialisationError " 9057 9058 Indicates an error in the std::string serialisation of an object. "; 9059 9060 %feature("docstring") Xapian::SerialisationError::SerialisationError 9061 " 9062 9063 General purpose constructor. 9064 9065 Xapian::SerialisationError::SerialisationError(const std::string 9066 &msg_, const std::string &context_=std::string(), int errno_=0) 9067 9068 Parameters: 9069 ----------- 9070 9071 msg_: Message giving details of the error, intended for human 9072 consumption. 9073 9074 context_: Optional context information for this error. 9075 9076 errno_: Optional errno value associated with this error. "; 9077 9078 %feature("docstring") Xapian::SerialisationError::SerialisationError 9079 " 9080 9081 Construct from message and errno value. 9082 9083 Xapian::SerialisationError::SerialisationError(const std::string 9084 &msg_, int errno_) 9085 9086 Parameters: 9087 ----------- 9088 9089 msg_: Message giving details of the error, intended for human 9090 consumption. 9091 9092 errno_: Optional errno value associated with this error. "; 9093 9094 9095 // File: classXapian_1_1SimpleStopper.xml 9096 %feature("docstring") Xapian::SimpleStopper " 9097 9098 Simple implementation of Stopper class - this will suit most users. "; 9099 9100 %feature("docstring") Xapian::SimpleStopper::SimpleStopper " 9101 9102 Default constructor. 9103 9104 Xapian::SimpleStopper::SimpleStopper() "; 9105 9106 %feature("docstring") Xapian::SimpleStopper::SimpleStopper " 9107 9108 Initialise from a pair of iterators. 9109 9110 Xapian::SimpleStopper::SimpleStopper(Iterator begin, Iterator end) 9111 9112 Xapian includes stop list files for many languages. You can initialise 9113 from a file like that: "; 9114 9115 %feature("docstring") Xapian::SimpleStopper::add " 9116 9117 Add a single stop word. 9118 9119 void Xapian::SimpleStopper::add(const std::string &word) "; 9120 9121 %feature("docstring") Xapian::SimpleStopper::get_description " 9122 9123 Return a string describing this object. 9124 9125 virtual std::string Xapian::SimpleStopper::get_description() const "; 9126 9127 9128 // File: classXapian_1_1Stem.xml 9129 %feature("docstring") Xapian::Stem " 9130 9131 Class representing a stemming algorithm. "; 9132 9133 %feature("docstring") Xapian::Stem::Stem " 9134 9135 Copy constructor. 9136 9137 Xapian::Stem::Stem(const Stem &o) "; 9138 9139 %feature("docstring") Xapian::Stem::Stem " 9140 9141 Construct a Xapian::Stem object which doesn't change terms. 9142 9143 Xapian::Stem::Stem() 9144 9145 Equivalent to Stem(\"none\"). "; 9146 9147 %feature("docstring") Xapian::Stem::Stem " 9148 9149 Construct a Xapian::Stem object with a user-provided stemming 9150 algorithm. 9151 9152 Xapian::Stem::Stem(StemImplementation *p) 9153 9154 You can subclass Xapian::StemImplementation to implement your own 9155 stemming algorithm (or to wrap a third-party algorithm) and then wrap 9156 your implementation in a Xapian::Stem object to pass to the Xapian 9157 API. 9158 9159 Parameters: 9160 ----------- 9161 9162 p: The user-subclassed StemImplementation object. This is reference 9163 counted, and so will be automatically deleted by the Xapian::Stem 9164 wrapper when no longer required. "; 9165 9166 %feature("docstring") Xapian::Stem::~Stem " 9167 9168 Destructor. 9169 9170 Xapian::Stem::~Stem() "; 9171 9172 %feature("docstring") Xapian::Stem::is_none " 9173 9174 Return true if this is a no-op stemmer. 9175 9176 bool Xapian::Stem::is_none() const "; 9177 9178 %feature("docstring") Xapian::Stem::get_description " 9179 9180 Return a string describing this object. 9181 9182 std::string Xapian::Stem::get_description() const "; 9183 9184 9185 // File: classXapian_1_1StemImplementation.xml 9186 %feature("docstring") Xapian::StemImplementation " 9187 9188 Class representing a stemming algorithm implementation. "; 9189 9190 %feature("docstring") Xapian::StemImplementation::StemImplementation 9191 " 9192 9193 Default constructor. 9194 9195 Xapian::StemImplementation::StemImplementation() "; 9196 9197 %feature("docstring") Xapian::StemImplementation::~StemImplementation 9198 " 9199 9200 Virtual destructor. 9201 9202 virtual Xapian::StemImplementation::~StemImplementation() "; 9203 9204 %feature("docstring") Xapian::StemImplementation::get_description " 9205 9206 Return a string describing this object. 9207 9208 virtual std::string Xapian::StemImplementation::get_description() 9209 const =0 "; 9210 9211 9212 // File: classXapian_1_1Stopper.xml 9213 %feature("docstring") Xapian::Stopper " 9214 9215 Base class for stop-word decision functor. "; 9216 9217 %feature("docstring") Xapian::Stopper::Stopper " 9218 9219 Default constructor. 9220 9221 Xapian::Stopper::Stopper() "; 9222 9223 %feature("docstring") Xapian::Stopper::~Stopper " 9224 9225 Class has virtual methods, so provide a virtual destructor. 9226 9227 virtual Xapian::Stopper::~Stopper() "; 9228 9229 %feature("docstring") Xapian::Stopper::get_description " 9230 9231 Return a string describing this object. 9232 9233 virtual std::string Xapian::Stopper::get_description() const "; 9234 9235 %feature("docstring") Xapian::Stopper::release " 9236 9237 Start reference counting this object. 9238 9239 Stopper* Xapian::Stopper::release() 9240 9241 You can hand ownership of a dynamically allocated Stopper object to 9242 Xapian by calling release() and then passing the object to a Xapian 9243 method. Xapian will arrange to delete the object once it is no longer 9244 required. "; 9245 9246 %feature("docstring") Xapian::Stopper::release " 9247 9248 Start reference counting this object. 9249 9250 const Stopper* Xapian::Stopper::release() const 9251 9252 You can hand ownership of a dynamically allocated Stopper object to 9253 Xapian by calling release() and then passing the object to a Xapian 9254 method. Xapian will arrange to delete the object once it is no longer 9255 required. "; 9256 9257 9258 // File: classXapian_1_1StringValueRangeProcessor.xml 9259 %feature("docstring") Xapian::StringValueRangeProcessor " 9260 9261 Handle a string range. 9262 9263 The end points can be any strings. 9264 9265 Deprecated Use Xapian::RangeProcessor instead (added in 1.3.6). "; 9266 9267 %feature("docstring") 9268 Xapian::StringValueRangeProcessor::StringValueRangeProcessor " 9269 9270 Constructor. 9271 9272 Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno 9273 slot_) 9274 9275 Parameters: 9276 ----------- 9277 9278 slot_: The value number to return from operator(). "; 9279 9280 %feature("docstring") 9281 Xapian::StringValueRangeProcessor::StringValueRangeProcessor " 9282 9283 Constructor. 9284 9285 Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno 9286 slot_, const std::string &str_, bool prefix_=true) 9287 9288 Parameters: 9289 ----------- 9290 9291 slot_: The value number to return from operator(). 9292 9293 str_: A string to look for to recognise values as belonging to this 9294 range. 9295 9296 prefix_: Flag specifying whether to check for str_ as a prefix or a 9297 suffix. "; 9298 9299 9300 // File: classXapian_1_1TermGenerator.xml 9301 %feature("docstring") Xapian::TermGenerator " 9302 9303 Parses a piece of text and generate terms. 9304 9305 This module takes a piece of text and parses it to produce words which 9306 are then used to generate suitable terms for indexing. The terms 9307 generated are suitable for use with Query objects produced by the 9308 QueryParser class. "; 9309 9310 %feature("docstring") Xapian::TermGenerator::TermGenerator " 9311 9312 Copy constructor. 9313 9314 Xapian::TermGenerator::TermGenerator(const TermGenerator &o) "; 9315 9316 %feature("docstring") Xapian::TermGenerator::TermGenerator " 9317 9318 Default constructor. 9319 9320 Xapian::TermGenerator::TermGenerator() "; 9321 9322 %feature("docstring") Xapian::TermGenerator::~TermGenerator " 9323 9324 Destructor. 9325 9326 Xapian::TermGenerator::~TermGenerator() "; 9327 9328 %feature("docstring") Xapian::TermGenerator::set_stemmer " 9329 9330 Set the Xapian::Stem object to be used for generating stemmed terms. 9331 9332 void Xapian::TermGenerator::set_stemmer(const Xapian::Stem &stemmer) 9333 "; 9334 9335 %feature("docstring") Xapian::TermGenerator::set_stopper " 9336 9337 Set the Xapian::Stopper object to be used for identifying stopwords. 9338 9339 void Xapian::TermGenerator::set_stopper(const Xapian::Stopper 9340 *stop=NULL) 9341 9342 Stemmed forms of stopwords aren't indexed, but unstemmed forms still 9343 are so that searches for phrases including stop words still work. 9344 9345 Parameters: 9346 ----------- 9347 9348 stop: The Stopper object to set (default NULL, which means no 9349 stopwords). "; 9350 9351 %feature("docstring") Xapian::TermGenerator::set_document " 9352 9353 Set the current document. 9354 9355 void Xapian::TermGenerator::set_document(const Xapian::Document &doc) 9356 "; 9357 9358 %feature("docstring") Xapian::TermGenerator::get_document " 9359 9360 Get the current document. 9361 9362 const Xapian::Document& Xapian::TermGenerator::get_document() const "; 9363 9364 %feature("docstring") Xapian::TermGenerator::set_database " 9365 9366 Set the database to index spelling data to. 9367 9368 void Xapian::TermGenerator::set_database(const 9369 Xapian::WritableDatabase &db) "; 9370 9371 %feature("docstring") Xapian::TermGenerator::set_flags " 9372 9373 Set flags. 9374 9375 flags Xapian::TermGenerator::set_flags(flags toggle, flags 9376 mask=flags(0)) 9377 9378 The new value of flags is: (flags & mask) ^ toggle 9379 9380 To just set the flags, pass the new flags in toggle and the default 9381 value for mask. 9382 9383 Parameters: 9384 ----------- 9385 9386 toggle: Flags to XOR. 9387 9388 mask: Flags to AND with first. 9389 9390 The old flags setting. "; 9391 9392 %feature("docstring") Xapian::TermGenerator::set_stemming_strategy " 9393 9394 Set the stemming strategy. 9395 9396 void Xapian::TermGenerator::set_stemming_strategy(stem_strategy 9397 strategy) 9398 9399 This method controls how the stemming algorithm is applied. It was new 9400 in Xapian 1.3.1. 9401 9402 Parameters: 9403 ----------- 9404 9405 strategy: The strategy to use - possible values are: STEM_NONE: Don't 9406 perform any stemming - only unstemmed terms are generated. 9407 9408 STEM_SOME: Generate both stemmed (with a \"Z\" prefix) and unstemmed 9409 terms. No positional information is stored for unstemmed terms. This 9410 is the default strategy. 9411 9412 STEM_SOME_FULL_POS: Like STEM_SOME but positional information is 9413 stored for both stemmed and unstemmed terms. Added in Xapian 1.4.8. 9414 9415 STEM_ALL: Generate only stemmed terms (but without a \"Z\" prefix). 9416 9417 STEM_ALL_Z: Generate only stemmed terms (with a \"Z\" prefix). "; 9418 9419 %feature("docstring") Xapian::TermGenerator::set_stopper_strategy " 9420 9421 Set the stopper strategy. 9422 9423 void Xapian::TermGenerator::set_stopper_strategy(stop_strategy 9424 strategy) 9425 9426 The method controls how the stopper is used. It was added in Xapian 9427 1.4.1. 9428 9429 You need to also call set_stopper() for this to have any effect. 9430 9431 Parameters: 9432 ----------- 9433 9434 strategy: The strategy to use - possible values are: STOP_NONE: Don't 9435 use the stopper. 9436 9437 STOP_ALL: If a word is identified as a stop word, skip it completely. 9438 9439 STOP_STEMMED: If a word is identified as a stop word, index its 9440 unstemmed form but skip the stem. Unstemmed forms are indexed with 9441 positional information by default, so this allows searches for phrases 9442 containing stopwords to be supported. (This is the default mode). "; 9443 9444 %feature("docstring") Xapian::TermGenerator::set_max_word_length " 9445 9446 Set the maximum length word to index. 9447 9448 void Xapian::TermGenerator::set_max_word_length(unsigned 9449 max_word_length) 9450 9451 The limit is on the length of a word prior to stemming and prior to 9452 adding any term prefix. 9453 9454 The backends mostly impose a limit on the length of terms (often of 9455 about 240 bytes), but it's generally useful to have a lower limit to 9456 help prevent the index being bloated by useless junk terms from trying 9457 to indexing things like binary data, uuencoded data, ASCII art, etc. 9458 9459 This method was new in Xapian 1.3.1. 9460 9461 Parameters: 9462 ----------- 9463 9464 max_word_length: The maximum length word to index, in bytes in UTF-8 9465 representation. Default is 64. "; 9466 9467 %feature("docstring") Xapian::TermGenerator::index_text " 9468 9469 Index some text. 9470 9471 void Xapian::TermGenerator::index_text(const Xapian::Utf8Iterator 9472 &itor, Xapian::termcount wdf_inc=1, const std::string 9473 &prefix=std::string()) 9474 9475 Parameters: 9476 ----------- 9477 9478 itor: Utf8Iterator pointing to the text to index. 9479 9480 wdf_inc: The wdf increment (default 1). 9481 9482 prefix: The term prefix to use (default is no prefix). "; 9483 9484 %feature("docstring") Xapian::TermGenerator::index_text " 9485 9486 Index some text in a std::string. 9487 9488 void Xapian::TermGenerator::index_text(const std::string &text, 9489 Xapian::termcount wdf_inc=1, const std::string &prefix=std::string()) 9490 9491 Parameters: 9492 ----------- 9493 9494 text: The text to index. 9495 9496 wdf_inc: The wdf increment (default 1). 9497 9498 prefix: The term prefix to use (default is no prefix). "; 9499 9500 %feature("docstring") 9501 Xapian::TermGenerator::index_text_without_positions " 9502 9503 Index some text without positional information. 9504 9505 void Xapian::TermGenerator::index_text_without_positions(const 9506 Xapian::Utf8Iterator &itor, Xapian::termcount wdf_inc=1, const 9507 std::string &prefix=std::string()) 9508 9509 Just like index_text, but no positional information is generated. This 9510 means that the database will be significantly smaller, but that phrase 9511 searching and NEAR won't be supported. 9512 9513 Parameters: 9514 ----------- 9515 9516 itor: Utf8Iterator pointing to the text to index. 9517 9518 wdf_inc: The wdf increment (default 1). 9519 9520 prefix: The term prefix to use (default is no prefix). "; 9521 9522 %feature("docstring") 9523 Xapian::TermGenerator::index_text_without_positions " 9524 9525 Index some text in a std::string without positional information. 9526 9527 void Xapian::TermGenerator::index_text_without_positions(const 9528 std::string &text, Xapian::termcount wdf_inc=1, const std::string 9529 &prefix=std::string()) 9530 9531 Just like index_text, but no positional information is generated. This 9532 means that the database will be significantly smaller, but that phrase 9533 searching and NEAR won't be supported. 9534 9535 Parameters: 9536 ----------- 9537 9538 text: The text to index. 9539 9540 wdf_inc: The wdf increment (default 1). 9541 9542 prefix: The term prefix to use (default is no prefix). "; 9543 9544 %feature("docstring") Xapian::TermGenerator::increase_termpos " 9545 9546 Increase the term position used by index_text. 9547 9548 void Xapian::TermGenerator::increase_termpos(Xapian::termpos 9549 delta=100) 9550 9551 This can be used between indexing text from different fields or other 9552 places to prevent phrase searches from spanning between them (e.g. 9553 between the title and body text, or between two chapters in a book). 9554 9555 Parameters: 9556 ----------- 9557 9558 delta: Amount to increase the term position by (default: 100). "; 9559 9560 %feature("docstring") Xapian::TermGenerator::get_termpos " 9561 9562 Get the current term position. 9563 9564 Xapian::termpos Xapian::TermGenerator::get_termpos() const "; 9565 9566 %feature("docstring") Xapian::TermGenerator::set_termpos " 9567 9568 Set the current term position. 9569 9570 void Xapian::TermGenerator::set_termpos(Xapian::termpos termpos) 9571 9572 Parameters: 9573 ----------- 9574 9575 termpos: The new term position to set. "; 9576 9577 %feature("docstring") Xapian::TermGenerator::get_description " 9578 9579 Return a string describing this object. 9580 9581 std::string Xapian::TermGenerator::get_description() const "; 9582 9583 9584 // File: classXapian_1_1TermIterator.xml 9585 %feature("docstring") Xapian::TermIterator " 9586 9587 Class for iterating over a list of terms. "; 9588 9589 %feature("docstring") Xapian::TermIterator::TermIterator " 9590 9591 Copy constructor. 9592 9593 Xapian::TermIterator::TermIterator(const TermIterator &o) "; 9594 9595 %feature("docstring") Xapian::TermIterator::TermIterator " 9596 9597 Default constructor. 9598 9599 Xapian::TermIterator::TermIterator() 9600 9601 Creates an uninitialised iterator, which can't be used before being 9602 assigned to, but is sometimes syntactically convenient. "; 9603 9604 %feature("docstring") Xapian::TermIterator::~TermIterator " 9605 9606 Destructor. 9607 9608 Xapian::TermIterator::~TermIterator() "; 9609 9610 %feature("docstring") Xapian::TermIterator::get_wdf " 9611 9612 Return the wdf for the term at the current position. 9613 9614 Xapian::termcount Xapian::TermIterator::get_wdf() const "; 9615 9616 %feature("docstring") Xapian::TermIterator::get_termfreq " 9617 9618 Return the term frequency for the term at the current position. 9619 9620 Xapian::doccount Xapian::TermIterator::get_termfreq() const "; 9621 9622 %feature("docstring") Xapian::TermIterator::positionlist_count " 9623 9624 Return the length of the position list for the current position. 9625 9626 Xapian::termcount Xapian::TermIterator::positionlist_count() const "; 9627 9628 %feature("docstring") Xapian::TermIterator::positionlist_begin " 9629 9630 Return a PositionIterator for the current term. 9631 9632 PositionIterator Xapian::TermIterator::positionlist_begin() const "; 9633 9634 %feature("docstring") Xapian::TermIterator::positionlist_end " 9635 9636 Return an end PositionIterator for the current term. 9637 9638 PositionIterator Xapian::TermIterator::positionlist_end() const "; 9639 9640 %feature("docstring") Xapian::TermIterator::skip_to " 9641 9642 Advance the iterator to term term. 9643 9644 void Xapian::TermIterator::skip_to(const std::string &term) 9645 9646 If the iteration is over an unsorted list of terms, then this method 9647 will throw Xapian::InvalidOperationError. 9648 9649 Parameters: 9650 ----------- 9651 9652 term: The term to advance to. If this term isn't in the stream being 9653 iterated, then the iterator is moved to the next term after it which 9654 is. "; 9655 9656 %feature("docstring") Xapian::TermIterator::get_description " 9657 9658 Return a string describing this object. 9659 9660 std::string Xapian::TermIterator::get_description() const "; 9661 9662 9663 // File: classXapian_1_1TfIdfWeight.xml 9664 %feature("docstring") Xapian::TfIdfWeight " 9665 9666 Xapian::Weight subclass implementing the tf-idf weighting scheme. "; 9667 9668 %feature("docstring") Xapian::TfIdfWeight::TfIdfWeight " 9669 9670 Construct a TfIdfWeight. 9671 9672 Xapian::TfIdfWeight::TfIdfWeight(const std::string &normalizations) 9673 9674 Parameters: 9675 ----------- 9676 9677 normalizations: A three character string indicating the 9678 normalizations to be used for the tf(wdf), idf and document weight. 9679 (default: \"ntn\") 9680 9681 The normalizations string works like so: 9682 9683 The first character specifies the normalization for the wdf. The 9684 following normalizations are currently supported: 9685 9686 'n': None. wdfn=wdf 9687 9688 'b': Boolean wdfn=1 if term in document else wdfn=0 9689 9690 's': Square wdfn=wdf*wdf 9691 9692 'l': Logarithmic wdfn=1+loge(wdf) 9693 9694 'L': Log average wdfn=(1+log(wdf))/(1+log(doclen/unique_terms)) The 9695 Max-wdf and Augmented Max wdf normalizations haven't yet been 9696 implemented. 9697 9698 The second character indicates the normalization for the idf. The 9699 following normalizations are currently supported: 9700 9701 'n': None idfn=1 9702 9703 't': TfIdf idfn=log(N/Termfreq) where N is the number of documents in 9704 collection and Termfreq is the number of documents which are indexed 9705 by the term t. 9706 9707 'p': Prob idfn=log((N-Termfreq)/Termfreq) 9708 9709 'f': Freq idfn=1/Termfreq 9710 9711 's': Squared idfn=log(N/Termfreq)^2 9712 9713 The third and the final character indicates the normalization for the 9714 document weight. The following normalizations are currently supported: 9715 9716 'n': None wtn=tfn*idfn Implementing support for more normalizations 9717 of each type would require extending the backend to track more 9718 statistics. "; 9719 9720 %feature("docstring") Xapian::TfIdfWeight::TfIdfWeight " 9721 9722 Construct a TfIdfWeight using the default normalizations (\"ntn\"). 9723 9724 Xapian::TfIdfWeight::TfIdfWeight() "; 9725 9726 %feature("docstring") Xapian::TfIdfWeight::name " 9727 9728 Return the name of this weighting scheme. 9729 9730 std::string Xapian::TfIdfWeight::name() const 9731 9732 This name is used by the remote backend. It is passed along with the 9733 serialised parameters to the remote server so that it knows which 9734 class to create. 9735 9736 Return the full namespace-qualified name of your class here - if your 9737 class is called FooWeight, return \"FooWeight\" from this method ( 9738 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 9739 9740 If you don't want to support the remote backend, you can use the 9741 default implementation which simply returns an empty string. "; 9742 9743 %feature("docstring") Xapian::TfIdfWeight::serialise " 9744 9745 Return this object's parameters serialised as a single string. 9746 9747 std::string Xapian::TfIdfWeight::serialise() const 9748 9749 If you don't want to support the remote backend, you can use the 9750 default implementation which simply throws Xapian::UnimplementedError. 9751 "; 9752 9753 %feature("docstring") Xapian::TfIdfWeight::unserialise " 9754 9755 Unserialise parameters. 9756 9757 TfIdfWeight* Xapian::TfIdfWeight::unserialise(const std::string 9758 &serialised) const 9759 9760 This method unserialises parameters serialised by the serialise() 9761 method and allocates and returns a new object initialised with them. 9762 9763 If you don't want to support the remote backend, you can use the 9764 default implementation which simply throws Xapian::UnimplementedError. 9765 9766 Note that the returned object will be deallocated by Xapian after use 9767 with \"delete\". If you want to handle the deletion in a special way 9768 (for example when wrapping the Xapian API for use from another 9769 language) then you can define a static operator delete method in your 9770 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 9771 9772 Parameters: 9773 ----------- 9774 9775 serialised: A string containing the serialised parameters. "; 9776 9777 %feature("docstring") Xapian::TfIdfWeight::get_sumpart " 9778 9779 Calculate the weight contribution for this object's term to a 9780 document. 9781 9782 double Xapian::TfIdfWeight::get_sumpart(Xapian::termcount wdf, 9783 Xapian::termcount doclen, Xapian::termcount uniqterm) const 9784 9785 The parameters give information about the document which may be used 9786 in the calculations: 9787 9788 Parameters: 9789 ----------- 9790 9791 wdf: The within document frequency of the term in the document. 9792 9793 doclen: The document's length (unnormalised). 9794 9795 uniqterms: Number of unique terms in the document (used for absolute 9796 smoothing). "; 9797 9798 %feature("docstring") Xapian::TfIdfWeight::get_maxpart " 9799 9800 Return an upper bound on what get_sumpart() can return for any 9801 document. 9802 9803 double Xapian::TfIdfWeight::get_maxpart() const 9804 9805 This information is used by the matcher to perform various 9806 optimisations, so strive to make the bound as tight as possible. "; 9807 9808 %feature("docstring") Xapian::TfIdfWeight::get_sumextra " 9809 9810 Calculate the term-independent weight component for a document. 9811 9812 double Xapian::TfIdfWeight::get_sumextra(Xapian::termcount doclen, 9813 Xapian::termcount uniqterms) const 9814 9815 The parameter gives information about the document which may be used 9816 in the calculations: 9817 9818 Parameters: 9819 ----------- 9820 9821 doclen: The document's length (unnormalised). 9822 9823 uniqterms: The number of unique terms in the document. "; 9824 9825 %feature("docstring") Xapian::TfIdfWeight::get_maxextra " 9826 9827 Return an upper bound on what get_sumextra() can return for any 9828 document. 9829 9830 double Xapian::TfIdfWeight::get_maxextra() const 9831 9832 This information is used by the matcher to perform various 9833 optimisations, so strive to make the bound as tight as possible. "; 9834 9835 9836 // File: classXapian_1_1TradWeight.xml 9837 %feature("docstring") Xapian::TradWeight " 9838 9839 Xapian::Weight subclass implementing the traditional probabilistic 9840 formula. 9841 9842 This class implements the \"traditional\" Probabilistic Weighting 9843 scheme, as described by the early papers on Probabilistic Retrieval. 9844 BM25 generally gives better results. 9845 9846 TradWeight(k) is equivalent to BM25Weight(k, 0, 0, 1, 0), except that 9847 the latter returns weights (k+1) times larger. "; 9848 9849 %feature("docstring") Xapian::TradWeight::TradWeight " 9850 9851 Construct a TradWeight. 9852 9853 Xapian::TradWeight::TradWeight(double k=1.0) 9854 9855 Parameters: 9856 ----------- 9857 9858 k: A non-negative parameter controlling how influential within- 9859 document- frequency (wdf) and document length are. k=0 means that wdf 9860 and document length don't affect the weights. The larger k is, the 9861 more they do. (default 1) "; 9862 9863 %feature("docstring") Xapian::TradWeight::name " 9864 9865 Return the name of this weighting scheme. 9866 9867 std::string Xapian::TradWeight::name() const 9868 9869 This name is used by the remote backend. It is passed along with the 9870 serialised parameters to the remote server so that it knows which 9871 class to create. 9872 9873 Return the full namespace-qualified name of your class here - if your 9874 class is called FooWeight, return \"FooWeight\" from this method ( 9875 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 9876 9877 If you don't want to support the remote backend, you can use the 9878 default implementation which simply returns an empty string. "; 9879 9880 %feature("docstring") Xapian::TradWeight::serialise " 9881 9882 Return this object's parameters serialised as a single string. 9883 9884 std::string Xapian::TradWeight::serialise() const 9885 9886 If you don't want to support the remote backend, you can use the 9887 default implementation which simply throws Xapian::UnimplementedError. 9888 "; 9889 9890 %feature("docstring") Xapian::TradWeight::unserialise " 9891 9892 Unserialise parameters. 9893 9894 TradWeight* Xapian::TradWeight::unserialise(const std::string 9895 &serialised) const 9896 9897 This method unserialises parameters serialised by the serialise() 9898 method and allocates and returns a new object initialised with them. 9899 9900 If you don't want to support the remote backend, you can use the 9901 default implementation which simply throws Xapian::UnimplementedError. 9902 9903 Note that the returned object will be deallocated by Xapian after use 9904 with \"delete\". If you want to handle the deletion in a special way 9905 (for example when wrapping the Xapian API for use from another 9906 language) then you can define a static operator delete method in your 9907 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 9908 9909 Parameters: 9910 ----------- 9911 9912 serialised: A string containing the serialised parameters. "; 9913 9914 %feature("docstring") Xapian::TradWeight::get_sumpart " 9915 9916 Calculate the weight contribution for this object's term to a 9917 document. 9918 9919 double Xapian::TradWeight::get_sumpart(Xapian::termcount wdf, 9920 Xapian::termcount doclen, Xapian::termcount uniqueterms) const 9921 9922 The parameters give information about the document which may be used 9923 in the calculations: 9924 9925 Parameters: 9926 ----------- 9927 9928 wdf: The within document frequency of the term in the document. 9929 9930 doclen: The document's length (unnormalised). 9931 9932 uniqterms: Number of unique terms in the document (used for absolute 9933 smoothing). "; 9934 9935 %feature("docstring") Xapian::TradWeight::get_maxpart " 9936 9937 Return an upper bound on what get_sumpart() can return for any 9938 document. 9939 9940 double Xapian::TradWeight::get_maxpart() const 9941 9942 This information is used by the matcher to perform various 9943 optimisations, so strive to make the bound as tight as possible. "; 9944 9945 %feature("docstring") Xapian::TradWeight::get_sumextra " 9946 9947 Calculate the term-independent weight component for a document. 9948 9949 double Xapian::TradWeight::get_sumextra(Xapian::termcount doclen, 9950 Xapian::termcount uniqterms) const 9951 9952 The parameter gives information about the document which may be used 9953 in the calculations: 9954 9955 Parameters: 9956 ----------- 9957 9958 doclen: The document's length (unnormalised). 9959 9960 uniqterms: The number of unique terms in the document. "; 9961 9962 %feature("docstring") Xapian::TradWeight::get_maxextra " 9963 9964 Return an upper bound on what get_sumextra() can return for any 9965 document. 9966 9967 double Xapian::TradWeight::get_maxextra() const 9968 9969 This information is used by the matcher to perform various 9970 optimisations, so strive to make the bound as tight as possible. "; 9971 9972 9973 // File: classXapian_1_1UnimplementedError.xml 9974 %feature("docstring") Xapian::UnimplementedError " 9975 9976 UnimplementedError indicates an attempt to use an unimplemented 9977 feature. "; 9978 9979 %feature("docstring") Xapian::UnimplementedError::UnimplementedError 9980 " 9981 9982 General purpose constructor. 9983 9984 Xapian::UnimplementedError::UnimplementedError(const std::string 9985 &msg_, const std::string &context_=std::string(), int errno_=0) 9986 9987 Parameters: 9988 ----------- 9989 9990 msg_: Message giving details of the error, intended for human 9991 consumption. 9992 9993 context_: Optional context information for this error. 9994 9995 errno_: Optional errno value associated with this error. "; 9996 9997 %feature("docstring") Xapian::UnimplementedError::UnimplementedError 9998 " 9999 10000 Construct from message and errno value. 10001 10002 Xapian::UnimplementedError::UnimplementedError(const std::string 10003 &msg_, int errno_) 10004 10005 Parameters: 10006 ----------- 10007 10008 msg_: Message giving details of the error, intended for human 10009 consumption. 10010 10011 errno_: Optional errno value associated with this error. "; 10012 10013 10014 // File: classXapian_1_1Utf8Iterator.xml 10015 %feature("docstring") Xapian::Utf8Iterator " 10016 10017 An iterator which returns Unicode character values from a UTF-8 10018 encoded string. "; 10019 10020 %feature("docstring") Xapian::Utf8Iterator::raw " 10021 10022 Return the raw const char* pointer for the current position. 10023 10024 const char* Xapian::Utf8Iterator::raw() const "; 10025 10026 %feature("docstring") Xapian::Utf8Iterator::left " 10027 10028 Return the number of bytes left in the iterator's buffer. 10029 10030 size_t Xapian::Utf8Iterator::left() const "; 10031 10032 %feature("docstring") Xapian::Utf8Iterator::assign " 10033 10034 Assign a new string to the iterator. 10035 10036 void Xapian::Utf8Iterator::assign(const char *p_, size_t len) 10037 10038 The iterator will forget the string it was iterating through, and 10039 return characters from the start of the new string when next called. 10040 The string is not copied into the iterator, so it must remain valid 10041 while the iteration is in progress. 10042 10043 Parameters: 10044 ----------- 10045 10046 p_: A pointer to the start of the string to read. 10047 10048 len: The length of the string to read. "; 10049 10050 %feature("docstring") Xapian::Utf8Iterator::assign " 10051 10052 Assign a new string to the iterator. 10053 10054 void Xapian::Utf8Iterator::assign(const std::string &s) 10055 10056 The iterator will forget the string it was iterating through, and 10057 return characters from the start of the new string when next called. 10058 The string is not copied into the iterator, so it must remain valid 10059 while the iteration is in progress. 10060 10061 Parameters: 10062 ----------- 10063 10064 s: The string to read. Must not be modified while the iteration is in 10065 progress. "; 10066 10067 %feature("docstring") Xapian::Utf8Iterator::Utf8Iterator " 10068 10069 Create an iterator given a pointer to a null terminated string. 10070 10071 Xapian::Utf8Iterator::Utf8Iterator(const char *p_) 10072 10073 The iterator will return characters from the start of the string when 10074 next called. The string is not copied into the iterator, so it must 10075 remain valid while the iteration is in progress. 10076 10077 Parameters: 10078 ----------- 10079 10080 p_: A pointer to the start of the null terminated string to read. "; 10081 10082 %feature("docstring") Xapian::Utf8Iterator::Utf8Iterator " 10083 10084 Create an iterator given a pointer and a length. 10085 10086 Xapian::Utf8Iterator::Utf8Iterator(const char *p_, size_t len) 10087 10088 The iterator will return characters from the start of the string when 10089 next called. The string is not copied into the iterator, so it must 10090 remain valid while the iteration is in progress. 10091 10092 Parameters: 10093 ----------- 10094 10095 p_: A pointer to the start of the string to read. 10096 10097 len: The length of the string to read. "; 10098 10099 %feature("docstring") Xapian::Utf8Iterator::Utf8Iterator " 10100 10101 Create an iterator given a string. 10102 10103 Xapian::Utf8Iterator::Utf8Iterator(const std::string &s) 10104 10105 The iterator will return characters from the start of the string when 10106 next called. The string is not copied into the iterator, so it must 10107 remain valid while the iteration is in progress. 10108 10109 Parameters: 10110 ----------- 10111 10112 s: The string to read. Must not be modified while the iteration is in 10113 progress. "; 10114 10115 %feature("docstring") Xapian::Utf8Iterator::Utf8Iterator " 10116 10117 Create an iterator which is at the end of its iteration. 10118 10119 Xapian::Utf8Iterator::Utf8Iterator() 10120 10121 This can be compared to another iterator to check if the other 10122 iterator has reached its end. "; 10123 10124 10125 // File: classXapian_1_1ValueCountMatchSpy.xml 10126 %feature("docstring") Xapian::ValueCountMatchSpy " 10127 10128 Class for counting the frequencies of values in the matching 10129 documents. "; 10130 10131 %feature("docstring") Xapian::ValueCountMatchSpy::ValueCountMatchSpy 10132 " 10133 10134 Construct an empty ValueCountMatchSpy. 10135 10136 Xapian::ValueCountMatchSpy::ValueCountMatchSpy() "; 10137 10138 %feature("docstring") Xapian::ValueCountMatchSpy::ValueCountMatchSpy 10139 " 10140 10141 Construct a MatchSpy which counts the values in a particular slot. 10142 10143 Xapian::ValueCountMatchSpy::ValueCountMatchSpy(Xapian::valueno slot_) 10144 "; 10145 10146 %feature("docstring") Xapian::ValueCountMatchSpy::get_total " 10147 10148 Return the total number of documents tallied. 10149 10150 size_t Xapian::ValueCountMatchSpy::get_total() const "; 10151 10152 %feature("docstring") Xapian::ValueCountMatchSpy::values_begin " 10153 10154 Get an iterator over the values seen in the slot. 10155 10156 TermIterator Xapian::ValueCountMatchSpy::values_begin() const 10157 10158 Items will be returned in ascending alphabetical order. 10159 10160 During the iteration, the frequency of the current value can be 10161 obtained with the get_termfreq() method on the iterator. "; 10162 10163 %feature("docstring") Xapian::ValueCountMatchSpy::values_end " 10164 10165 End iterator corresponding to values_begin() 10166 10167 TermIterator Xapian::ValueCountMatchSpy::values_end() const "; 10168 10169 %feature("docstring") Xapian::ValueCountMatchSpy::top_values_begin " 10170 10171 Get an iterator over the most frequent values seen in the slot. 10172 10173 TermIterator Xapian::ValueCountMatchSpy::top_values_begin(size_t 10174 maxvalues) const 10175 10176 Items will be returned in descending order of frequency. Values with 10177 the same frequency will be returned in ascending alphabetical order. 10178 10179 During the iteration, the frequency of the current value can be 10180 obtained with the get_termfreq() method on the iterator. 10181 10182 Parameters: 10183 ----------- 10184 10185 maxvalues: The maximum number of values to return. "; 10186 10187 %feature("docstring") Xapian::ValueCountMatchSpy::top_values_end " 10188 10189 End iterator corresponding to top_values_begin() 10190 10191 TermIterator Xapian::ValueCountMatchSpy::top_values_end(size_t) const 10192 "; 10193 10194 %feature("docstring") Xapian::ValueCountMatchSpy::clone " 10195 10196 Clone the match spy. 10197 10198 virtual MatchSpy* Xapian::ValueCountMatchSpy::clone() const 10199 10200 The clone should inherit the configuration of the parent, but need not 10201 inherit the state. ie, the clone does not need to be passed 10202 information about the results seen by the parent. 10203 10204 If you don't want to support the remote backend in your match spy, you 10205 can use the default implementation which simply throws 10206 Xapian::UnimplementedError. 10207 10208 Note that the returned object will be deallocated by Xapian after use 10209 with \"delete\". If you want to handle the deletion in a special way 10210 (for example when wrapping the Xapian API for use from another 10211 language) then you can define a static operator delete method in your 10212 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 10213 10214 %feature("docstring") Xapian::ValueCountMatchSpy::name " 10215 10216 Return the name of this match spy. 10217 10218 virtual std::string Xapian::ValueCountMatchSpy::name() const 10219 10220 This name is used by the remote backend. It is passed with the 10221 serialised parameters to the remote server so that it knows which 10222 class to create. 10223 10224 Return the full namespace-qualified name of your class here - if your 10225 class is called MyApp::FooMatchSpy, return \"MyApp::FooMatchSpy\" from 10226 this method. 10227 10228 If you don't want to support the remote backend in your match spy, you 10229 can use the default implementation which simply throws 10230 Xapian::UnimplementedError. "; 10231 10232 %feature("docstring") Xapian::ValueCountMatchSpy::serialise " 10233 10234 Return this object's parameters serialised as a single string. 10235 10236 virtual std::string Xapian::ValueCountMatchSpy::serialise() const 10237 10238 If you don't want to support the remote backend in your match spy, you 10239 can use the default implementation which simply throws 10240 Xapian::UnimplementedError. "; 10241 10242 %feature("docstring") Xapian::ValueCountMatchSpy::unserialise " 10243 10244 Unserialise parameters. 10245 10246 virtual MatchSpy* Xapian::ValueCountMatchSpy::unserialise(const 10247 std::string &serialised, const Registry &context) const 10248 10249 This method unserialises parameters serialised by the serialise() 10250 method and allocates and returns a new object initialised with them. 10251 10252 If you don't want to support the remote backend in your match spy, you 10253 can use the default implementation which simply throws 10254 Xapian::UnimplementedError. 10255 10256 Note that the returned object will be deallocated by Xapian after use 10257 with \"delete\". If you want to handle the deletion in a special way 10258 (for example when wrapping the Xapian API for use from another 10259 language) then you can define a static operator delete method in your 10260 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 10261 10262 Parameters: 10263 ----------- 10264 10265 serialised: A string containing the serialised results. 10266 10267 context: Registry object to use for unserialisation to permit 10268 MatchSpy subclasses with sub-MatchSpy objects to be implemented. "; 10269 10270 %feature("docstring") Xapian::ValueCountMatchSpy::serialise_results " 10271 10272 Serialise the results of this match spy. 10273 10274 virtual std::string Xapian::ValueCountMatchSpy::serialise_results() 10275 const 10276 10277 If you don't want to support the remote backend in your match spy, you 10278 can use the default implementation which simply throws 10279 Xapian::UnimplementedError. "; 10280 10281 %feature("docstring") Xapian::ValueCountMatchSpy::merge_results " 10282 10283 Unserialise some results, and merge them into this matchspy. 10284 10285 virtual void Xapian::ValueCountMatchSpy::merge_results(const 10286 std::string &serialised) 10287 10288 The order in which results are merged should not be significant, since 10289 this order is not specified (and will vary depending on the speed of 10290 the search in each sub-database). 10291 10292 If you don't want to support the remote backend in your match spy, you 10293 can use the default implementation which simply throws 10294 Xapian::UnimplementedError. 10295 10296 Parameters: 10297 ----------- 10298 10299 serialised: A string containing the serialised results. "; 10300 10301 %feature("docstring") Xapian::ValueCountMatchSpy::get_description " 10302 10303 Return a string describing this object. 10304 10305 virtual std::string Xapian::ValueCountMatchSpy::get_description() 10306 const 10307 10308 This default implementation returns a generic answer, to avoid forcing 10309 those deriving their own MatchSpy subclasses from having to implement 10310 this (they may not care what get_description() gives for their 10311 subclass). "; 10312 10313 10314 // File: classXapian_1_1ValueIterator.xml 10315 %feature("docstring") Xapian::ValueIterator " 10316 10317 Class for iterating over document values. "; 10318 10319 %feature("docstring") Xapian::ValueIterator::ValueIterator " 10320 10321 Copy constructor. 10322 10323 Xapian::ValueIterator::ValueIterator(const ValueIterator &o) "; 10324 10325 %feature("docstring") Xapian::ValueIterator::ValueIterator " 10326 10327 Default constructor. 10328 10329 Xapian::ValueIterator::ValueIterator() 10330 10331 Creates an uninitialised iterator, which can't be used before being 10332 assigned to, but is sometimes syntactically convenient. "; 10333 10334 %feature("docstring") Xapian::ValueIterator::~ValueIterator " 10335 10336 Destructor. 10337 10338 Xapian::ValueIterator::~ValueIterator() "; 10339 10340 %feature("docstring") Xapian::ValueIterator::get_docid " 10341 10342 Return the docid at the current position. 10343 10344 Xapian::docid Xapian::ValueIterator::get_docid() const 10345 10346 If we're iterating over values of a document, this method will throw 10347 Xapian::InvalidOperationError. "; 10348 10349 %feature("docstring") Xapian::ValueIterator::get_valueno " 10350 10351 Return the value slot number for the current position. 10352 10353 Xapian::valueno Xapian::ValueIterator::get_valueno() const 10354 10355 If the iterator is over all values in a slot, this returns that slot's 10356 number. If the iterator is over the values in a particular document, 10357 it returns the number of each slot in turn. "; 10358 10359 %feature("docstring") Xapian::ValueIterator::skip_to " 10360 10361 Advance the iterator to document id or value slot docid_or_slot. 10362 10363 void Xapian::ValueIterator::skip_to(Xapian::docid docid_or_slot) 10364 10365 If this iterator is over values in a document, then this method 10366 advances the iterator to value slot docid_or_slot, or the first slot 10367 after it if there is no value in slot slot. 10368 10369 If this iterator is over values in a particular slot, then this method 10370 advances the iterator to document id docid_or_slot, or the first 10371 document id after it if there is no value in the slot we're iterating 10372 over for document docid_or_slot. 10373 10374 Note: The \"two-faced\" nature of this method is due to how C++ 10375 overloading works. Xapian::docid and Xapian::valueno are both typedefs 10376 for the same unsigned integer type, so overloading can't distinguish 10377 them. 10378 10379 Parameters: 10380 ----------- 10381 10382 docid_or_slot: The docid/slot to advance to. "; 10383 10384 %feature("docstring") Xapian::ValueIterator::check " 10385 10386 Check if the specified docid occurs. 10387 10388 bool Xapian::ValueIterator::check(Xapian::docid docid) 10389 10390 The caller is required to ensure that the specified document id did 10391 actually exists in the database. 10392 10393 This method acts like skip_to() if that can be done at little extra 10394 cost, in which case it then returns true. This is how chert and glass 10395 databases behave because they store values in streams which allow for 10396 an efficient implementation of skip_to(). 10397 10398 Otherwise it simply checks if a particular docid is present. If it is, 10399 it returns true. If it isn't, it returns false, and leaves the 10400 position unspecified (and hence the result of calling methods which 10401 depend on the current position, such as get_docid(), are also 10402 unspecified). In this state, next() will advance to the first matching 10403 position after document did, and skip_to() will act as it would if the 10404 position was the first matching position after document did. 10405 10406 Currently the inmemory and remote backends behave in the latter way 10407 because they don't support streamed values and so skip_to() must check 10408 each document it skips over which is significantly slower. 10409 10410 Parameters: 10411 ----------- 10412 10413 docid: The document id to check. "; 10414 10415 %feature("docstring") Xapian::ValueIterator::get_description " 10416 10417 Return a string describing this object. 10418 10419 std::string Xapian::ValueIterator::get_description() const "; 10420 10421 10422 // File: classXapian_1_1ValueMapPostingSource.xml 10423 %feature("docstring") Xapian::ValueMapPostingSource " 10424 10425 A posting source which looks up weights in a map using values as the 10426 key. 10427 10428 This allows will return entries for all documents in the given 10429 database which have a value in the slot specified. The values will be 10430 mapped to the corresponding weight in the weight map. If there is no 10431 mapping for a particular value, the default weight will be returned 10432 (which itself defaults to 0.0). "; 10433 10434 %feature("docstring") 10435 Xapian::ValueMapPostingSource::ValueMapPostingSource " 10436 10437 Construct a ValueMapPostingSource. 10438 10439 Xapian::ValueMapPostingSource::ValueMapPostingSource(Xapian::valueno 10440 slot_) 10441 10442 Parameters: 10443 ----------- 10444 10445 slot_: The value slot to read values from. "; 10446 10447 %feature("docstring") Xapian::ValueMapPostingSource::add_mapping " 10448 10449 Add a mapping. 10450 10451 void Xapian::ValueMapPostingSource::add_mapping(const std::string 10452 &key, double wt) 10453 10454 Parameters: 10455 ----------- 10456 10457 key: The key looked up from the value slot. 10458 10459 wt: The weight to give this key. "; 10460 10461 %feature("docstring") Xapian::ValueMapPostingSource::clear_mappings " 10462 10463 Clear all mappings. 10464 10465 void Xapian::ValueMapPostingSource::clear_mappings() "; 10466 10467 %feature("docstring") 10468 Xapian::ValueMapPostingSource::set_default_weight " 10469 10470 Set a default weight for document values not in the map. 10471 10472 void Xapian::ValueMapPostingSource::set_default_weight(double wt) 10473 10474 Parameters: 10475 ----------- 10476 10477 wt: The weight to set as the default. "; 10478 10479 %feature("docstring") Xapian::ValueMapPostingSource::get_weight " 10480 10481 Return the weight contribution for the current document. 10482 10483 double Xapian::ValueMapPostingSource::get_weight() const 10484 10485 This default implementation always returns 0, for convenience when 10486 implementing \"weight-less\" PostingSource subclasses. 10487 10488 This method may assume that it will only be called when there is a 10489 \"current document\". In detail: Xapian will always call init() on a 10490 PostingSource before calling this for the first time. It will also 10491 only call this if the PostingSource reports that it is pointing to a 10492 valid document (ie, it will not call it before calling at least one of 10493 next(), skip_to() or check(), and will ensure that the PostingSource 10494 is not at the end by calling at_end()). "; 10495 10496 %feature("docstring") Xapian::ValueMapPostingSource::clone " 10497 10498 Clone the posting source. 10499 10500 ValueMapPostingSource* Xapian::ValueMapPostingSource::clone() const 10501 10502 The clone should inherit the configuration of the parent, but need not 10503 inherit the state. ie, the clone does not need to be in the same 10504 iteration position as the original: the matcher will always call 10505 init() on the clone before attempting to move the iterator, or read 10506 the information about the current position of the iterator. 10507 10508 This may return NULL to indicate that cloning is not supported. In 10509 this case, the PostingSource may only be used with a single-database 10510 search. 10511 10512 The default implementation returns NULL. 10513 10514 Note that the returned object will be deallocated by Xapian after use 10515 with \"delete\". If you want to handle the deletion in a special way 10516 (for example when wrapping the Xapian API for use from another 10517 language) then you can define a static operator delete method in your 10518 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 10519 10520 %feature("docstring") Xapian::ValueMapPostingSource::name " 10521 10522 Name of the posting source class. 10523 10524 std::string Xapian::ValueMapPostingSource::name() const 10525 10526 This is used when serialising and unserialising posting sources; for 10527 example, for performing remote searches. 10528 10529 If the subclass is in a C++ namespace, the namespace should be 10530 included in the name, using \"::\" as a separator. For example, for a 10531 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 10532 namespace the result of this call should be 10533 \"Xapian::FooPostingSource\". 10534 10535 This should only be implemented if serialise() and unserialise() are 10536 also implemented. The default implementation returns an empty string. 10537 10538 If this returns an empty string, Xapian will assume that serialise() 10539 and unserialise() are not implemented. "; 10540 10541 %feature("docstring") Xapian::ValueMapPostingSource::serialise " 10542 10543 Serialise object parameters into a string. 10544 10545 std::string Xapian::ValueMapPostingSource::serialise() const 10546 10547 The serialised parameters should represent the configuration of the 10548 posting source, but need not (indeed, should not) represent the 10549 current iteration state. 10550 10551 If you don't want to support the remote backend, you can use the 10552 default implementation which simply throws Xapian::UnimplementedError. 10553 "; 10554 10555 %feature("docstring") Xapian::ValueMapPostingSource::unserialise " 10556 10557 Create object given string serialisation returned by serialise(). 10558 10559 ValueMapPostingSource* 10560 Xapian::ValueMapPostingSource::unserialise(const std::string 10561 &serialised) const 10562 10563 Note that the returned object will be deallocated by Xapian after use 10564 with \"delete\". If you want to handle the deletion in a special way 10565 (for example when wrapping the Xapian API for use from another 10566 language) then you can define a static operator delete method in your 10567 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 10568 10569 If you don't want to support the remote backend, you can use the 10570 default implementation which simply throws Xapian::UnimplementedError. 10571 10572 Parameters: 10573 ----------- 10574 10575 serialised: A serialised instance of this PostingSource subclass. "; 10576 10577 %feature("docstring") Xapian::ValueMapPostingSource::init " 10578 10579 Set this PostingSource to the start of the list of postings. 10580 10581 void Xapian::ValueMapPostingSource::init(const Database &db_) 10582 10583 This is called automatically by the matcher prior to each query being 10584 processed. 10585 10586 If a PostingSource is used for multiple searches, init() will 10587 therefore be called multiple times, and must handle this by using the 10588 database passed in the most recent call. 10589 10590 Parameters: 10591 ----------- 10592 10593 db: The database which the PostingSource should iterate through. 10594 10595 Note: in the case of a multi-database search, a separate PostingSource 10596 will be used for each database (the separate PostingSources will be 10597 obtained using clone()), and each PostingSource will be passed one of 10598 the sub-databases as the db parameter here. The db parameter will 10599 therefore always refer to a single database. All docids passed to, or 10600 returned from, the PostingSource refer to docids in that single 10601 database, rather than in the multi- database. "; 10602 10603 %feature("docstring") Xapian::ValueMapPostingSource::get_description 10604 " 10605 10606 Return a string describing this object. 10607 10608 std::string Xapian::ValueMapPostingSource::get_description() const 10609 10610 This default implementation returns a generic answer. This default it 10611 provided to avoid forcing those deriving their own PostingSource 10612 subclass from having to implement this (they may not care what 10613 get_description() gives for their subclass). "; 10614 10615 10616 // File: classXapian_1_1ValuePostingSource.xml 10617 %feature("docstring") Xapian::ValuePostingSource " 10618 10619 A posting source which generates weights from a value slot. 10620 10621 This is a base class for classes which generate weights using values 10622 stored in the specified slot. For example, ValueWeightPostingSource 10623 uses sortable_unserialise to convert values directly to weights. 10624 10625 The upper bound on the weight returned is set to DBL_MAX. Subclasses 10626 should call set_maxweight() in their init() methods after calling 10627 ValuePostingSource::init() if they know a tighter bound on the weight. 10628 "; 10629 10630 %feature("docstring") Xapian::ValuePostingSource::ValuePostingSource 10631 " 10632 10633 Construct a ValuePostingSource. 10634 10635 Xapian::ValuePostingSource::ValuePostingSource(Xapian::valueno slot_) 10636 10637 Parameters: 10638 ----------- 10639 10640 slot_: The value slot to read values from. "; 10641 10642 %feature("docstring") Xapian::ValuePostingSource::get_termfreq_min " 10643 10644 A lower bound on the number of documents this object can return. 10645 10646 Xapian::doccount Xapian::ValuePostingSource::get_termfreq_min() const 10647 10648 Xapian will always call init() on a PostingSource before calling this 10649 for the first time. "; 10650 10651 %feature("docstring") Xapian::ValuePostingSource::get_termfreq_est " 10652 10653 An estimate of the number of documents this object can return. 10654 10655 Xapian::doccount Xapian::ValuePostingSource::get_termfreq_est() const 10656 10657 It must always be true that: 10658 10659 get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max() 10660 10661 Xapian will always call init() on a PostingSource before calling this 10662 for the first time. "; 10663 10664 %feature("docstring") Xapian::ValuePostingSource::get_termfreq_max " 10665 10666 An upper bound on the number of documents this object can return. 10667 10668 Xapian::doccount Xapian::ValuePostingSource::get_termfreq_max() const 10669 10670 Xapian will always call init() on a PostingSource before calling this 10671 for the first time. "; 10672 10673 %feature("docstring") Xapian::ValuePostingSource::next " 10674 10675 Advance the current position to the next matching document. 10676 10677 void Xapian::ValuePostingSource::next(double min_wt) 10678 10679 The PostingSource starts before the first entry in the list, so 10680 next(), skip_to() or check() must be called before any methods which 10681 need the context of the current position. 10682 10683 Xapian will always call init() on a PostingSource before calling this 10684 for the first time. 10685 10686 Parameters: 10687 ----------- 10688 10689 min_wt: The minimum weight contribution that is needed (this is just 10690 a hint which subclasses may ignore). "; 10691 10692 %feature("docstring") Xapian::ValuePostingSource::skip_to " 10693 10694 Advance to the specified docid. 10695 10696 void Xapian::ValuePostingSource::skip_to(Xapian::docid min_docid, 10697 double min_wt) 10698 10699 If the specified docid isn't in the list, position ourselves on the 10700 first document after it (or at_end() if no greater docids are 10701 present). 10702 10703 If the current position is already the specified docid, this method 10704 will leave the position unmodified. 10705 10706 If the specified docid is earlier than the current position, the 10707 behaviour is unspecified. A sensible behaviour would be to leave the 10708 current position unmodified, but it is also reasonable to move to the 10709 specified docid. 10710 10711 The default implementation calls next() repeatedly, which works but 10712 skip_to() can often be implemented much more efficiently. 10713 10714 Xapian will always call init() on a PostingSource before calling this 10715 for the first time. 10716 10717 Note: in the case of a multi-database search, the docid specified is 10718 the docid in the single subdatabase relevant to this posting source. 10719 See the init() method for details. 10720 10721 Parameters: 10722 ----------- 10723 10724 did: The document id to advance to. 10725 10726 min_wt: The minimum weight contribution that is needed (this is just 10727 a hint which subclasses may ignore). "; 10728 10729 %feature("docstring") Xapian::ValuePostingSource::check " 10730 10731 Check if the specified docid occurs. 10732 10733 bool Xapian::ValuePostingSource::check(Xapian::docid min_docid, double 10734 min_wt) 10735 10736 The caller is required to ensure that the specified document id did 10737 actually exists in the database. If it does, it must move to that 10738 document id, and return true. If it does not, it may either: 10739 10740 return true, having moved to a definite position (including 10741 \"at_end\"), which must be the same position as skip_to() would have 10742 moved to. 10743 10744 or 10745 10746 return false, having moved to an \"indeterminate\" position, such that 10747 a subsequent call to next() or skip_to() will move to the next 10748 matching position after did. 10749 10750 Generally, this method should act like skip_to() and return true if 10751 that can be done at little extra cost. 10752 10753 Otherwise it should simply check if a particular docid is present, 10754 returning true if it is, and false if it isn't. 10755 10756 The default implementation calls skip_to() and always returns true. 10757 10758 Xapian will always call init() on a PostingSource before calling this 10759 for the first time. 10760 10761 Note: in the case of a multi-database search, the docid specified is 10762 the docid in the single subdatabase relevant to this posting source. 10763 See the init() method for details. 10764 10765 Parameters: 10766 ----------- 10767 10768 did: The document id to check. 10769 10770 min_wt: The minimum weight contribution that is needed (this is just 10771 a hint which subclasses may ignore). "; 10772 10773 %feature("docstring") Xapian::ValuePostingSource::at_end " 10774 10775 Return true if the current position is past the last entry in this 10776 list. 10777 10778 bool Xapian::ValuePostingSource::at_end() const 10779 10780 At least one of next(), skip_to() or check() will be called before 10781 this method is first called. "; 10782 10783 %feature("docstring") Xapian::ValuePostingSource::get_docid " 10784 10785 Return the current docid. 10786 10787 Xapian::docid Xapian::ValuePostingSource::get_docid() const 10788 10789 This method may assume that it will only be called when there is a 10790 \"current document\". See get_weight() for details. 10791 10792 Note: in the case of a multi-database search, the returned docid 10793 should be in the single subdatabase relevant to this posting source. 10794 See the init() method for details. "; 10795 10796 %feature("docstring") Xapian::ValuePostingSource::init " 10797 10798 Set this PostingSource to the start of the list of postings. 10799 10800 void Xapian::ValuePostingSource::init(const Database &db_) 10801 10802 This is called automatically by the matcher prior to each query being 10803 processed. 10804 10805 If a PostingSource is used for multiple searches, init() will 10806 therefore be called multiple times, and must handle this by using the 10807 database passed in the most recent call. 10808 10809 Parameters: 10810 ----------- 10811 10812 db: The database which the PostingSource should iterate through. 10813 10814 Note: in the case of a multi-database search, a separate PostingSource 10815 will be used for each database (the separate PostingSources will be 10816 obtained using clone()), and each PostingSource will be passed one of 10817 the sub-databases as the db parameter here. The db parameter will 10818 therefore always refer to a single database. All docids passed to, or 10819 returned from, the PostingSource refer to docids in that single 10820 database, rather than in the multi- database. "; 10821 10822 %feature("docstring") Xapian::ValuePostingSource::get_database " 10823 10824 The database we're reading values from. 10825 10826 Xapian::Database Xapian::ValuePostingSource::get_database() const 10827 10828 Added in 1.2.23 and 1.3.5. "; 10829 10830 %feature("docstring") Xapian::ValuePostingSource::get_slot " 10831 10832 The slot we're reading values from. 10833 10834 Xapian::valueno Xapian::ValuePostingSource::get_slot() const 10835 10836 Added in 1.2.23 and 1.3.5. "; 10837 10838 %feature("docstring") Xapian::ValuePostingSource::get_value " 10839 10840 Read current value. 10841 10842 std::string Xapian::ValuePostingSource::get_value() const 10843 10844 Added in 1.2.23 and 1.3.5. "; 10845 10846 %feature("docstring") Xapian::ValuePostingSource::done " 10847 10848 End the iteration. 10849 10850 void Xapian::ValuePostingSource::done() 10851 10852 Calls to at_end() will return true after calling this method. 10853 10854 Added in 1.2.23 and 1.3.5. "; 10855 10856 %feature("docstring") Xapian::ValuePostingSource::get_started " 10857 10858 Flag indicating if we've started (true if we have). 10859 10860 bool Xapian::ValuePostingSource::get_started() const 10861 10862 Added in 1.2.23 and 1.3.5. "; 10863 10864 %feature("docstring") Xapian::ValuePostingSource::set_termfreq_min " 10865 10866 Set a lower bound on the term frequency. 10867 10868 void Xapian::ValuePostingSource::set_termfreq_min(Xapian::doccount 10869 termfreq_min_) 10870 10871 Subclasses should set this if they are overriding the next(), 10872 skip_to() or check() methods to return fewer documents. 10873 10874 Added in 1.2.23 and 1.3.5. "; 10875 10876 %feature("docstring") Xapian::ValuePostingSource::set_termfreq_est " 10877 10878 An estimate of the term frequency. 10879 10880 void Xapian::ValuePostingSource::set_termfreq_est(Xapian::doccount 10881 termfreq_est_) 10882 10883 Subclasses should set this if they are overriding the next(), 10884 skip_to() or check() methods. 10885 10886 Added in 1.2.23 and 1.3.5. "; 10887 10888 %feature("docstring") Xapian::ValuePostingSource::set_termfreq_max " 10889 10890 An upper bound on the term frequency. 10891 10892 void Xapian::ValuePostingSource::set_termfreq_max(Xapian::doccount 10893 termfreq_max_) 10894 10895 Subclasses should set this if they are overriding the next(), 10896 skip_to() or check() methods. 10897 10898 Added in 1.2.23 and 1.3.5. "; 10899 10900 10901 // File: classXapian_1_1ValueRangeProcessor.xml 10902 %feature("docstring") Xapian::ValueRangeProcessor " 10903 10904 Base class for value range processors. "; 10905 10906 %feature("docstring") 10907 Xapian::ValueRangeProcessor::ValueRangeProcessor " 10908 10909 Default constructor. 10910 10911 Xapian::ValueRangeProcessor::ValueRangeProcessor() "; 10912 10913 %feature("docstring") 10914 Xapian::ValueRangeProcessor::~ValueRangeProcessor " 10915 10916 Destructor. 10917 10918 virtual Xapian::ValueRangeProcessor::~ValueRangeProcessor() "; 10919 10920 %feature("docstring") Xapian::ValueRangeProcessor::release " 10921 10922 Start reference counting this object. 10923 10924 ValueRangeProcessor* Xapian::ValueRangeProcessor::release() 10925 10926 You can hand ownership of a dynamically allocated ValueRangeProcessor 10927 object to Xapian by calling release() and then passing the object to a 10928 Xapian method. Xapian will arrange to delete the object once it is no 10929 longer required. "; 10930 10931 %feature("docstring") Xapian::ValueRangeProcessor::release " 10932 10933 Start reference counting this object. 10934 10935 const ValueRangeProcessor* Xapian::ValueRangeProcessor::release() 10936 const 10937 10938 You can hand ownership of a dynamically allocated ValueRangeProcessor 10939 object to Xapian by calling release() and then passing the object to a 10940 Xapian method. Xapian will arrange to delete the object once it is no 10941 longer required. "; 10942 10943 10944 // File: classXapian_1_1ValueSetMatchDecider.xml 10945 %feature("docstring") Xapian::ValueSetMatchDecider " 10946 10947 MatchDecider filtering results based on whether document values are in 10948 a user- defined set. "; 10949 10950 %feature("docstring") 10951 Xapian::ValueSetMatchDecider::ValueSetMatchDecider " 10952 10953 Construct a ValueSetMatchDecider. 10954 10955 Xapian::ValueSetMatchDecider::ValueSetMatchDecider(Xapian::valueno 10956 slot, bool inclusive_) 10957 10958 Parameters: 10959 ----------- 10960 10961 slot: The value slot number to look in. 10962 10963 inclusive_: If true, match decider accepts documents which have a 10964 value in the specified slot which is a member of the test set; if 10965 false, match decider accepts documents which do not have a value in 10966 the specified slot. "; 10967 10968 %feature("docstring") Xapian::ValueSetMatchDecider::add_value " 10969 10970 Add a value to the test set. 10971 10972 void Xapian::ValueSetMatchDecider::add_value(const std::string &value) 10973 10974 Parameters: 10975 ----------- 10976 10977 value: The value to add to the test set. "; 10978 10979 %feature("docstring") Xapian::ValueSetMatchDecider::remove_value " 10980 10981 Remove a value from the test set. 10982 10983 void Xapian::ValueSetMatchDecider::remove_value(const std::string 10984 &value) 10985 10986 Parameters: 10987 ----------- 10988 10989 value: The value to remove from the test set. "; 10990 10991 10992 // File: classXapian_1_1ValueWeightPostingSource.xml 10993 %feature("docstring") Xapian::ValueWeightPostingSource " 10994 10995 A posting source which reads weights from a value slot. 10996 10997 This returns entries for all documents in the given database which 10998 have a non empty values in the specified slot. It returns a weight 10999 calculated by applying sortable_unserialise to the value stored in the 11000 slot (so the values stored should probably have been calculated by 11001 applying sortable_serialise to a floating point number at index time). 11002 11003 The upper bound on the weight returned is set using the upper bound on 11004 the values in the specified slot, or DBL_MAX if value bounds aren't 11005 supported by the current backend. 11006 11007 For efficiency, this posting source doesn't check that the stored 11008 values are valid in any way, so it will never raise an exception due 11009 to invalid stored values. In particular, it doesn't ensure that the 11010 unserialised values are positive, which is a requirement for weights. 11011 The behaviour if the slot contains values which unserialise to 11012 negative values is undefined. "; 11013 11014 %feature("docstring") 11015 Xapian::ValueWeightPostingSource::ValueWeightPostingSource " 11016 11017 Construct a ValueWeightPostingSource. 11018 11019 Xapian::ValueWeightPostingSource::ValueWeightPostingSource(Xapian::valueno 11020 slot_) 11021 11022 Parameters: 11023 ----------- 11024 11025 slot_: The value slot to read values from. "; 11026 11027 %feature("docstring") Xapian::ValueWeightPostingSource::get_weight " 11028 11029 Return the weight contribution for the current document. 11030 11031 double Xapian::ValueWeightPostingSource::get_weight() const 11032 11033 This default implementation always returns 0, for convenience when 11034 implementing \"weight-less\" PostingSource subclasses. 11035 11036 This method may assume that it will only be called when there is a 11037 \"current document\". In detail: Xapian will always call init() on a 11038 PostingSource before calling this for the first time. It will also 11039 only call this if the PostingSource reports that it is pointing to a 11040 valid document (ie, it will not call it before calling at least one of 11041 next(), skip_to() or check(), and will ensure that the PostingSource 11042 is not at the end by calling at_end()). "; 11043 11044 %feature("docstring") Xapian::ValueWeightPostingSource::clone " 11045 11046 Clone the posting source. 11047 11048 ValueWeightPostingSource* Xapian::ValueWeightPostingSource::clone() 11049 const 11050 11051 The clone should inherit the configuration of the parent, but need not 11052 inherit the state. ie, the clone does not need to be in the same 11053 iteration position as the original: the matcher will always call 11054 init() on the clone before attempting to move the iterator, or read 11055 the information about the current position of the iterator. 11056 11057 This may return NULL to indicate that cloning is not supported. In 11058 this case, the PostingSource may only be used with a single-database 11059 search. 11060 11061 The default implementation returns NULL. 11062 11063 Note that the returned object will be deallocated by Xapian after use 11064 with \"delete\". If you want to handle the deletion in a special way 11065 (for example when wrapping the Xapian API for use from another 11066 language) then you can define a static operator delete method in your 11067 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 11068 11069 %feature("docstring") Xapian::ValueWeightPostingSource::name " 11070 11071 Name of the posting source class. 11072 11073 std::string Xapian::ValueWeightPostingSource::name() const 11074 11075 This is used when serialising and unserialising posting sources; for 11076 example, for performing remote searches. 11077 11078 If the subclass is in a C++ namespace, the namespace should be 11079 included in the name, using \"::\" as a separator. For example, for a 11080 PostingSource subclass called \"FooPostingSource\" in the \"Xapian\" 11081 namespace the result of this call should be 11082 \"Xapian::FooPostingSource\". 11083 11084 This should only be implemented if serialise() and unserialise() are 11085 also implemented. The default implementation returns an empty string. 11086 11087 If this returns an empty string, Xapian will assume that serialise() 11088 and unserialise() are not implemented. "; 11089 11090 %feature("docstring") Xapian::ValueWeightPostingSource::serialise " 11091 11092 Serialise object parameters into a string. 11093 11094 std::string Xapian::ValueWeightPostingSource::serialise() const 11095 11096 The serialised parameters should represent the configuration of the 11097 posting source, but need not (indeed, should not) represent the 11098 current iteration state. 11099 11100 If you don't want to support the remote backend, you can use the 11101 default implementation which simply throws Xapian::UnimplementedError. 11102 "; 11103 11104 %feature("docstring") Xapian::ValueWeightPostingSource::unserialise " 11105 11106 Create object given string serialisation returned by serialise(). 11107 11108 ValueWeightPostingSource* 11109 Xapian::ValueWeightPostingSource::unserialise(const std::string 11110 &serialised) const 11111 11112 Note that the returned object will be deallocated by Xapian after use 11113 with \"delete\". If you want to handle the deletion in a special way 11114 (for example when wrapping the Xapian API for use from another 11115 language) then you can define a static operator delete method in your 11116 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 11117 11118 If you don't want to support the remote backend, you can use the 11119 default implementation which simply throws Xapian::UnimplementedError. 11120 11121 Parameters: 11122 ----------- 11123 11124 serialised: A serialised instance of this PostingSource subclass. "; 11125 11126 %feature("docstring") Xapian::ValueWeightPostingSource::init " 11127 11128 Set this PostingSource to the start of the list of postings. 11129 11130 void Xapian::ValueWeightPostingSource::init(const Database &db_) 11131 11132 This is called automatically by the matcher prior to each query being 11133 processed. 11134 11135 If a PostingSource is used for multiple searches, init() will 11136 therefore be called multiple times, and must handle this by using the 11137 database passed in the most recent call. 11138 11139 Parameters: 11140 ----------- 11141 11142 db: The database which the PostingSource should iterate through. 11143 11144 Note: in the case of a multi-database search, a separate PostingSource 11145 will be used for each database (the separate PostingSources will be 11146 obtained using clone()), and each PostingSource will be passed one of 11147 the sub-databases as the db parameter here. The db parameter will 11148 therefore always refer to a single database. All docids passed to, or 11149 returned from, the PostingSource refer to docids in that single 11150 database, rather than in the multi- database. "; 11151 11152 %feature("docstring") 11153 Xapian::ValueWeightPostingSource::get_description " 11154 11155 Return a string describing this object. 11156 11157 std::string Xapian::ValueWeightPostingSource::get_description() const 11158 11159 This default implementation returns a generic answer. This default it 11160 provided to avoid forcing those deriving their own PostingSource 11161 subclass from having to implement this (they may not care what 11162 get_description() gives for their subclass). "; 11163 11164 11165 // File: classXapian_1_1Weight.xml 11166 %feature("docstring") Xapian::Weight " 11167 11168 Abstract base class for weighting schemes. "; 11169 11170 %feature("docstring") Xapian::Weight::Weight " 11171 11172 Default constructor, needed by subclass constructors. 11173 11174 Xapian::Weight::Weight() "; 11175 11176 %feature("docstring") Xapian::Weight::~Weight " 11177 11178 Virtual destructor, because we have virtual methods. 11179 11180 virtual Xapian::Weight::~Weight() "; 11181 11182 %feature("docstring") Xapian::Weight::clone " 11183 11184 Clone this object. 11185 11186 virtual Weight* Xapian::Weight::clone() const =0 11187 11188 This method allocates and returns a copy of the object it is called 11189 on. 11190 11191 If your subclass is called FooWeight and has parameters a and b, then 11192 you would implement FooWeight::clone() like so: 11193 11194 FooWeight * FooWeight::clone() const { return new FooWeight(a, b); } 11195 11196 Note that the returned object will be deallocated by Xapian after use 11197 with \"delete\". If you want to handle the deletion in a special way 11198 (for example when wrapping the Xapian API for use from another 11199 language) then you can define a static operator delete method in your 11200 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 "; 11201 11202 %feature("docstring") Xapian::Weight::name " 11203 11204 Return the name of this weighting scheme. 11205 11206 virtual std::string Xapian::Weight::name() const 11207 11208 This name is used by the remote backend. It is passed along with the 11209 serialised parameters to the remote server so that it knows which 11210 class to create. 11211 11212 Return the full namespace-qualified name of your class here - if your 11213 class is called FooWeight, return \"FooWeight\" from this method ( 11214 Xapian::BM25Weight returns \"Xapian::BM25Weight\" here). 11215 11216 If you don't want to support the remote backend, you can use the 11217 default implementation which simply returns an empty string. "; 11218 11219 %feature("docstring") Xapian::Weight::serialise " 11220 11221 Return this object's parameters serialised as a single string. 11222 11223 virtual std::string Xapian::Weight::serialise() const 11224 11225 If you don't want to support the remote backend, you can use the 11226 default implementation which simply throws Xapian::UnimplementedError. 11227 "; 11228 11229 %feature("docstring") Xapian::Weight::unserialise " 11230 11231 Unserialise parameters. 11232 11233 virtual Weight* Xapian::Weight::unserialise(const std::string 11234 &serialised) const 11235 11236 This method unserialises parameters serialised by the serialise() 11237 method and allocates and returns a new object initialised with them. 11238 11239 If you don't want to support the remote backend, you can use the 11240 default implementation which simply throws Xapian::UnimplementedError. 11241 11242 Note that the returned object will be deallocated by Xapian after use 11243 with \"delete\". If you want to handle the deletion in a special way 11244 (for example when wrapping the Xapian API for use from another 11245 language) then you can define a static operator delete method in your 11246 subclass as shown here:https://trac.xapian.org/ticket/554#comment:1 11247 11248 Parameters: 11249 ----------- 11250 11251 serialised: A string containing the serialised parameters. "; 11252 11253 %feature("docstring") Xapian::Weight::get_sumpart " 11254 11255 Calculate the weight contribution for this object's term to a 11256 document. 11257 11258 virtual double Xapian::Weight::get_sumpart(Xapian::termcount wdf, 11259 Xapian::termcount doclen, Xapian::termcount uniqterms) const =0 11260 11261 The parameters give information about the document which may be used 11262 in the calculations: 11263 11264 Parameters: 11265 ----------- 11266 11267 wdf: The within document frequency of the term in the document. 11268 11269 doclen: The document's length (unnormalised). 11270 11271 uniqterms: Number of unique terms in the document (used for absolute 11272 smoothing). "; 11273 11274 %feature("docstring") Xapian::Weight::get_maxpart " 11275 11276 Return an upper bound on what get_sumpart() can return for any 11277 document. 11278 11279 virtual double Xapian::Weight::get_maxpart() const =0 11280 11281 This information is used by the matcher to perform various 11282 optimisations, so strive to make the bound as tight as possible. "; 11283 11284 %feature("docstring") Xapian::Weight::get_sumextra " 11285 11286 Calculate the term-independent weight component for a document. 11287 11288 virtual double Xapian::Weight::get_sumextra(Xapian::termcount doclen, 11289 Xapian::termcount uniqterms) const =0 11290 11291 The parameter gives information about the document which may be used 11292 in the calculations: 11293 11294 Parameters: 11295 ----------- 11296 11297 doclen: The document's length (unnormalised). 11298 11299 uniqterms: The number of unique terms in the document. "; 11300 11301 %feature("docstring") Xapian::Weight::get_maxextra " 11302 11303 Return an upper bound on what get_sumextra() can return for any 11304 document. 11305 11306 virtual double Xapian::Weight::get_maxextra() const =0 11307 11308 This information is used by the matcher to perform various 11309 optimisations, so strive to make the bound as tight as possible. "; 11310 11311 11312 // File: classXapian_1_1WildcardError.xml 11313 %feature("docstring") Xapian::WildcardError " 11314 11315 WildcardError indicates an error expanding a wildcarded query. "; 11316 11317 %feature("docstring") Xapian::WildcardError::WildcardError " 11318 11319 General purpose constructor. 11320 11321 Xapian::WildcardError::WildcardError(const std::string &msg_, const 11322 std::string &context_=std::string(), int errno_=0) 11323 11324 Parameters: 11325 ----------- 11326 11327 msg_: Message giving details of the error, intended for human 11328 consumption. 11329 11330 context_: Optional context information for this error. 11331 11332 errno_: Optional errno value associated with this error. "; 11333 11334 %feature("docstring") Xapian::WildcardError::WildcardError " 11335 11336 Construct from message and errno value. 11337 11338 Xapian::WildcardError::WildcardError(const std::string &msg_, int 11339 errno_) 11340 11341 Parameters: 11342 ----------- 11343 11344 msg_: Message giving details of the error, intended for human 11345 consumption. 11346 11347 errno_: Optional errno value associated with this error. "; 11348 11349 11350 // File: classXapian_1_1WritableDatabase.xml 11351 %feature("docstring") Xapian::WritableDatabase " 11352 11353 This class provides read/write access to a database. "; 11354 11355 %feature("docstring") Xapian::WritableDatabase::~WritableDatabase " 11356 11357 Destroy this handle on the database. 11358 11359 virtual Xapian::WritableDatabase::~WritableDatabase() 11360 11361 If no other handles to this database remain, the database will be 11362 closed. 11363 11364 If a transaction is active cancel_transaction() will be implicitly 11365 called; if no transaction is active commit() will be implicitly 11366 called, but any exception will be swallowed (because throwing 11367 exceptions in C++ destructors is problematic). If you aren't using 11368 transactions and want to know about any failure to commit changes, 11369 call commit() explicitly before the destructor gets called. "; 11370 11371 %feature("docstring") Xapian::WritableDatabase::WritableDatabase " 11372 11373 Create a WritableDatabase with no subdatabases. 11374 11375 Xapian::WritableDatabase::WritableDatabase() 11376 11377 The created object isn't very useful in this state - it's intended as 11378 a placeholder value. "; 11379 11380 %feature("docstring") Xapian::WritableDatabase::WritableDatabase " 11381 11382 Open a database for update, automatically determining the database 11383 backend to use. 11384 11385 Xapian::WritableDatabase::WritableDatabase(const std::string &path, 11386 int flags=0, int block_size=0) 11387 11388 If the database is to be created, Xapian will try to create the 11389 directory indicated by path if it doesn't already exist (but only the 11390 leaf directory, not recursively). 11391 11392 Parameters: 11393 ----------- 11394 11395 path: directory that the database is stored in. 11396 11397 flags: one of: Xapian::DB_CREATE_OR_OPEN open for read/write; create 11398 if no db exists (the default if flags isn't specified) 11399 11400 Xapian::DB_CREATE create new database; fail if db exists 11401 11402 Xapian::DB_CREATE_OR_OVERWRITE overwrite existing db; create if none 11403 exists 11404 11405 Xapian::DB_OPEN open for read/write; fail if no db exists 11406 11407 Additionally, the following flags can be combined with action using 11408 bitwise-or (| in C++): 11409 11410 Xapian::DB_NO_SYNC don't call fsync() or similar 11411 11412 Xapian::DB_FULL_SYNC try harder to ensure data is safe 11413 11414 Xapian::DB_DANGEROUS don't be crash-safe, no concurrent readers 11415 11416 Xapian::DB_NO_TERMLIST don't use a termlist table 11417 11418 Xapian::DB_RETRY_LOCK to wait to get a write lock 11419 11420 Parameters: 11421 ----------- 11422 11423 block_size: If a new database is created, this specifies the block 11424 size (in bytes) for backends which have such a concept. For chert and 11425 glass, the block size must be a power of 2 between 2048 and 65536 11426 (inclusive), and the default (also used if an invalid value is passed) 11427 is 8192 bytes. 11428 11429 Parameters: 11430 ----------- 11431 11432 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11433 corrupt state. 11434 11435 Xapian::DatabaseLockError: will be thrown if a lock couldn't be 11436 acquired on the database. "; 11437 11438 %feature("docstring") Xapian::WritableDatabase::WritableDatabase " 11439 11440 Copying is allowed. 11441 11442 Xapian::WritableDatabase::WritableDatabase(const WritableDatabase 11443 &other) 11444 11445 The internals are reference counted, so copying is cheap. 11446 11447 Parameters: 11448 ----------- 11449 11450 other: The object to copy. "; 11451 11452 %feature("docstring") Xapian::WritableDatabase::commit " 11453 11454 Commit any pending modifications made to the database. 11455 11456 void Xapian::WritableDatabase::commit() 11457 11458 For efficiency reasons, when performing multiple updates to a database 11459 it is best (indeed, almost essential) to make as many modifications as 11460 memory will permit in a single pass through the database. To ensure 11461 this, Xapian batches up modifications. 11462 11463 This method may be called at any time to commit any pending 11464 modifications to the database. 11465 11466 If any of the modifications fail, an exception will be thrown and the 11467 database will be left in a state in which each separate addition, 11468 replacement or deletion operation has either been fully performed or 11469 not performed at all: it is then up to the application to work out 11470 which operations need to be repeated. 11471 11472 It's not valid to call commit() within a transaction. 11473 11474 Beware of calling commit() too frequently: this will make indexing 11475 take much longer. 11476 11477 Note that commit() need not be called explicitly: it will be called 11478 automatically when the database is closed, or when a sufficient number 11479 of modifications have been made. By default, this is every 10000 11480 documents added, deleted, or modified. This value is rather 11481 conservative, and if you have a machine with plenty of memory, you can 11482 improve indexing throughput dramatically by setting 11483 XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. 11484 11485 This method was new in Xapian 1.1.0 - in earlier versions it was 11486 called flush(). 11487 11488 Parameters: 11489 ----------- 11490 11491 Xapian::DatabaseError: will be thrown if a problem occurs while 11492 modifying the database. 11493 11494 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11495 corrupt state. "; 11496 11497 %feature("docstring") Xapian::WritableDatabase::flush " 11498 11499 Pre-1.1.0 name for commit(). 11500 11501 void Xapian::WritableDatabase::flush() 11502 11503 Use commit() instead. "; 11504 11505 %feature("docstring") Xapian::WritableDatabase::begin_transaction " 11506 11507 Begin a transaction. 11508 11509 void Xapian::WritableDatabase::begin_transaction(bool flushed=true) 11510 11511 In Xapian a transaction is a group of modifications to the database 11512 which are linked such that either all will be applied simultaneously 11513 or none will be applied at all. Even in the case of a power failure, 11514 this characteristic should be preserved (as long as the filesystem 11515 isn't corrupted, etc). 11516 11517 A transaction is started with begin_transaction() and can either be 11518 committed by calling commit_transaction() or aborted by calling 11519 cancel_transaction(). 11520 11521 By default, a transaction implicitly calls commit() before and after 11522 so that the modifications stand and fall without affecting 11523 modifications before or after. 11524 11525 The downside of these implicit calls to commit() is that small 11526 transactions can harm indexing performance in the same way that 11527 explicitly calling commit() frequently can. 11528 11529 If you're applying atomic groups of changes and only wish to ensure 11530 that each group is either applied or not applied, then you can prevent 11531 the automatic commit() before and after the transaction by starting 11532 the transaction with begin_transaction(false). However, if 11533 cancel_transaction is called (or if commit_transaction isn't called 11534 before the WritableDatabase object is destroyed) then any changes 11535 which were pending before the transaction began will also be 11536 discarded. 11537 11538 Transactions aren't currently supported by the InMemory backend. 11539 11540 Parameters: 11541 ----------- 11542 11543 flushed: Is this a flushed transaction? By default transactions are 11544 \"flushed\", which means that committing a transaction will ensure 11545 those changes are permanently written to the database. By contrast, 11546 unflushed transactions only ensure that changes within the transaction 11547 are either all applied or all aren't. 11548 11549 Parameters: 11550 ----------- 11551 11552 Xapian::UnimplementedError: will be thrown if transactions are not 11553 available for this database type. 11554 11555 Xapian::InvalidOperationError: will be thrown if this is called at an 11556 invalid time, such as when a transaction is already in progress. "; 11557 11558 %feature("docstring") Xapian::WritableDatabase::commit_transaction " 11559 11560 Complete the transaction currently in progress. 11561 11562 void Xapian::WritableDatabase::commit_transaction() 11563 11564 If this method completes successfully and this is a flushed 11565 transaction, all the database modifications made during the 11566 transaction will have been committed to the database. 11567 11568 If an error occurs, an exception will be thrown, and none of the 11569 modifications made to the database during the transaction will have 11570 been applied to the database. 11571 11572 In all cases the transaction will no longer be in progress. 11573 11574 Parameters: 11575 ----------- 11576 11577 Xapian::DatabaseError: will be thrown if a problem occurs while 11578 modifying the database. 11579 11580 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11581 corrupt state. 11582 11583 Xapian::InvalidOperationError: will be thrown if a transaction is not 11584 currently in progress. 11585 11586 Xapian::UnimplementedError: will be thrown if transactions are not 11587 available for this database type. "; 11588 11589 %feature("docstring") Xapian::WritableDatabase::cancel_transaction " 11590 11591 Abort the transaction currently in progress, discarding the pending 11592 modifications made to the database. 11593 11594 void Xapian::WritableDatabase::cancel_transaction() 11595 11596 If an error occurs in this method, an exception will be thrown, but 11597 the transaction will be cancelled anyway. 11598 11599 Parameters: 11600 ----------- 11601 11602 Xapian::DatabaseError: will be thrown if a problem occurs while 11603 modifying the database. 11604 11605 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11606 corrupt state. 11607 11608 Xapian::InvalidOperationError: will be thrown if a transaction is not 11609 currently in progress. 11610 11611 Xapian::UnimplementedError: will be thrown if transactions are not 11612 available for this database type. "; 11613 11614 %feature("docstring") Xapian::WritableDatabase::add_document " 11615 11616 Add a new document to the database. 11617 11618 Xapian::docid Xapian::WritableDatabase::add_document(const 11619 Xapian::Document &document) 11620 11621 This method adds the specified document to the database, returning a 11622 newly allocated document ID. Automatically allocated document IDs come 11623 from a per-database monotonically increasing counter, so IDs from 11624 deleted documents won't be reused. 11625 11626 If you want to specify the document ID to be used, you should call 11627 replace_document() instead. 11628 11629 Note that changes to the database won't be immediately committed to 11630 disk; see commit() for more details. 11631 11632 As with all database modification operations, the effect is atomic: 11633 the document will either be fully added, or the document fails to be 11634 added and an exception is thrown (possibly at a later time when 11635 commit() is called or the database is closed). 11636 11637 Parameters: 11638 ----------- 11639 11640 document: The new document to be added. 11641 11642 The document ID of the newly added document. 11643 11644 Parameters: 11645 ----------- 11646 11647 Xapian::DatabaseError: will be thrown if a problem occurs while 11648 writing to the database. 11649 11650 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11651 corrupt state. "; 11652 11653 %feature("docstring") Xapian::WritableDatabase::delete_document " 11654 11655 Delete a document from the database. 11656 11657 void Xapian::WritableDatabase::delete_document(Xapian::docid did) 11658 11659 This method removes the document with the specified document ID from 11660 the database. 11661 11662 Note that changes to the database won't be immediately committed to 11663 disk; see commit() for more details. 11664 11665 As with all database modification operations, the effect is atomic: 11666 the document will either be fully removed, or the document fails to be 11667 removed and an exception is thrown (possibly at a later time when 11668 commit() is called or the database is closed). 11669 11670 Parameters: 11671 ----------- 11672 11673 did: The document ID of the document to be removed. 11674 11675 Parameters: 11676 ----------- 11677 11678 Xapian::DatabaseError: will be thrown if a problem occurs while 11679 writing to the database. 11680 11681 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11682 corrupt state. "; 11683 11684 %feature("docstring") Xapian::WritableDatabase::delete_document " 11685 11686 Delete any documents indexed by a term from the database. 11687 11688 void Xapian::WritableDatabase::delete_document(const std::string 11689 &unique_term) 11690 11691 This method removes any documents indexed by the specified term from 11692 the database. 11693 11694 A major use is for convenience when UIDs from another system are 11695 mapped to terms in Xapian, although this method has other uses (for 11696 example, you could add a \"deletion date\" term to documents at index 11697 time and use this method to delete all documents due for deletion on a 11698 particular date). 11699 11700 Parameters: 11701 ----------- 11702 11703 unique_term: The term to remove references to. 11704 11705 Parameters: 11706 ----------- 11707 11708 Xapian::DatabaseError: will be thrown if a problem occurs while 11709 writing to the database. 11710 11711 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11712 corrupt state. "; 11713 11714 %feature("docstring") Xapian::WritableDatabase::replace_document " 11715 11716 Replace a given document in the database. 11717 11718 void Xapian::WritableDatabase::replace_document(Xapian::docid did, 11719 const Xapian::Document &document) 11720 11721 This method replaces the document with the specified document ID. If 11722 document ID did isn't currently used, the document will be added with 11723 document ID did. 11724 11725 The monotonic counter used for automatically allocating document IDs 11726 is increased so that the next automatically allocated document ID will 11727 be did + 1. Be aware that if you use this method to specify a high 11728 document ID for a new document, and also use 11729 WritableDatabase::add_document(), Xapian may get to a state where this 11730 counter wraps around and will be unable to automatically allocate 11731 document IDs! 11732 11733 Note that changes to the database won't be immediately committed to 11734 disk; see commit() for more details. 11735 11736 As with all database modification operations, the effect is atomic: 11737 the document will either be fully replaced, or the document fails to 11738 be replaced and an exception is thrown (possibly at a later time when 11739 commit() is called or the database is closed). 11740 11741 Parameters: 11742 ----------- 11743 11744 did: The document ID of the document to be replaced. 11745 11746 document: The new document. 11747 11748 Parameters: 11749 ----------- 11750 11751 Xapian::DatabaseError: will be thrown if a problem occurs while 11752 writing to the database. 11753 11754 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11755 corrupt state. "; 11756 11757 %feature("docstring") Xapian::WritableDatabase::replace_document " 11758 11759 Replace any documents matching a term. 11760 11761 Xapian::docid Xapian::WritableDatabase::replace_document(const 11762 std::string &unique_term, const Xapian::Document &document) 11763 11764 This method replaces any documents indexed by the specified term with 11765 the specified document. If any documents are indexed by the term, the 11766 lowest document ID will be used for the document, otherwise a new 11767 document ID will be generated as for add_document. 11768 11769 One common use is to allow UIDs from another system to easily be 11770 mapped to terms in Xapian. Note that this method doesn't automatically 11771 add unique_term as a term, so you'll need to call 11772 document.add_term(unique_term) first when using replace_document() in 11773 this way. 11774 11775 Note that changes to the database won't be immediately committed to 11776 disk; see commit() for more details. 11777 11778 As with all database modification operations, the effect is atomic: 11779 the document(s) will either be fully replaced, or the document(s) fail 11780 to be replaced and an exception is thrown (possibly at a later time 11781 when commit() is called or the database is closed). 11782 11783 Parameters: 11784 ----------- 11785 11786 unique_term: The \"unique\" term. 11787 11788 document: The new document. 11789 11790 The document ID that document was given. 11791 11792 Parameters: 11793 ----------- 11794 11795 Xapian::DatabaseError: will be thrown if a problem occurs while 11796 writing to the database. 11797 11798 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11799 corrupt state. "; 11800 11801 %feature("docstring") Xapian::WritableDatabase::add_spelling " 11802 11803 Add a word to the spelling dictionary. 11804 11805 void Xapian::WritableDatabase::add_spelling(const std::string &word, 11806 Xapian::termcount freqinc=1) const 11807 11808 If the word is already present, its frequency is increased. 11809 11810 Parameters: 11811 ----------- 11812 11813 word: The word to add. 11814 11815 freqinc: How much to increase its frequency by (default 1). "; 11816 11817 %feature("docstring") Xapian::WritableDatabase::remove_spelling " 11818 11819 Remove a word from the spelling dictionary. 11820 11821 void Xapian::WritableDatabase::remove_spelling(const std::string 11822 &word, Xapian::termcount freqdec=1) const 11823 11824 The word's frequency is decreased, and if would become zero or less 11825 then the word is removed completely. 11826 11827 Parameters: 11828 ----------- 11829 11830 word: The word to remove. 11831 11832 freqdec: How much to decrease its frequency by (default 1). "; 11833 11834 %feature("docstring") Xapian::WritableDatabase::add_synonym " 11835 11836 Add a synonym for a term. 11837 11838 void Xapian::WritableDatabase::add_synonym(const std::string &term, 11839 const std::string &synonym) const 11840 11841 Parameters: 11842 ----------- 11843 11844 term: The term to add a synonym for. 11845 11846 synonym: The synonym to add. If this is already a synonym for term, 11847 then no action is taken. "; 11848 11849 %feature("docstring") Xapian::WritableDatabase::remove_synonym " 11850 11851 Remove a synonym for a term. 11852 11853 void Xapian::WritableDatabase::remove_synonym(const std::string &term, 11854 const std::string &synonym) const 11855 11856 Parameters: 11857 ----------- 11858 11859 term: The term to remove a synonym for. 11860 11861 synonym: The synonym to remove. If this isn't currently a synonym for 11862 term, then no action is taken. "; 11863 11864 %feature("docstring") Xapian::WritableDatabase::clear_synonyms " 11865 11866 Remove all synonyms for a term. 11867 11868 void Xapian::WritableDatabase::clear_synonyms(const std::string &term) 11869 const 11870 11871 Parameters: 11872 ----------- 11873 11874 term: The term to remove all synonyms for. If the term has no 11875 synonyms, no action is taken. "; 11876 11877 %feature("docstring") Xapian::WritableDatabase::set_metadata " 11878 11879 Set the user-specified metadata associated with a given key. 11880 11881 void Xapian::WritableDatabase::set_metadata(const std::string &key, 11882 const std::string &metadata) 11883 11884 This method sets the metadata value associated with a given key. If 11885 there is already a metadata value stored in the database with the same 11886 key, the old value is replaced. If you want to delete an existing item 11887 of metadata, just set its value to the empty string. 11888 11889 User-specified metadata allows you to store arbitrary information in 11890 the form of (key, value) pairs. 11891 11892 There's no hard limit on the number of metadata items, or the size of 11893 the metadata values. Metadata keys have a limited length, which depend 11894 on the backend. We recommend limiting them to 200 bytes. Empty keys 11895 are not valid, and specifying one will cause an exception. 11896 11897 Metadata modifications are committed to disk in the same way as 11898 modifications to the documents in the database are: i.e., 11899 modifications are atomic, and won't be committed to disk immediately 11900 (see commit() for more details). This allows metadata to be used to 11901 link databases with versioned external resources by storing the 11902 appropriate version number in a metadata item. 11903 11904 You can also use the metadata to store arbitrary extra information 11905 associated with terms, documents, or postings by encoding the termname 11906 and/or document id into the metadata key. 11907 11908 Parameters: 11909 ----------- 11910 11911 key: The key of the metadata item to set. 11912 11913 metadata: The value of the metadata item to set. 11914 11915 Parameters: 11916 ----------- 11917 11918 Xapian::DatabaseError: will be thrown if a problem occurs while 11919 writing to the database. 11920 11921 Xapian::DatabaseCorruptError: will be thrown if the database is in a 11922 corrupt state. 11923 11924 Xapian::InvalidArgumentError: will be thrown if the key supplied is 11925 empty. 11926 11927 Xapian::UnimplementedError: will be thrown if the database backend in 11928 use doesn't support user- specified metadata. "; 11929 11930 %feature("docstring") Xapian::WritableDatabase::get_description " 11931 11932 Return a string describing this object. 11933 11934 std::string Xapian::WritableDatabase::get_description() const "; 11935 11936 11937 // File: namespacestd.xml 11938 11939 11940 // File: namespaceXapian.xml 11941 %feature("docstring") Xapian::Auto::miles_to_metres " 11942 11943 Convert from miles to metres. 11944 11945 double Xapian::miles_to_metres(double miles) 11946 11947 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 11948 features "; 11949 11950 %feature("docstring") Xapian::Auto::metres_to_miles " 11951 11952 Convert from metres to miles. 11953 11954 double Xapian::metres_to_miles(double metres) 11955 11956 Experimental - seehttps://xapian.org/docs/deprecation#experimental- 11957 features "; 11958 11959 %feature("docstring") Xapian::Auto::iterator_valid "bool 11960 Xapian::iterator_valid(const Xapian::ESetIterator &it) "; 11961 11962 %feature("docstring") Xapian::Auto::iterator_valid "bool 11963 Xapian::iterator_valid(const Xapian::MSetIterator &it) "; 11964 11965 %feature("docstring") Xapian::Auto::iterator_rewind "void 11966 Xapian::iterator_rewind(Xapian::ESetIterator &it) "; 11967 11968 %feature("docstring") Xapian::Auto::iterator_rewind "void 11969 Xapian::iterator_rewind(Xapian::MSetIterator &it) "; 11970 11971 %feature("docstring") Xapian::Auto::iterator_rewound "bool 11972 Xapian::iterator_rewound(Xapian::ESetIterator &it) "; 11973 11974 %feature("docstring") Xapian::Auto::iterator_rewound "bool 11975 Xapian::iterator_rewound(Xapian::MSetIterator &it) "; 11976 11977 %feature("docstring") Xapian::Auto::iterator_valid "bool 11978 Xapian::iterator_valid(const Xapian::PositionIterator &it) "; 11979 11980 %feature("docstring") Xapian::Auto::iterator_valid "bool 11981 Xapian::iterator_valid(const Xapian::PostingIterator &it) "; 11982 11983 %feature("docstring") Xapian::Auto::iterator_valid "bool 11984 Xapian::iterator_valid(const Xapian::TermIterator &it) "; 11985 11986 %feature("docstring") Xapian::Auto::iterator_valid "bool 11987 Xapian::iterator_valid(const Xapian::ValueIterator &it) "; 11988 11989 %feature("docstring") Xapian::Auto::iterator_valid "bool 11990 Xapian::iterator_valid(const Xapian::Utf8Iterator &it) "; 11991 11992 %feature("docstring") Xapian::Auto::sortable_serialise " 11993 11994 Convert a floating point number to a string, preserving sort order. 11995 11996 std::string Xapian::sortable_serialise(double value) 11997 11998 This method converts a floating point number to a string, suitable for 11999 using as a value for numeric range restriction, or for use as a sort 12000 key. 12001 12002 The conversion is platform independent. 12003 12004 The conversion attempts to ensure that, for any pair of values 12005 supplied to the conversion algorithm, the result of comparing the 12006 original values (with a numeric comparison operator) will be the same 12007 as the result of comparing the resulting values (with a string 12008 comparison operator). On platforms which represent doubles with the 12009 precisions specified by IEEE_754, this will be the case: if the 12010 representation of doubles is more precise, it is possible that two 12011 very close doubles will be mapped to the same string, so will compare 12012 equal. 12013 12014 Note also that both zero and -zero will be converted to the same 12015 representation: since these compare equal, this satisfies the 12016 comparison constraint, but it's worth knowing this if you wish to use 12017 the encoding in some situation where this distinction matters. 12018 12019 Handling of NaN isn't (currently) guaranteed to be sensible. 12020 12021 Parameters: 12022 ----------- 12023 12024 value: The number to serialise. "; 12025 12026 %feature("docstring") Xapian::Auto::sortable_unserialise " 12027 12028 Convert a string encoded using sortable_serialise back to a floating 12029 point number. 12030 12031 double Xapian::sortable_unserialise(const std::string &serialised) 12032 12033 This expects the input to be a string produced by 12034 sortable_serialise(). If the input is not such a string, the value 12035 returned is undefined (but no error will be thrown). 12036 12037 The result of the conversion will be exactly the value which was 12038 supplied to sortable_serialise() when making the string on platforms 12039 which represent doubles with the precisions specified by IEEE_754, but 12040 may be a different (nearby) value on other platforms. 12041 12042 Parameters: 12043 ----------- 12044 12045 serialised: The serialised string to decode. "; 12046 12047 %feature("docstring") Xapian::Auto::version_string " 12048 12049 Report the version string of the library which the program is linked 12050 with. 12051 12052 const char* Xapian::version_string() 12053 12054 This may be different to the version compiled against (given by 12055 XAPIAN_VERSION) if shared libraries are being used. "; 12056 12057 %feature("docstring") Xapian::Auto::major_version " 12058 12059 Report the major version of the library which the program is linked 12060 with. 12061 12062 int Xapian::major_version() 12063 12064 This may be different to the version compiled against (given by 12065 XAPIAN_MAJOR_VERSION) if shared libraries are being used. "; 12066 12067 %feature("docstring") Xapian::Auto::minor_version " 12068 12069 Report the minor version of the library which the program is linked 12070 with. 12071 12072 int Xapian::minor_version() 12073 12074 This may be different to the version compiled against (given by 12075 XAPIAN_MINOR_VERSION) if shared libraries are being used. "; 12076 12077 %feature("docstring") Xapian::Auto::revision " 12078 12079 Report the revision of the library which the program is linked with. 12080 12081 int Xapian::revision() 12082 12083 This may be different to the version compiled against (given by 12084 XAPIAN_REVISION) if shared libraries are being used. "; 12085 12086 12087 // File: namespaceXapian_1_1Auto.xml 12088 %feature("docstring") Xapian::Auto::open_stub " 12089 12090 Construct a Database object for a stub database file. 12091 12092 Database Xapian::Auto::open_stub(const std::string &file) 12093 12094 The stub database file contains serialised parameters for one or more 12095 databases. 12096 12097 Parameters: 12098 ----------- 12099 12100 file: pathname of the stub database file. "; 12101 12102 %feature("docstring") Xapian::Auto::open_stub " 12103 12104 Construct a WritableDatabase object for a stub database file. 12105 12106 WritableDatabase Xapian::Auto::open_stub(const std::string &file, int 12107 action) 12108 12109 The stub database file must contain serialised parameters for exactly 12110 one database. 12111 12112 Parameters: 12113 ----------- 12114 12115 file: pathname of the stub database file. 12116 12117 action: determines handling of existing/non-existing database: 12118 Xapian::DB_CREATE fail if database already exist, otherwise create new 12119 database. 12120 12121 Xapian::DB_CREATE_OR_OPEN open existing database, or create new 12122 database if none exists. 12123 12124 Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create 12125 new database if none exists. 12126 12127 Xapian::DB_OPEN open existing database, failing if none exists. "; 12128 12129 12130 // File: namespaceXapian_1_1Chert.xml 12131 %feature("docstring") Xapian::Chert::open " 12132 12133 Construct a Database object for read-only access to a Chert database. 12134 12135 Database Xapian::Chert::open(const std::string &dir) 12136 12137 Parameters: 12138 ----------- 12139 12140 dir: pathname of the directory containing the database. "; 12141 12142 %feature("docstring") Xapian::Chert::open " 12143 12144 Construct a Database object for update access to a Chert database. 12145 12146 WritableDatabase Xapian::Chert::open(const std::string &dir, int 12147 action, int block_size=0) 12148 12149 Parameters: 12150 ----------- 12151 12152 dir: pathname of the directory containing the database. 12153 12154 action: determines handling of existing/non-existing database: 12155 Xapian::DB_CREATE fail if database already exist, otherwise create new 12156 database. 12157 12158 Xapian::DB_CREATE_OR_OPEN open existing database, or create new 12159 database if none exists. 12160 12161 Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create 12162 new database if none exists. 12163 12164 Xapian::DB_OPEN open existing database, failing if none exists. 12165 12166 block_size: the Btree blocksize to use (in bytes), which must be a 12167 power of two between 2048 and 65536 (inclusive). The default (also 12168 used if an invalid value if passed) is 8192 bytes. This parameter is 12169 ignored when opening an existing database. "; 12170 12171 12172 // File: namespaceXapian_1_1InMemory.xml 12173 %feature("docstring") Xapian::InMemory::open " 12174 12175 Construct a WritableDatabase object for a new, empty InMemory 12176 database. 12177 12178 WritableDatabase Xapian::InMemory::open() 12179 12180 Only a writable InMemory database can be created, since a read-only 12181 one would always remain empty. "; 12182 12183 12184 // File: namespaceXapian_1_1Internal.xml 12185 12186 12187 // File: namespaceXapian_1_1Remote.xml 12188 %feature("docstring") Xapian::Remote::open " 12189 12190 Construct a Database object for read-only access to a remote database 12191 accessed via a TCP connection. 12192 12193 Database Xapian::Remote::open(const std::string &host, unsigned int 12194 port, useconds_t timeout=10000, useconds_t connect_timeout=10000) 12195 12196 Access to the remote database is via a TCP connection to the specified 12197 host and port. 12198 12199 Parameters: 12200 ----------- 12201 12202 host: hostname to connect to. 12203 12204 port: port number to connect to. 12205 12206 timeout: timeout in milliseconds. If this timeout is exceeded for any 12207 individual operation on the remote database then 12208 Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't 12209 timeout. (Default is 10000ms, which is 10 seconds). 12210 12211 connect_timeout: timeout to use when connecting to the server. If 12212 this timeout is exceeded then Xapian::NetworkTimeoutError is thrown. A 12213 timeout of 0 means don't timeout. (Default is 10000ms, which is 10 12214 seconds). "; 12215 12216 %feature("docstring") Xapian::Remote::open_writable " 12217 12218 Construct a WritableDatabase object for update access to a remote 12219 database accessed via a TCP connection. 12220 12221 WritableDatabase Xapian::Remote::open_writable(const std::string 12222 &host, unsigned int port, useconds_t timeout=0, useconds_t 12223 connect_timeout=10000, int flags=0) 12224 12225 Access to the remote database is via a TCP connection to the specified 12226 host and port. 12227 12228 Parameters: 12229 ----------- 12230 12231 host: hostname to connect to. 12232 12233 port: port number to connect to. 12234 12235 timeout: timeout in milliseconds. If this timeout is exceeded for any 12236 individual operation on the remote database then 12237 Xapian::NetworkTimeoutError is thrown. (Default is 0, which means 12238 don't timeout). 12239 12240 connect_timeout: timeout to use when connecting to the server. If 12241 this timeout is exceeded then Xapian::NetworkTimeoutError is thrown. A 12242 timeout of 0 means don't timeout. (Default is 10000ms, which is 10 12243 seconds). 12244 12245 flags: Xapian::DB_RETRY_LOCK or 0. "; 12246 12247 %feature("docstring") Xapian::Remote::open " 12248 12249 Construct a Database object for read-only access to a remote database 12250 accessed via a program. 12251 12252 Database Xapian::Remote::open(const std::string &program, const 12253 std::string &args, useconds_t timeout=10000) 12254 12255 Access to the remote database is done by running an external program 12256 and communicating with it on stdin/stdout. 12257 12258 Parameters: 12259 ----------- 12260 12261 program: the external program to run. 12262 12263 args: space-separated list of arguments to pass to program. 12264 12265 timeout: timeout in milliseconds. If this timeout is exceeded for any 12266 individual operation on the remote database then 12267 Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't 12268 timeout. (Default is 10000ms, which is 10 seconds). "; 12269 12270 %feature("docstring") Xapian::Remote::open_writable " 12271 12272 Construct a WritableDatabase object for update access to a remote 12273 database accessed via a program. 12274 12275 WritableDatabase Xapian::Remote::open_writable(const std::string 12276 &program, const std::string &args, useconds_t timeout=0, int flags=0) 12277 12278 Access to the remote database is done by running an external program 12279 and communicating with it on stdin/stdout. 12280 12281 Parameters: 12282 ----------- 12283 12284 program: the external program to run. 12285 12286 args: space-separated list of arguments to pass to program. 12287 12288 timeout: timeout in milliseconds. If this timeout is exceeded for any 12289 individual operation on the remote database then 12290 Xapian::NetworkTimeoutError is thrown. (Default is 0, which means 12291 don't timeout). 12292 12293 flags: Xapian::DB_RETRY_LOCK or 0. "; 12294 12295 12296 // File: namespaceXapian_1_1Unicode.xml 12297 %feature("docstring") Xapian::Unicode::Internal::nonascii_to_utf8 " 12298 12299 Convert a single non-ASCII Unicode character to UTF-8. 12300 12301 unsigned Xapian::Unicode::nonascii_to_utf8(unsigned ch, char *buf) 12302 12303 This is intended mainly as a helper method for to_utf8(). 12304 12305 Parameters: 12306 ----------- 12307 12308 ch: The character (which must be > 128) to write to buf. 12309 12310 buf: The buffer to write the character to - it must have space for 12311 (at least) 4 bytes. 12312 12313 The length of the resultant UTF-8 character in bytes. "; 12314 12315 %feature("docstring") Xapian::Unicode::Internal::to_utf8 " 12316 12317 Convert a single Unicode character to UTF-8. 12318 12319 unsigned Xapian::Unicode::to_utf8(unsigned ch, char *buf) 12320 12321 Parameters: 12322 ----------- 12323 12324 ch: The character to write to buf. 12325 12326 buf: The buffer to write the character to - it must have space for 12327 (at least) 4 bytes. 12328 12329 The length of the resultant UTF-8 character in bytes. "; 12330 12331 %feature("docstring") Xapian::Unicode::Internal::append_utf8 " 12332 12333 Append the UTF-8 representation of a single Unicode character to a 12334 std::string. 12335 12336 void Xapian::Unicode::append_utf8(std::string &s, unsigned ch) "; 12337 12338 %feature("docstring") Xapian::Unicode::Internal::get_category " 12339 12340 Return the category which a given Unicode character falls into. 12341 12342 category Xapian::Unicode::get_category(unsigned ch) "; 12343 12344 %feature("docstring") Xapian::Unicode::Internal::is_wordchar " 12345 12346 Test if a given Unicode character is \"word character\". 12347 12348 bool Xapian::Unicode::is_wordchar(unsigned ch) "; 12349 12350 %feature("docstring") Xapian::Unicode::Internal::is_whitespace " 12351 12352 Test if a given Unicode character is a whitespace character. 12353 12354 bool Xapian::Unicode::is_whitespace(unsigned ch) "; 12355 12356 %feature("docstring") Xapian::Unicode::Internal::is_currency " 12357 12358 Test if a given Unicode character is a currency symbol. 12359 12360 bool Xapian::Unicode::is_currency(unsigned ch) "; 12361 12362 %feature("docstring") Xapian::Unicode::Internal::tolower " 12363 12364 Convert a Unicode character to lowercase. 12365 12366 unsigned Xapian::Unicode::tolower(unsigned ch) "; 12367 12368 %feature("docstring") Xapian::Unicode::Internal::toupper " 12369 12370 Convert a Unicode character to uppercase. 12371 12372 unsigned Xapian::Unicode::toupper(unsigned ch) "; 12373 12374 %feature("docstring") Xapian::Unicode::Internal::tolower " 12375 12376 Convert a UTF-8 std::string to lowercase. 12377 12378 std::string Xapian::Unicode::tolower(const std::string &term) "; 12379 12380 %feature("docstring") Xapian::Unicode::Internal::toupper " 12381 12382 Convert a UTF-8 std::string to uppercase. 12383 12384 std::string Xapian::Unicode::toupper(const std::string &term) "; 12385 12386 12387 // File: namespaceXapian_1_1Unicode_1_1Internal.xml 12388 12389 12390 // File: xapian_8h.xml 12391 12392 12393 // File: attributes_8h.xml 12394 12395 12396 // File: compactor_8h.xml 12397 12398 12399 // File: constants_8h.xml 12400 12401 12402 // File: constinfo_8h.xml 12403 12404 12405 // File: database_8h.xml 12406 12407 12408 // File: dbfactory_8h.xml 12409 12410 12411 // File: document_8h.xml 12412 12413 12414 // File: enquire_8h.xml 12415 12416 12417 // File: error_8h.xml 12418 12419 12420 // File: errorhandler_8h.xml 12421 12422 12423 // File: eset_8h.xml 12424 12425 12426 // File: expanddecider_8h.xml 12427 12428 12429 // File: geospatial_8h.xml 12430 12431 12432 // File: iterator_8h.xml 12433 12434 12435 // File: keymaker_8h.xml 12436 12437 12438 // File: matchspy_8h.xml 12439 12440 12441 // File: mset_8h.xml 12442 12443 12444 // File: positioniterator_8h.xml 12445 12446 12447 // File: postingiterator_8h.xml 12448 12449 12450 // File: postingsource_8h.xml 12451 12452 12453 // File: query_8h.xml 12454 12455 12456 // File: queryparser_8h.xml 12457 12458 12459 // File: registry_8h.xml 12460 12461 12462 // File: stem_8h.xml 12463 12464 12465 // File: termgenerator_8h.xml 12466 12467 12468 // File: termiterator_8h.xml 12469 12470 12471 // File: types_8h.xml 12472 12473 12474 // File: unicode_8h.xml 12475 12476 12477 // File: valueiterator_8h.xml 12478 12479 12480 // File: valuesetmatchdecider_8h.xml 12481 12482 12483 // File: version_8h.xml 12484 12485 12486 // File: weight_8h.xml 12487 12488 12489 // File: deprecated.xml 12490 12491 12492 // File: dir_f63502d618711192f85ccb772536c6ae.xml 12493 12494