1<?php 2 3/* 4 +----------------------------------------------------------------------+ 5 | Copyright (c) The PHP Group | | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Israel Ekpo <iekpo@php.net> | 16 | Omar Shaban <omars@php.net> | 17 +----------------------------------------------------------------------+ 18*/ 19 20define('SOLR_MAJOR_VERSION', 2); 21define('SOLR_MINOR_VERSION', 5); 22define('SOLR_PATCH_VERSION', 1); 23 24define('SOLR_EXTENSION_VERSION', '2.5.1'); 25 26/** 27 * Returns the current version of the Apache Solr extension 28 * 29 * @return string 30 */ 31function solr_get_version() 32{ 33 return SOLR_EXTENSION_VERSION; 34} 35 36/** 37 * This is the base class for all exception thrown by the Solr extension classes. 38 * 39 * @author Israel Ekpo <iekpo@php.net> 40 */ 41class SolrException extends Exception 42{ 43 44 /* Properties */ 45 protected $sourceline; 46 47 protected $sourcefile; 48 49 protected $zif_name; 50 51 /** 52 * Returns internal information where the Exception was thrown 53 * @return array 54 * @link http://docs.php.net/manual/en/solrexception.getinternalinfo.php 55 */ 56 public function getInternalInfo() {} 57} 58 59/** 60 * An exception thrown when there is an error while making a request to the server from the client. 61 * @author Israel Ekpo <iekpo@php.net> 62 */ 63class SolrClientException extends SolrException 64{ 65 /** 66 * Returns internal information where the Exception was thrown 67 * 68 * @return array 69 * @link http://docs.php.net/manual/en/solrclientexception.getinternalinfo.php 70 */ 71 public function getInternalInfo() {} 72} 73 74/** 75 * Used for Solr Related Exceptions 76 * 77 * @author Omar Shaban <omars@php.net> 78 */ 79class SolrServerException extends SolrException 80{ 81 /** 82 * Returns internal information where the Exception was thrown 83 * 84 * @return array 85 * @link http://docs.php.net/manual/en/solrserverexception.getinternalinfo.php 86 */ 87 public function getInternalInfo() {} 88} 89 90/** 91 * This object is thrown when an illeglal or invalid argument is passed to a method. 92 * 93 * @link http://docs.php.net/manual/en/class.solrillegalargumentexception.php 94 * @author Israel Ekpo <iekpo@php.net> 95 */ 96class SolrIllegalArgumentException extends SolrException 97{ 98 /** 99 * Returns internal information where the Exception was thrown 100 * @return string 101 * @link http://docs.php.net/manual/en/solrillegalargumentexception.getinternalinfo.php 102 */ 103 public function getInternalInfo() {} 104} 105 106/** 107 * @link http://docs.php.net/manual/en/class.solrillegaloperationexception.php 108 * @author Israel Ekpo <iekpo@php.net> 109 */ 110class SolrIllegalOperationException extends SolrException 111{ 112 /** 113 * Returns internal information where the Exception was thrown 114 * 115 * @return string 116 * @link http://docs.php.net/manual/en/solrillegaloperationexception.getinternalinfo.php 117 */ 118 public function getInternalInfo() {} 119} 120 121/** 122 * @author Omar Shaban <omars@php.net> 123 */ 124class SolrMissingMandatoryParameterException extends SolrException 125{ 126} 127 128 129/** 130 * 131 * @author Israel Ekpo <iekpo@php.net> 132 * @author Omar Shaban <omars@php.net> 133 */ 134abstract class SolrUtils 135{ 136 /** 137 * Parses an response XML string into a SolrObject 138 * 139 * @param string $xmlresponse 140 * @param int $parse_mode 141 * @return SolrObject 142 * @link http://docs.php.net/manual/en/solrutils.digestxmlresponse.php 143 */ 144 public static function digestXmlResponse($xmlresponse, $parse_mode = 0) {} 145 146 /** 147 * Escapes a lucene query string 148 * 149 * @param string $str String to be escaped 150 * @return string 151 * @link http://docs.php.net/manual/en/solrutils.escapequerychars.php 152 */ 153 public static function escapeQueryChars($str) {} 154 155 /** 156 * Returns the current version of the Solr extension 157 * @return string 158 * @link http://docs.php.net/manual/en/solrutils.getsolrversion.php 159 */ 160 public static function getSolrVersion() {} 161 162 /** 163 * Prepares a phrase from an unescaped lucene string 164 * 165 * @param string $str 166 * @return string 167 * @link http://docs.php.net/manual/en/solrutils.queryphrase.php 168 */ 169 public static function queryPhrase($str) {} 170} 171 172/** 173 * Represents a field in a Solr document. All its properties are read-only. 174 * 175 * @author Israel Ekpo <iekpo@php.net> 176 */ 177class SolrDocumentField 178{ 179 180 /** 181 * The name of the field 182 * 183 * @var string 184 */ 185 public $name; 186 187 /** 188 * The boost value for the field 189 * 190 * @var float 191 */ 192 public $boost; 193 194 /** 195 * An array of values for this field 196 * @var array 197 */ 198 public $values; 199 200 /** 201 * Constructor 202 */ 203 public function __construct() {} 204 205 /** 206 * Destructor 207 */ 208 public function __destruct() {} 209} 210 211/** 212 * Represents a Solr document that is about to be submitted to the Solr index 213 * 214 * @link http://docs.php.net/manual/en/class.solrinputdocument.php 215 * @author Israel Ekpo <iekpo@php.net> 216 * @author Omar Shaban <omars@php.net> 217 */ 218final class SolrInputDocument 219{ 220 /** 221 * Sorts the fields in ascending order 222 */ 223 const SORT_DEFAULT = 1 ; 224 225 /** 226 * Sorts the fields in ascending order 227 */ 228 const SORT_ASC = 1 ; 229 230 /** 231 * Sorts the fields in descending order 232 */ 233 const SORT_DESC = 2 ; 234 235 /** 236 * Sorts the fields by name 237 */ 238 const SORT_FIELD_NAME = 1 ; 239 240 /** 241 * Sorts the fields by number of values 242 */ 243 const SORT_FIELD_VALUE_COUNT = 2 ; 244 245 /** 246 * Sorts the fields by boost value 247 */ 248 const SORT_FIELD_BOOST_VALUE = 4 ; 249 250 /** 251 * Adds a new value to a multivalued field 252 */ 253 const UPDATE_MODIFIER_ADD = 1; 254 255 /** 256 * Sets a field value 257 */ 258 const UPDATE_MODIFIER_SET = 2; 259 260 /** 261 * Increments a field value 262 */ 263 const UPDATE_MODIFIER_INC = 3; 264 265 /** 266 * Removes a value from a multivalued field 267 */ 268 const UPDATE_MODIFIER_REMOVE = 4; 269 270 /** 271 * Removes values matching a java regular expression 272 */ 273 const UPDATE_MODIFIER_REMOVEREGEX = 5; 274 275 /** 276 * Concurrency default 277 * @var int 278 */ 279 const VERSION_ASSERT_NONE = 0; 280 281 /** 282 * Assert that a document does not exist, will fail if the document exists 283 * @var int 284 */ 285 const VERSION_ASSERT_NOT_EXISTS = -1; 286 287 /** 288 * Assert that the document already exists 289 * if the document does not exist, the updates will be rejected. 290 * 291 * @var int 292 */ 293 const VERSION_ASSERT_EXISTS = 1; 294 295 /** 296 * Adds a field to the document 297 * 298 * @param string $fieldName The name of the field 299 * @param string $fieldValue The value for the field 300 * @param float $fieldBoostValue The index time boost for the field. Though this cannot be negative, you can still pass values less than 1.0 but they must be greater than zero. 301 * @link http://docs.php.net/manual/en/solrinputdocument.addfield.php 302 */ 303 public function addField($fieldName, $fieldValue, $fieldBoostValue = 0.0) {} 304 305 /** 306 * Resets the document by dropping all the fields and resets the document boost to zero 307 * 308 * @link http://docs.php.net/manual/en/solrinputdocument.clear.php 309 * @return bool Returns TRUE on success or FALSE on failure 310 */ 311 public function clear() {} 312 313 /** 314 * Removes a field from the document 315 * @param string $fieldName 316 * @link http://docs.php.net/manual/en/solrinputdocument.deletefield.php 317 */ 318 public function deleteField($fieldName) {} 319 320 /** 321 * Checks if a field exists 322 * 323 * @param $fieldName 324 * @return bool 325 * @link http://docs.php.net/manual/en/solrinputdocument.fieldexists.php 326 */ 327 public function fieldExists($fieldName) {} 328 329 /** 330 * Retrieves the current boost value for the document 331 * 332 * @return float 333 * @link http://docs.php.net/manual/en/solrinputdocument.getboost.php 334 */ 335 public function getBoost() {} 336 337 /** 338 * Retrieves a field by name 339 * 340 * @param string $fieldName 341 * @return SolrDocumentField 342 */ 343 public function getField($fieldName) {} 344 345 /** 346 * Retrieves the boost value for a particular field 347 * 348 * @param string $fieldName 349 * @return float 350 * @link http://docs.php.net/manual/en/solrinputdocument.getfieldboost.php 351 */ 352 public function getFieldBoost($fieldName) {} 353 354 /** 355 * Returns the number of fields in the document 356 * 357 * @return int 358 * @link http://docs.php.net/manual/en/solrinputdocument.getfieldcount.php 359 */ 360 public function getFieldCount() {} 361 362 /** 363 * Returns an array containing all the fields in the document 364 * 365 * @return array 366 * @link http://docs.php.net/manual/en/solrinputdocument.getfieldnames.php 367 */ 368 public function getFieldNames() {} 369 370 /** 371 * Merges one input document into another 372 * 373 * @param SolrInputDocument $sourceDoc 374 * @param bool $overwrite 375 * @link http://docs.php.net/manual/en/solrinputdocument.merge.php 376 */ 377 public function merge(SolrInputDocument $sourceDoc, $overwrite = true) {} 378 379 /** 380 * This is an alias of SolrInputDocument::clear 381 * 382 * @return bool 383 * @link http://docs.php.net/manual/en/solrinputdocument.reset.php 384 */ 385 public function reset() {} 386 387 /** 388 * Sets the boost value for this document 389 * 390 * @param float $documentBoostValue 391 * @link http://docs.php.net/manual/en/solrinputdocument.setboost.php 392 */ 393 public function setBoost($documentBoostValue) {} 394 395 /** 396 * Sets the index-time boost value for a field 397 * 398 * @param string $fieldName 399 * @param float $fieldBoostValue 400 * @link http://docs.php.net/manual/en/solrinputdocument.setfieldboost.php 401 */ 402 public function setFieldBoost($fieldName, $fieldBoostValue) {} 403 404 /** 405 * Sorts the fields within the document 406 * 407 * @param int $sortOrderBy 408 * @param int $sortDirection One of the SolrInputDocument::SORT_* constants 409 * @link http://docs.php.net/manual/en/solrinputdocument.sort.php 410 */ 411 public function sort($sortOrderBy, $sortDirection = SolrInputDocument::SORT_ASC) {} 412 413 /** 414 * Returns an array representation of the input document 415 * 416 * @return array 417 * @link http://docs.php.net/manual/en/solrinputdocument.toarray.php 418 */ 419 public function toArray() {} 420 421 /** 422 * Adds a child document 423 * 424 * @param SolrInputDocument $child 425 * @return void 426 * @throws SolrIllegalArgumentException 427 * @throws SolrException 428 */ 429 public function addChildDocument(SolrInputDocument $child) {} 430 431 /** 432 * Adds child documents 433 * 434 * @param array $children 435 * @return void 436 * @throws SolrIllegalArgumentException 437 * @throws SolrException 438 */ 439 public function addChildDocuments(array $children) {} 440 441 /** 442 * Whether this input document has child documents 443 * 444 * @return bool 445 */ 446 public function hasChildDocuments() {} 447 448 /** 449 * Returns an array of child documents (SolrInputDocument) 450 * 451 * @return array 452 */ 453 public function getChildDocuments() {} 454 455 /** 456 * Returns the number of child documents 457 * 458 * @return int 459 */ 460 public function getChildDocumentsCount() {} 461 462 /** 463 * Set document version to enable optimistic concurrency mode using self::VERSION_* constants 464 * or asserting version match 465 * 466 * @param int $version 467 */ 468 public function setVersion($version) {} 469 470 /** 471 * @return int 472 */ 473 public function getVersion() {} 474 475 public function __clone() {} 476 public function __construct() {} 477 public function __destruct() {} 478} 479 480/** 481 * Represents a Solr document retrieved from a query response 482 * 483 * @link http://docs.php.net/manual/en/class.solrdocument.php 484 * @author Israel Ekpo <iekpo@php.net> 485 * @author Omar Shaban <omars@php.net> 486 */ 487final class SolrDocument implements ArrayAccess, Iterator, Serializable 488{ 489 const SORT_DEFAULT = 1 ; 490 const SORT_ASC = 1 ; 491 const SORT_DESC = 2 ; 492 const SORT_FIELD_NAME = 1 ; 493 const SORT_FIELD_VALUE_COUNT = 2 ; 494 const SORT_FIELD_BOOST_VALUE = 4 ; 495 496 public function __construct() {} 497 public function __clone() {} 498 public function __destruct() {} 499 500 /** 501 * Adds a field to the document 502 * 503 * @param string $fieldName 504 * @param string $fieldValue 505 * @return Returns TRUE on success or FALSE on failure 506 * @link http://docs.php.net/manual/en/solrdocument.addfield.php 507 */ 508 public function addField($fieldName, $fieldValue) {} 509 510 /** 511 * Drops all the fields in the document 512 * 513 * @return Returns TRUE on success or FALSE on failure 514 * @link http://docs.php.net/manual/en/solrdocument.addfield.php 515 */ 516 public function clear() {} 517 518 /** 519 * Retrieves the current field 520 * 521 * @return SolrDocumentField 522 * @link http://docs.php.net/manual/en/solrdocument.current.php 523 */ 524 public function current() {} 525 526 /** 527 * Removes a field from the document 528 * 529 * @param string $fieldName 530 * @link http://docs.php.net/manual/en/solrdocument.deletefield.php 531 */ 532 public function deleteField($fieldName) {} 533 534 /** 535 * Checks if a field exists in the document 536 * @param string $fieldName 537 * @return Returns TRUE if the field is present and FALSE if it does not 538 * @link http://docs.php.net/manual/en/solrdocument.fieldexists.php 539 */ 540 public function fieldExists($fieldName) {} 541 542 /** 543 * Magic method for accessing the field as a property 544 * 545 * @param string $fieldName 546 * @link http://docs.php.net/manual/en/solrdocument.get.php 547 */ 548 public function __get($fieldName) {} 549 550 /** 551 * Retrieves a field by name 552 * 553 * @param string $fieldName 554 * @return SolrDocumentField 555 */ 556 public function getField($fieldName) {} 557 558 /** 559 * Returns the number of fields in this document. Multi-value fields are only counted once. 560 * 561 * @return int 562 * @link http://docs.php.net/manual/en/solrdocument.getfieldcount.php 563 */ 564 public function getFieldCount() {} 565 566 /** 567 * Returns an array of fields names in the document 568 * 569 * @return array 570 * @link http://docs.php.net/manual/en/solrdocument.getfieldcount.php 571 */ 572 public function getFieldNames() {} 573 574 /** 575 * Returns a SolrInputDocument equivalent of the object 576 * 577 * @return SolrInputDocument 578 * @link http://docs.php.net/manual/en/solrdocument.getinputdocument.php 579 */ 580 public function getInputDocument() {} 581 582 public function __isset($fieldName) {} 583 584 public function key() {} 585 586 /** 587 * Merges source to the current SolrDocument 588 * 589 * @param SolrDocument $sourceDoc 590 * @param bool $overwrite 591 * @link http://docs.php.net/manual/en/solrdocument.merge.php 592 */ 593 public function merge(SolrDocument $sourceDoc, $overwrite = true) {} 594 595 public function next() {} 596 597 public function offsetExists($fieldName) {} 598 599 public function offsetGet($fieldName) {} 600 601 public function offsetSet($fieldName, $fieldValue) {} 602 603 public function offsetUnset($fieldName) {} 604 605 public function reset() {} 606 607 public function rewind() {} 608 609 public function serialize() {} 610 611 public function __set($fieldName, $fieldValue) {} 612 613 public function sort($sortOrderBy, $sortDirection) {} 614 615 public function toArray() {} 616 617 public function unserialize($serialized) {} 618 619 public function __unset($fieldName) {} 620 621 public function valid() {} 622 623 /** 624 * Checks whether this document contains child documents 625 * 626 * @return bool 627 */ 628 public function hasChildDocuments() {} 629 630 /** 631 * Returns an array of child documents (SolrDocument) 632 * 633 * @return array 634 */ 635 public function getChildDocuments() {} 636 637 /** 638 * Returns the number of child documents 639 * 640 * @return int 641 */ 642 public function getChildDocumentsCount() {} 643} 644 645/** 646 * 647 * @author Israel Ekpo <iekpo@php.net> 648 */ 649class SolrObject implements ArrayAccess 650{ 651 652 /* Methods */ 653 public function __construct() {} 654 public function __destruct() {} 655 public function getPropertyNames() {} 656 public function offsetExists($property_name) {} 657 public function offsetGet($property_name) {} 658 public function offsetSet($property_name, $property_value) {} 659 public function offsetUnset($property_name) {} 660} 661 662/** 663 * 664 * @author Israel Ekpo <iekpo@php.net> 665 * @author Omar Shaban <omars@php.net> 666 */ 667final class SolrClient 668{ 669 /* Constants */ 670 const SEARCH_SERVLET_TYPE = 1 ; 671 const UPDATE_SERVLET_TYPE = 2 ; 672 const THREADS_SERVLET_TYPE = 4 ; 673 const PING_SERVLET_TYPE = 8 ; 674 const TERMS_SERVLET_TYPE = 16 ; 675 const SYSTEM_SERVLET_TYPE = 32; 676 677 const DEFAULT_SEARCH_SERVLET = 'select' ; 678 const DEFAULT_UPDATE_SERVLET = 'update' ; 679 const DEFAULT_THREADS_SERVLET = 'admin/threads' ; 680 const DEFAULT_PING_SERVLET = 'admin/ping' ; 681 const DEFAULT_TERMS_SERVLET = 'terms' ; 682 const DEFAULT_SYSTEM_SERVLET = 'admin/system' ; 683 684 /** 685 * Constructor 686 * 687 * @param array $clientOptions 688 */ 689 public function __construct(array $clientOptions) {} 690 691 public function __destruct() {} 692 693 /** 694 * Adds a document to the index 695 * 696 * @param SolrInputDocument $doc 697 * @param bool $overwrite 698 * @param int $commitWithin 0 means disabled 699 * @return SolrUpdateResponse 700 */ 701 public function addDocument(SolrInputDocument &$doc, $overwrite = true, $commitWithin = 0) {} 702 703 /** 704 * Adds a collection of SolrInputDocument instances to the index 705 * 706 * @param array $docs An array of SolrInputDocument objects 707 * @param bool $overwrite 708 * @param int $commitWithin 709 * @return SolrUpdateResponse 710 */ 711 public function addDocuments(array &$docs, $overwrite = true, $commitWithin = 0) {} 712 713 714 /** 715 * Finalizes all add/deletes made to the index 716 * 717 * @param bool $softCommit 718 * @param bool $waitSearcher 719 * @param bool $expungeDeletes 720 * @return SolrUpdateResponse 721 */ 722 public function commit($softCommit = false, $waitSearcher = true, $expungeDeletes = false) {} 723 724 /** 725 * Get Document By Id. Utilizes Solr Realtime Get (RTG). 726 * 727 * @param string $id 728 * @return SolrQueryResponse 729 */ 730 public function getById($id) {} 731 732 /** 733 * Get Documents by their Ids. Utilizes Solr Realtime Get (RTG). 734 * 735 * @param array $ids 736 * @return SolrQueryResponse 737 */ 738 public function getByIds(array $ids) {} 739 740 /** 741 * Deletes the document with the specified ID. 742 * 743 * Where ID is the value of the uniqueKey field declared in the schema 744 * 745 * @param string $id 746 * @return SolrUpdateResponse 747 */ 748 public function deleteById($id) {} 749 750 /** 751 * Deletes a collection of documents with the specified set of ids 752 * 753 * @param array $ids 754 * @return SolrUpdateResponse 755 */ 756 public function deleteByIds(array $ids) {} 757 758 /** 759 * Removes all documents matching any of the queries 760 * 761 * @param array $queries 762 * @return SolrUpdateResponse 763 */ 764 public function deleteByQueries(array $queries) {} 765 766 /** 767 * Deletes all documents matching the given query 768 * 769 * @param string $query 770 * @return SolrUpdateResponse 771 */ 772 public function deleteByQuery($query) {} 773 774 /** 775 * Returns the debug data for the last connection attempt 776 * 777 * @return string 778 */ 779 public function getDebug() {} 780 781 /** 782 * Returns the client options set internally 783 * 784 * @return array 785 */ 786 public function getOptions() {} 787 788 /** 789 * Defragments the index for faster search performance 790 * 791 * @param int $maxSegments 792 * @param bool $softCommit 793 * @param bool $waitSearcher 794 * @return SolrUpdateResponse 795 */ 796 public function optimize($maxSegments = 1, $softCommit = false, $waitSearcher = true) {} 797 798 /** 799 * Checks if Solr server is still up 800 * 801 * @return SolrPingResponse 802 */ 803 public function ping() {} 804 805 /** 806 * Sends a query to the server 807 * 808 * @param SolrParams $query 809 * @return SolrQueryResponse 810 */ 811 public function query(SolrParams $query) {} 812 813 /** 814 * Sends a raw XML update request to the server 815 * 816 * @param string $raw_request 817 * @return SolrUpdateResponse 818 */ 819 public function request($raw_request) {} 820 821 /** 822 * Rollbacks all add/deletes made to the index since the last commit 823 * 824 * @return SolrUpdateResponse 825 */ 826 public function rollback() {} 827 828 /** 829 * Changes the specified servlet type to a new value 830 * 831 * @param int $type 832 * @param string $value 833 * 834 * @return bool 835 * @link http://docs.php.net/manual/en/solrclient.setservlet.php 836 */ 837 public function setServlet($type, $value) {} 838 839 /** 840 * Checks the threads status 841 * 842 * @return SolrGenericResponse 843 * @link http://docs.php.net/manual/en/solrclient.threads.php 844 */ 845 public function threads() {} 846 847 /** 848 * Retrieve Solr Server System Information 849 * 850 * @return SolrGenericResponse 851 */ 852 public function system() {} 853} 854 855/** 856 * @author Omar Shaban <omars@php.net> 857 * 858 * @link https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Solr+Cell+using+Apache+Tika 859 */ 860class SolrExtractRequest 861{ 862 /** 863 * Capture the specified fields (and everything included below it that isn't capture by some other capture field) separately from the default. This is different 864 * from the case of passing in an XPath expression. 865 * <p> 866 * The Capture field is based on the localName returned to the SolrContentHandler 867 * by Tika, not to be confused by the mapped field. The field name can then 868 * be mapped into the index schema. 869 * <p> 870 * For instance, a Tika document may look like: 871 * <pre> 872 * <html> 873 * ... 874 * <body> 875 * <p>some text here. <div>more text</div></p> 876 * Some more text 877 * </body> 878 * </pre> 879 * By passing in the p tag, you could capture all P tags separately from the rest of the t 880 * Thus, in the example, the capture of the P tag would be: "some text here. more text" 881 * 882 */ 883 const CAPTURE_ELEMENTS = 'capture'; 884 885 /** 886 * Capture attributes separately according to the name of the element, instead of just adding them to the string 887 * buffer. 888 */ 889 const CAPTURE_ATTRIBUTES = 'captureAttr'; 890 891 /** 892 * Commit document within X number of milliseconds. 893 */ 894 const COMMIT_WITHIN = 'commitWithin'; 895 896 /** 897 * Defines the date format patterns to identify in the documents. 898 */ 899 const DATE_FORMATS = 'date.formats'; 900 901 /** 902 * If specified and the name of a potential field cannot be determined, the default Field specified will be used 903 * instead. 904 */ 905 const DEFAULT_FIELD = 'defaultField'; 906 907 /** 908 * Only extract and return the content, do not index it. 909 */ 910 const EXTRACT_ONLY = 'extractOnly'; 911 912 /** 913 * Content output format if extractOnly is true. (accepts: xml|text, default xml) 914 */ 915 const EXTRACT_FORMAT = 'extractFormat'; 916 917 /** 918 * If true, exceptions found during processing will be skipped. Any metadata available, however, will be indexed. 919 */ 920 const IGNORE_TIKA_EXCEPTION = 'ignoreTikaException'; 921 922 /** 923 * Literal field values will by default override other values such as metadata and content. 924 */ 925 const LITERALS_OVERRIDE = 'literalsOverride'; 926 927 /** 928 * Map all generated attribute names to field names with lowercase and underscores. 929 */ 930 const LOWERNAMES = 'lowernames'; 931 932 /** 933 * Useful if uploading very large documents, this defines the KB size of documents to allow. 934 */ 935 const MULTIPART_UPLOAD_LIMIT = 'multipartUploadLimitInKB'; 936 937 /** 938 * If specified, loads the file as a source for password lookups for Tika encrypted documents. 939 * 940 * File format is Java properties format with one key=value per line. The key is evaluated as a regex against 941 * the file name, and the value is the password The rules are evaluated top-bottom, 942 * i.e. the first match will be used If you want a fallback password to be always used, 943 * supply a .*=<defaultmypassword> at the end 944 */ 945 const PASSWORD_MAP_FILE = 'passwordsFile'; 946 947 /** 948 * The file name. If specified, Tika can take this into account while guessing the MIME type. 949 */ 950 const RESOURCE_NAME = 'resource.name'; 951 952 /** 953 * The password for this resource. Will be used instead of the rule based password lookup mechanisms. 954 */ 955 const RESOURCE_PASSWORD = 'resource.password'; 956 957 /** 958 * Tika config path 959 */ 960 const TIKE_CONFIG = 'tika.config'; 961 962 /** 963 * If specified, the prefix will be prepended to all Metadata, such that it would be possible to setup a 964 * dynamic field to automatically capture it. 965 */ 966 const UNKNOWN_FIELD_PREFIX = 'uprefix'; 967 968 /** 969 * Restrict the extracted parts of a document to be indexed by passing in an XPath expression. 970 */ 971 const XPATH_EXPRESSION = 'xpath'; 972 973 /** 974 * Mapping Tika metadata to Solr fields. (parameter prefix) 975 */ 976 const FIELD_MAPPING_PREFIX = 'fmap.'; 977 978 /** 979 * Boost value for the name of the field. (parameter prefix) 980 */ 981 const FIELD_BOOST_PREFIX = 'boost.'; 982 983 /** 984 * Pass in literal values to be added to the document, as is. (parameter prefix) 985 */ 986 const LITERALS_PREFIX = 'literal.'; 987 988 private function __construct(); 989 990 /** 991 * @param string $filename 992 * @param SolrModifiableParams $params 993 * 994 * @return SolrExtractRequest 995 */ 996 public static function createFromFile($filename, SolrModifiableParams $params); 997 998 /** 999 * Create request from a binary stream 1000 * 1001 * @param string $content 1002 * @param string $contentType 1003 * @param SolrModifiableParams $params 1004 * 1005 * @return SolrExtractRequest 1006 */ 1007 public static function createFromStream($content, $contentType, SolrModifiableParams $params); 1008} 1009 1010/** 1011 * 1012 * @author Israel Ekpo <iekpo@php.net> 1013 */ 1014class SolrResponse { 1015 1016 /* Constants */ 1017 const PARSE_SOLR_OBJ = 0 ; 1018 const PARSE_SOLR_DOC = 1 ; 1019 1020 /* Properties */ 1021 protected $http_status; 1022 1023 protected $parser_mode; 1024 1025 protected $success; 1026 1027 protected $http_status_message; 1028 1029 protected $http_request_url; 1030 1031 protected $http_raw_request_headers; 1032 1033 protected $http_raw_request; 1034 1035 protected $http_raw_response_headers; 1036 1037 protected $http_raw_response; 1038 1039 protected $http_digested_response; 1040 1041 /* Methods */ 1042 public function __construct() {} 1043 public function __destruct() {} 1044 1045 /** 1046 * Returns the XML response as serialized PHP data 1047 * 1048 * @return string 1049 * @link http://docs.php.net/manual/en/solrresponse.getdigestedresponse.php 1050 */ 1051 public function getDigestedResponse() {} 1052 1053 /** 1054 * @return int 1055 * @link http://docs.php.net/manual/en/solrresponse.gethttpstatus.php 1056 */ 1057 public function getHttpStatus() {} 1058 1059 /** 1060 * @return string 1061 * @link http://docs.php.net/manual/en/solrresponse.gethttpstatusmessage.php 1062 */ 1063 public function getHttpStatusMessage() {} 1064 1065 /** 1066 * @return string 1067 * @link http://docs.php.net/manual/en/solrresponse.getrawrequest.php 1068 */ 1069 public function getRawRequest() {} 1070 1071 /** 1072 * @return string 1073 * @link http://docs.php.net/manual/en/solrresponse.getrawrequestheaders.php 1074 */ 1075 public function getRawRequestHeaders() {} 1076 1077 /** 1078 * @return string 1079 * @link http://docs.php.net/manual/en/solrresponse.getrawresponse.php 1080 */ 1081 public function getRawResponse() {} 1082 1083 /** 1084 * Returns the raw response headers from the server 1085 * 1086 * @return string 1087 * @link http://docs.php.net/manual/en/solrresponse.getrawresponseheaders.php 1088 */ 1089 public function getRawResponseHeaders() {} 1090 1091 /** 1092 * Returns the full URL the request was sent to 1093 * 1094 * @return string 1095 * @link http://docs.php.net/manual/en/solrresponse.getrequesturl.php 1096 */ 1097 public function getRequestUrl() {} 1098 1099 /** 1100 * Returns a SolrObject representing the XML response from the server 1101 * 1102 * @return SolrObject 1103 * @link http://docs.php.net/manual/en/solrresponse.getresponse.php 1104 */ 1105 public function getResponse() {} 1106 1107 /** 1108 * @param int $parser_mode 1109 * @return bool 1110 * @link http://docs.php.net/manual/en/solrresponse.setparsemode.php 1111 */ 1112 public function setParseMode($parser_mode) {} 1113 1114 /** 1115 * @return bool 1116 * @link http://docs.php.net/manual/en/solrresponse.success.php 1117 */ 1118 public function success() {} 1119} 1120 1121/** 1122 * 1123 * @author Israel Ekpo <iekpo@php.net> 1124 */ 1125class SolrQueryResponse extends SolrResponse 1126{ 1127 1128} 1129 1130/** 1131 * 1132 * @author Israel Ekpo <iekpo@php.net> 1133 */ 1134class SolrUpdateResponse extends SolrResponse 1135{ 1136 1137} 1138 1139/** 1140 * 1141 * @author Israel Ekpo <iekpo@php.net> 1142 */ 1143class SolrPingResponse extends SolrResponse 1144{ 1145 1146} 1147 1148/** 1149 * 1150 * @author Israel Ekpo <iekpo@php.net> 1151 */ 1152class SolrGenericResponse extends SolrResponse 1153{ 1154 1155} 1156 1157/** 1158 * 1159 * @author Israel Ekpo <iekpo@php.net> 1160 */ 1161abstract class SolrParams implements Serializable 1162{ 1163 /** 1164 * This is an alias for SolrParams::addParam 1165 * 1166 * @param $name 1167 * @param $value 1168 * @return SolrParams 1169 */ 1170 public function add($name, $value) {} 1171 1172 /** 1173 * Adds a parameter to the object 1174 * 1175 * @param string $name Param name 1176 * @param string $value Param value 1177 * @return SolrParams 1178 */ 1179 public function addParam($name, $value) {} 1180 1181 /** 1182 * This is an alias for SolrParams::getParam 1183 * 1184 * Returns an array or string depending on the type of parameter 1185 * 1186 * @param string $param_name 1187 * 1188 * @return mixed 1189 */ 1190 public function get($param_name) {} 1191 1192 /** 1193 * Returns an array or string depending on the type of parameter 1194 * 1195 * @param string $param_name 1196 * 1197 * @return mixed 1198 */ 1199 public function getParam($param_name) {} 1200 1201 /** 1202 * Returns an array of non URL-encoded parameters 1203 * 1204 * @return array 1205 */ 1206 public function getParams() {} 1207 1208 /** 1209 * Returns an array on URL-encoded parameters 1210 * 1211 * @return array 1212 */ 1213 public function getPreparedParams() {} 1214 1215 /** 1216 * Used for custom serialization 1217 * 1218 * @return string 1219 */ 1220 public function serialize() {} 1221 1222 /** 1223 * 1224 * @param $name 1225 * @param $value 1226 * @return SolrParams 1227 */ 1228 public function set($name, $value) {} 1229 1230 /** 1231 * 1232 * @param $name 1233 * @param $value 1234 * @return SolrParams 1235 */ 1236 public function setParam($name, $value) {} 1237 1238 /** 1239 * Returns all the name-value pair parameters in the object 1240 * 1241 * @param bool $url_encode Whether to return URL-encoded values 1242 * 1243 * @return string 1244 */ 1245 public function toString($url_encode) {} 1246 1247 /** 1248 * Used for Custom serialization 1249 * 1250 * @param string $serialized 1251 * @return void 1252 */ 1253 public function unserialize($serialized) {} 1254} 1255 1256/** 1257 * Represents a collection of name-value pairs sent to the Solr server during a request 1258 * 1259 * @author Israel Ekpo <iekpo@php.net> 1260 */ 1261class SolrModifiableParams extends SolrParams implements Serializable 1262{ 1263 public function __construct() {} 1264 1265 public function __destruct() {} 1266 1267 /** 1268 * This is an alias for SolrParams::addParam 1269 * 1270 * @param $name 1271 * @param $value 1272 * @return SolrModifiableParams 1273 */ 1274 public function add($name, $value) {} 1275 1276 /** 1277 * Adds a parameter to the object 1278 * 1279 * @param string $name Param name 1280 * @param string $value Param value 1281 * @return SolrParams 1282 */ 1283 public function addParam($name, $value) {} 1284 1285 /** 1286 * Returns an array on URL-encoded parameters 1287 * 1288 * @return array 1289 */ 1290 public function getPreparedParams() {} 1291 1292 /** 1293 * Used for custom serialization 1294 * 1295 * @return string 1296 */ 1297 public function serialize() {} 1298 1299 /** 1300 * 1301 * @param $name 1302 * @param $value 1303 * @return SolrModifiableParams 1304 */ 1305 public function set($name, $value) {} 1306 1307 /** 1308 * 1309 * @param $name 1310 * @param $value 1311 * @return SolrModifiableParams 1312 */ 1313 public function setParam($name, $value) {} 1314 1315 /** 1316 * Returns all the name-value pair parameters in the object 1317 * 1318 * @param bool $url_encode Whether to return URL-encoded values 1319 * 1320 * @return string 1321 */ 1322 public function toString($url_encode) {} 1323 1324 /** 1325 * Used for Custom serialization 1326 * 1327 * @param string $serialized 1328 * @return void 1329 */ 1330 public function unserialize($serialized) {} 1331} 1332 1333/** 1334 * 1335 * @author Israel Ekpo <iekpo@php.net> 1336 * @author Omar Shaban <omars@php.net> 1337 */ 1338class SolrQuery extends SolrModifiableParams implements Serializable { 1339 1340 /* Constants */ 1341 const ORDER_ASC = 0 ; 1342 const ORDER_DESC = 1 ; 1343 const FACET_SORT_INDEX = 0 ; 1344 const FACET_SORT_COUNT = 1 ; 1345 const TERMS_SORT_INDEX = 0 ; 1346 const TERMS_SORT_COUNT = 1 ; 1347 1348 /** 1349 * 1350 * @param string $q Query string 1351 */ 1352 public function __construct($q = null) {} 1353 1354 public function __destruct() {} 1355 1356 /** 1357 * This is an alias for SolrParams::addParam 1358 * 1359 * @param $name 1360 * @param $value 1361 * @return SolrQuery 1362 */ 1363 public function add($name, $value) {} 1364 1365 /** 1366 * Adds a parameter to the object 1367 * 1368 * @param string $name Param name 1369 * @param string $value Param value 1370 * @return SolrParams 1371 */ 1372 public function addParam($name, $value) {} 1373 1374 /** 1375 * This is an alias for SolrParams::getParam 1376 * 1377 * Returns an array or string depending on the type of parameter 1378 * 1379 * @param string $param_name 1380 * 1381 * @return mixed 1382 */ 1383 public function get($param_name) {} 1384 1385 /** 1386 * Returns an array or string depending on the type of parameter 1387 * 1388 * @param string $param_name 1389 * 1390 * @return mixed 1391 */ 1392 public function getParam($param_name) {} 1393 1394 /** 1395 * Returns an array of non URL-encoded parameters 1396 * 1397 * @return array 1398 */ 1399 public function getParams() {} 1400 1401 /** 1402 * Returns an array on URL-encoded parameters 1403 * 1404 * @return array 1405 */ 1406 public function getPreparedParams() {} 1407 1408 /** 1409 * Used for custom serialization 1410 * 1411 * @return string 1412 */ 1413 public function serialize() {} 1414 1415 /** 1416 * 1417 * @param $name 1418 * @param $value 1419 * @return SolrQuery 1420 */ 1421 public function set($name, $value) {} 1422 1423 /** 1424 * 1425 * @param $name 1426 * @param $value 1427 * @return SolrQuery 1428 */ 1429 public function setParam($name, $value) {} 1430 1431 /** 1432 * Returns all the name-value pair parameters in the object 1433 * 1434 * @param bool $url_encode Whether to return URL-encoded values 1435 * 1436 * @return string 1437 */ 1438 public function toString($url_encode) {} 1439 1440 /** 1441 * Used for Custom serialization 1442 * 1443 * @param string $serialized 1444 * @return void 1445 */ 1446 public function unserialize($serialized) {} 1447 1448 /** 1449 * @param string $dateField 1450 * @return SolrQuery 1451 * @link http://docs.php.net/manual/en/solrquery.addfacetdatefield.php 1452 */ 1453 public function addFacetDateField($dateField) {} 1454 1455 /** 1456 * Adds another facet.date.other parameter 1457 * 1458 * @param string $value 1459 * @param string $field_override [optional] Field name for the override 1460 * @return SolrQuery 1461 * @link http://docs.php.net/manual/en/solrquery.addfacetdateother.php 1462 */ 1463 public function addFacetDateOther($value, $field_override = null) {} 1464 1465 /** 1466 * Adds another field to the facet 1467 * 1468 * @param string $field 1469 * @return SolrQuery 1470 * @link http://docs.php.net/manual/en/solrquery.addfacetfield.php 1471 */ 1472 public function addFacetField($field) {} 1473 1474 /** 1475 * @param string $facetQuery 1476 * @return SolrQuery 1477 * @link http://docs.php.net/manual/en/solrquery.addfacetquery.php 1478 */ 1479 public function addFacetQuery($facetQuery) {} 1480 1481 /** 1482 * @param string $field 1483 * @return SolrQuery 1484 * @link http://docs.php.net/manual/en/solrquery.addfield.php 1485 */ 1486 public function addField($field) {} 1487 1488 /** 1489 * @param string $fq 1490 * @return SolrQuery 1491 * @link http://docs.php.net/manual/en/solrquery.addfilterquery.php 1492 */ 1493 public function addFilterQuery($fq) {} 1494 1495 /** 1496 * @param string $field 1497 * @return SolrQuery 1498 * @link http://docs.php.net/manual/en/solrquery.addhighlightfield.php 1499 */ 1500 public function addHighlightField($field) {} 1501 1502 /** 1503 * @param string $field 1504 * @return SolrQuery 1505 * @link http://docs.php.net/manual/en/solrquery.addmltfield.php 1506 */ 1507 public function addMltField($field) {} 1508 1509 /** 1510 * @param string $field 1511 * @param float $boost 1512 * @return SolrQuery 1513 * @link http://docs.php.net/manual/en/solrquery.addmltqueryfield.php 1514 */ 1515 public function addMltQueryField($field, $boost) {} 1516 1517 /** 1518 * @param string $field 1519 * @param int $order 1520 * @return SolrQuery 1521 * @link http://docs.php.net/manual/en/solrquery.addsortfield.php 1522 */ 1523 public function addSortField($field, $order) {} 1524 1525 /** 1526 * @param string $field 1527 * @return SolrQuery 1528 * @link http://docs.php.net/manual/en/solrquery.addstatsfacet.php 1529 */ 1530 public function addStatsFacet($field) {} 1531 1532 /** 1533 * @param string $field 1534 * @return SolrQuery 1535 * @link http://docs.php.net/manual/en/solrquery.addstatsfield.php 1536 */ 1537 public function addStatsField($field) {} 1538 1539 /** 1540 * @return bool 1541 * @link http://docs.php.net/manual/en/solrquery.getfacet.php 1542 */ 1543 public function getFacet() {} 1544 1545 /** 1546 * @param string $field_override [optional] 1547 * @return string 1548 * @link http://docs.php.net/manual/en/solrquery.getfacetdateend.php 1549 */ 1550 public function getFacetDateEnd($field_override = null) {} 1551 1552 /** 1553 * @return array 1554 * @link http://docs.php.net/manual/en/solrquery.getfacetdatefields.php 1555 */ 1556 public function getFacetDateFields() {} 1557 1558 /** 1559 * @param string $field_override [optional] 1560 * @return string 1561 * @link http://docs.php.net/manual/en/solrquery.getfacetdategap.php 1562 */ 1563 public function getFacetDateGap($field_override = null) {} 1564 1565 /** 1566 * @param string $field_override [optional] 1567 * @return string 1568 * @link http://docs.php.net/manual/en/solrquery.getfacetdatehardend.php 1569 */ 1570 public function getFacetDateHardEnd($field_override = null) {} 1571 1572 /** 1573 * @param string $field_override [optional] 1574 * @return array 1575 * @link http://docs.php.net/manual/en/solrquery.getfacetdateother.php 1576 */ 1577 public function getFacetDateOther($field_override = null) {} 1578 1579 /** 1580 * @param string $field_override [optional] 1581 * @return string 1582 * @link http://docs.php.net/manual/en/solrquery.getfacetdatestart.php 1583 */ 1584 public function getFacetDateStart($field_override = null) {} 1585 1586 /** 1587 * @return array 1588 * @link http://docs.php.net/manual/en/solrquery.getfacetfields.php 1589 */ 1590 public function getFacetFields() {} 1591 1592 /** 1593 * @param string $field_override [optional] 1594 * @return int 1595 * @link http://docs.php.net/manual/en/solrquery.getfacetlimit.php 1596 */ 1597 public function getFacetLimit($field_override) {} 1598 1599 /** 1600 * @param string $field_override [optional] 1601 * @return string 1602 * @link http://docs.php.net/manual/en/solrquery.getfacetmethod.php 1603 */ 1604 public function getFacetMethod($field_override) {} 1605 1606 /** 1607 * @param string $field_override [optional] 1608 * @return int 1609 * @link http://docs.php.net/manual/en/solrquery.getfacetmincount.php 1610 */ 1611 public function getFacetMinCount($field_override) {} 1612 1613 /** 1614 * @param string $field_override [optional] 1615 * 1616 * @return bool 1617 * @link http://docs.php.net/manual/en/solrquery.getfacetmissing.php 1618 */ 1619 public function getFacetMissing($field_override) {} 1620 1621 /** 1622 * @param string $field_override [optional] 1623 * 1624 * @return int 1625 * @link http://docs.php.net/manual/en/solrquery.getfacetoffset.php 1626 */ 1627 public function getFacetOffset($field_override) {} 1628 1629 /** 1630 * @param string $field_override [optional] 1631 * 1632 * @return string 1633 * @link http://docs.php.net/manual/en/solrquery.getfacetprefix.php 1634 */ 1635 public function getFacetPrefix($field_override) {} 1636 1637 /** 1638 * @return array 1639 * @link http://docs.php.net/manual/en/solrquery.getfacetqueries.php 1640 */ 1641 public function getFacetQueries() {} 1642 1643 /** 1644 * @param string $field_override [optional] 1645 * 1646 * @return int 1647 * @link http://docs.php.net/manual/en/solrquery.getfacetsort.php 1648 */ 1649 public function getFacetSort($field_override) {} 1650 1651 /** 1652 * @return array 1653 * @link http://docs.php.net/manual/en/solrquery.getfields.php 1654 */ 1655 public function getFields() {} 1656 1657 /** 1658 * @return array 1659 * @link http://docs.php.net/manual/en/solrquery.getfilterqueries.php 1660 */ 1661 public function getFilterQueries() {} 1662 1663 /** 1664 * @return bool 1665 * @link http://docs.php.net/manual/en/solrquery.gethighlight.php 1666 */ 1667 public function getHighlight() {} 1668 1669 /** 1670 * @param string $field_override [optional] 1671 * 1672 * @return string 1673 * @link http://docs.php.net/manual/en/solrquery.gethighlightalternatefield.php 1674 */ 1675 public function getHighlightAlternateField($field_override = null) {} 1676 1677 /** 1678 * @return array 1679 * @link http://docs.php.net/manual/en/solrquery.gethighlightfields.php 1680 */ 1681 public function getHighlightFields() {} 1682 1683 /** 1684 * @param string $field_override [optional] 1685 * 1686 * @return string 1687 * @link http://docs.php.net/manual/en/solrquery.gethighlightformatter.php 1688 */ 1689 public function getHighlightFormatter($field_override = null) {} 1690 1691 /** 1692 * @param string $field_override [optional] 1693 * @return string 1694 * @link http://docs.php.net/manual/en/solrquery.gethighlightfragmenter.php 1695 */ 1696 public function getHighlightFragmenter($field_override = null) {} 1697 1698 /** 1699 * @param string $field_override [optional] 1700 * @return int 1701 * @link http://docs.php.net/manual/en/solrquery.gethighlightfragsize.php 1702 */ 1703 public function getHighlightFragsize($field_override = null) {} 1704 1705 /** 1706 * @return bool 1707 * @link http://docs.php.net/manual/en/solrquery.gethighlighthighlightmultiterm.php 1708 */ 1709 public function getHighlightHighlightMultiTerm() {} 1710 1711 /** 1712 * @param string $field_override [optional] 1713 * @return int 1714 * @link http://docs.php.net/manual/en/solrquery.gethighlightmaxalternatefieldlength.php 1715 */ 1716 public function getHighlightMaxAlternateFieldLength($field_override = null) {} 1717 1718 /** 1719 * @return int 1720 * @link http://docs.php.net/manual/en/solrquery.gethighlightmaxanalyzedchars.php 1721 */ 1722 public function getHighlightMaxAnalyzedChars() {} 1723 1724 /** 1725 * @param string $field_override [optional] 1726 * @return bool 1727 * @link http://docs.php.net/manual/en/solrquery.gethighlightmergecontiguous.php 1728 */ 1729 public function getHighlightMergeContiguous($field_override = null) {} 1730 1731 /** 1732 * @return int 1733 * @link http://docs.php.net/manual/en/solrquery.gethighlightregexmaxanalyzedchars.php 1734 */ 1735 public function getHighlightRegexMaxAnalyzedChars() {} 1736 1737 /** 1738 * @return string 1739 * @link http://docs.php.net/manual/en/solrquery.gethighlightregexpattern.php 1740 */ 1741 public function getHighlightRegexPattern() {} 1742 1743 /** 1744 * @return float 1745 * @link http://docs.php.net/manual/en/solrquery.gethighlightregexslop.php 1746 */ 1747 public function getHighlightRegexSlop() {} 1748 1749 /** 1750 * @return bool 1751 * @link http://docs.php.net/manual/en/solrquery.gethighlightrequirefieldmatch.php 1752 */ 1753 public function getHighlightRequireFieldMatch() {} 1754 1755 /** 1756 * @param string $field_override [optional] 1757 * @return string 1758 * @link http://docs.php.net/manual/en/solrquery.gethighlightsimplepost.php 1759 */ 1760 public function getHighlightSimplePost($field_override = null) {} 1761 1762 /** 1763 * @param string $field_override [optional] 1764 * @return string 1765 * @link http://docs.php.net/manual/en/solrquery.gethighlightsimplepre.php 1766 */ 1767 public function getHighlightSimplePre($field_override = null) {} 1768 1769 /** 1770 * @param string $field_override [optional] 1771 * @return int 1772 * @link http://docs.php.net/manual/en/solrquery.gethighlightsnippets.php 1773 */ 1774 public function getHighlightSnippets($field_override = null) {} 1775 1776 /** 1777 * @return bool 1778 * @link http://docs.php.net/manual/en/solrquery.gethighlightusephrasehighlighter.php 1779 */ 1780 public function getHighlightUsePhraseHighlighter() {} 1781 1782 /** 1783 * @return bool 1784 * @link http://docs.php.net/manual/en/solrquery.getmlt.php 1785 */ 1786 public function getMlt() {} 1787 1788 /** 1789 * @return bool 1790 * @link http://docs.php.net/manual/en/solrquery.getmltboost.php 1791 */ 1792 public function getMltBoost() {} 1793 1794 /** 1795 * @return int 1796 * @link http://docs.php.net/manual/en/solrquery.getmltcount.php 1797 */ 1798 public function getMltCount() {} 1799 1800 /** 1801 * @return array 1802 * @link http://docs.php.net/manual/en/solrquery.getmltfields.php 1803 */ 1804 public function getMltFields() {} 1805 1806 /** 1807 * @return int 1808 * @link http://docs.php.net/manual/en/solrquery.getmltmaxnumqueryterms.php 1809 */ 1810 public function getMltMaxNumQueryTerms() {} 1811 1812 /** 1813 * @return int 1814 * @link http://docs.php.net/manual/en/solrquery.getmltmaxnumtokens.php 1815 */ 1816 public function getMltMaxNumTokens() {} 1817 1818 /** 1819 * @return int 1820 * @link http://docs.php.net/manual/en/solrquery.getmltmaxwordlength.php 1821 */ 1822 public function getMltMaxWordLength() {} 1823 1824 /** 1825 * @return int 1826 * @link http://docs.php.net/manual/en/solrquery.getmltmindocfrequency.php 1827 */ 1828 public function getMltMinDocFrequency() {} 1829 1830 /** 1831 * @return int 1832 * @link http://docs.php.net/manual/en/solrquery.getmltmintermfrequency.php 1833 */ 1834 public function getMltMinTermFrequency() {} 1835 1836 /** 1837 * @return int 1838 * @link http://docs.php.net/manual/en/solrquery.getmltminwordlength.php 1839 */ 1840 public function getMltMinWordLength() {} 1841 1842 /** 1843 * @return array 1844 * @link http://docs.php.net/manual/en/solrquery.getmltqueryfields.php 1845 */ 1846 public function getMltQueryFields() {} 1847 1848 /** 1849 * @return string 1850 * @link http://docs.php.net/manual/en/solrquery.getquery.php 1851 */ 1852 public function getQuery() {} 1853 1854 /** 1855 * @return int 1856 * @link http://docs.php.net/manual/en/solrquery.getrows.php 1857 */ 1858 public function getRows() {} 1859 1860 /** 1861 * @return array 1862 * @link http://docs.php.net/manual/en/solrquery.getsortfields.php 1863 */ 1864 public function getSortFields() {} 1865 1866 /** 1867 * @return int 1868 * @link http://docs.php.net/manual/en/solrquery.getstart.php 1869 */ 1870 public function getStart() {} 1871 1872 /** 1873 * @return bool 1874 * @link http://docs.php.net/manual/en/solrquery.getstats.php 1875 */ 1876 public function getStats() {} 1877 1878 /** 1879 * @return array 1880 * @link http://docs.php.net/manual/en/solrquery.getstatsfacets.php 1881 */ 1882 public function getStatsFacets() {} 1883 1884 /** 1885 * @return array 1886 * @link http://docs.php.net/manual/en/solrquery.getstatsfields.php 1887 */ 1888 public function getStatsFields() {} 1889 1890 /** 1891 * @return bool 1892 * @link http://docs.php.net/manual/en/solrquery.getterms.php 1893 */ 1894 public function getTerms() {} 1895 1896 /** 1897 * @return string 1898 * @link http://docs.php.net/manual/en/solrquery.gettermsfield.php 1899 */ 1900 public function getTermsField() {} 1901 1902 /** 1903 * @return bool 1904 * @link http://docs.php.net/manual/en/solrquery.gettermsincludelowerbound.php 1905 */ 1906 public function getTermsIncludeLowerBound() {} 1907 1908 /** 1909 * @return bool 1910 * @link http://docs.php.net/manual/en/solrquery.gettermsincludeupperbound.php 1911 */ 1912 public function getTermsIncludeUpperBound() {} 1913 1914 /** 1915 * @return int 1916 * @link http://docs.php.net/manual/en/solrquery.gettermslimit.php 1917 */ 1918 public function getTermsLimit() {} 1919 1920 /** 1921 * @return string 1922 * @link http://docs.php.net/manual/en/solrquery.gettermslowerbound.php 1923 */ 1924 public function getTermsLowerBound() {} 1925 1926 /** 1927 * @return int 1928 * @link http://docs.php.net/manual/en/solrquery.gettermsmaxcount.php 1929 */ 1930 public function getTermsMaxCount() {} 1931 1932 /** 1933 * @return int 1934 * @link http://docs.php.net/manual/en/solrquery.gettermsmincount.php 1935 */ 1936 public function getTermsMinCount() {} 1937 1938 /** 1939 * @return string 1940 * @link http://docs.php.net/manual/en/solrquery.gettermsprefix.php 1941 */ 1942 public function getTermsPrefix() {} 1943 1944 /** 1945 * @return bool 1946 * @link http://docs.php.net/manual/en/solrquery.gettermsreturnraw.php 1947 */ 1948 public function getTermsReturnRaw() {} 1949 1950 /** 1951 * @return int 1952 * @link http://docs.php.net/manual/en/solrquery.gettermssort.php 1953 */ 1954 public function getTermsSort() {} 1955 1956 /** 1957 * @return string 1958 * @link http://docs.php.net/manual/en/solrquery.gettermsupperbound.php 1959 */ 1960 public function getTermsUpperBound() {} 1961 1962 /** 1963 * @return int 1964 * @link http://docs.php.net/manual/en/solrquery.gettimeallowed.php 1965 */ 1966 public function getTimeAllowed() {} 1967 1968 /** 1969 * @param string $field 1970 * @return SolrQuery 1971 * @link http://docs.php.net/manual/en/solrquery.removefacetdatefield.php 1972 */ 1973 public function removeFacetDateField($field) {} 1974 1975 /** 1976 * @param string $value 1977 * @param string $field_override [optional] 1978 * @return SolrQuery 1979 * @link http://docs.php.net/manual/en/solrquery.removefacetdateother.php 1980 */ 1981 public function removeFacetDateOther($value, $field_override) {} 1982 1983 /** 1984 * @param string $field 1985 * @return SolrQuery 1986 * @link http://docs.php.net/manual/en/solrquery.removefacetfield.php 1987 */ 1988 public function removeFacetField($field) {} 1989 1990 /** 1991 * @param string $value 1992 * @return SolrQuery 1993 * @link http://docs.php.net/manual/en/solrquery.removefacetquery.php 1994 */ 1995 public function removeFacetQuery($value) {} 1996 1997 /** 1998 * @param string $field 1999 * @return SolrQuery 2000 * @link http://docs.php.net/manual/en/solrquery.removefield.php 2001 */ 2002 public function removeField($field) {} 2003 2004 /** 2005 * @param string $fq 2006 * @return SolrQuery 2007 * @link http://docs.php.net/manual/en/solrquery.removefilterquery.php 2008 */ 2009 public function removeFilterQuery($fq) {} 2010 2011 /** 2012 * @param string $field 2013 * @return SolrQuery 2014 * @link http://docs.php.net/manual/en/solrquery.removehighlightfield.php 2015 */ 2016 public function removeHighlightField($field) {} 2017 2018 /** 2019 * @param string $field 2020 * @return SolrQuery 2021 * @link http://docs.php.net/manual/en/solrquery.removemltfield.php 2022 */ 2023 public function removeMltField($field) {} 2024 2025 /** 2026 * @param string $queryField 2027 * @return SolrQuery 2028 * @link http://docs.php.net/manual/en/solrquery.removemltqueryfield.php 2029 */ 2030 public function removeMltQueryField($queryField) {} 2031 2032 /** 2033 * @param string $field 2034 * @return SolrQuery 2035 * @link http://docs.php.net/manual/en/solrquery.removesortfield.php 2036 */ 2037 public function removeSortField($field) {} 2038 2039 /** 2040 * @param string $value 2041 * @return SolrQuery 2042 * @link http://docs.php.net/manual/en/solrquery.removestatsfacet.php 2043 */ 2044 public function removeStatsFacet($value) {} 2045 2046 /** 2047 * @param string $field 2048 * @return SolrQuery 2049 * @link http://docs.php.net/manual/en/solrquery.removestatsfield.php 2050 */ 2051 public function removeStatsField($field) {} 2052 2053 /** 2054 * @param bool $flag 2055 * @return SolrQuery 2056 * @link http://docs.php.net/manual/en/solrquery.setechohandler.php 2057 */ 2058 public function setEchoHandler($flag) {} 2059 2060 /** 2061 * @param string $type 2062 * @return SolrQuery 2063 * @link http://docs.php.net/manual/en/solrquery.setechoparams.php 2064 */ 2065 public function setEchoParams($type) {} 2066 2067 /** 2068 * @param string $query 2069 * @return SolrQuery 2070 * @link http://docs.php.net/manual/en/solrquery.setexplainother.php 2071 */ 2072 public function setExplainOther($query) {} 2073 2074 /** 2075 * @param bool $flag 2076 * @return SolrQuery 2077 * @link http://docs.php.net/manual/en/solrquery.setfacet.php 2078 */ 2079 public function setFacet($flag) {} 2080 2081 /** 2082 * @param string $value 2083 * @param string $field_override [optional] 2084 * @return SolrQuery 2085 * @link http://docs.php.net/manual/en/solrquery.setfacetdateend.php 2086 */ 2087 public function setFacetDateEnd($value, $field_override) {} 2088 2089 /** 2090 * @param string $value 2091 * @param string $field_override [optional] 2092 * @return SolrQuery 2093 * @link http://docs.php.net/manual/en/solrquery.setfacetdategap.php 2094 */ 2095 public function setFacetDateGap($value, $field_override) {} 2096 2097 /** 2098 * @param bool $value 2099 * @param string $field_override [optional] 2100 * @return SolrQuery 2101 * @link http://docs.php.net/manual/en/solrquery.setfacetdatehardend.php 2102 */ 2103 public function setFacetDateHardEnd($value, $field_override) {} 2104 2105 /** 2106 * @param string $value 2107 * @param string $field_override [optional] 2108 * @return SolrQuery 2109 * @link http://docs.php.net/manual/en/solrquery.setfacetdatestart.php 2110 */ 2111 public function setFacetDateStart($value, $field_override) {} 2112 2113 /** 2114 * @param int $frequency 2115 * @param string $field_override [optional] 2116 * @return SolrQuery 2117 * @link http://docs.php.net/manual/en/solrquery.setfacetenumcachemindefaultfrequency.php 2118 */ 2119 public function setFacetEnumCacheMinDefaultFrequency($frequency, $field_override = null) {} 2120 2121 /** 2122 * @param int $limit 2123 * @param string $field_override [optional] 2124 * @return SolrQuery 2125 * @link http://docs.php.net/manual/en/solrquery.setfacetlimit.php 2126 */ 2127 public function setFacetLimit($limit, $field_override = null) {} 2128 2129 /** 2130 * @param string $method 2131 * @param string $field_override [optional] 2132 * @return SolrQuery 2133 * @link http://docs.php.net/manual/en/solrquery.setfacetmethod.php 2134 */ 2135 public function setFacetMethod($method, $field_override = null) {} 2136 2137 /** 2138 * @param int $mincount 2139 * @param string $field_override [optional] 2140 * @return SolrQuery 2141 * @link http://docs.php.net/manual/en/solrquery.setfacetmincount.php 2142 */ 2143 public function setFacetMinCount($mincount, $field_override = null) {} 2144 2145 /** 2146 * @param bool $flag 2147 * @param string $field_override [optional] 2148 * @return SolrQuery 2149 * @link http://docs.php.net/manual/en/solrquery.setfacetmissing.php 2150 */ 2151 public function setFacetMissing($flag, $field_override = null) {} 2152 2153 /** 2154 * @param int $offset 2155 * @param string $field_override [optional] 2156 * @return SolrQuery 2157 * @link http://docs.php.net/manual/en/solrquery.setfacetoffset.php 2158 */ 2159 public function setFacetOffset($offset, $field_override = null) {} 2160 2161 /** 2162 * @param string $prefix 2163 * @param string $field_override [optional] 2164 * @return SolrQuery 2165 * @link http://docs.php.net/manual/en/solrquery.setfacetprefix.php 2166 */ 2167 public function setFacetPrefix($prefix, $field_override = null) {} 2168 2169 /** 2170 * @param int $facetSort 2171 * @param string $field_override [optional] 2172 * @return SolrQuery 2173 * @link http://docs.php.net/manual/en/solrquery.setfacetsort.php 2174 */ 2175 public function setFacetSort($facetSort, $field_override = null) {} 2176 2177 /** 2178 * Enables or disables highlighting 2179 * 2180 * @param bool $flag 2181 * @return SolrQuery 2182 * @link http://docs.php.net/manual/en/solrquery.sethighlight.php 2183 */ 2184 public function setHighlight($flag) {} 2185 2186 /** 2187 * Specifies the highlithing backup field to use 2188 * 2189 * @param string $field 2190 * @param string $field_override [optional] 2191 * @return SolrQuery 2192 * @link http://docs.php.net/manual/en/solrquery.sethighlightalternatefield.php 2193 */ 2194 public function setHighlightAlternateField($field, $field_override = null) {} 2195 2196 /** 2197 * Specify a formatter for the highlight output 2198 * 2199 * @param string $formatter 2200 * @param string $field_override [optional] 2201 * @return SolrQuery 2202 * @link http://docs.php.net/manual/en/solrquery.sethighlightformatter.php 2203 */ 2204 public function setHighlightFormatter($formatter, $field_override) {} 2205 2206 /** 2207 * Sets a text snippet generator for highlighted text 2208 * 2209 * @param string $fragmenter 2210 * @param string $field_override 2211 * @return SolrQuery 2212 * @link http://docs.php.net/manual/en/solrquery.sethighlightfragmenter.php 2213 */ 2214 public function setHighlightFragmenter($fragmenter, $field_override = null) {} 2215 2216 /** 2217 * The size of fragments to consider for highlighting 2218 * 2219 * @param int $size Size (in characters) of fragments to consider for highlighting 2220 * @param string $field_override Name of the field 2221 * @return SolrQuery 2222 * @link http://docs.php.net/manual/en/solrquery.sethighlightfragsize.php 2223 */ 2224 public function setHighlightFragsize($size, $field_override = null) {} 2225 2226 /** 2227 * @param bool $flag 2228 * @return SolrQuery 2229 * @link http://docs.php.net/manual/en/solrquery.sethighlighthighlightmultiterm.php 2230 */ 2231 public function setHighlightHighlightMultiTerm($flag) {} 2232 2233 /** 2234 * Sets the maximum number of characters of the field to return 2235 * 2236 * @param int $fieldLength Length of the field 2237 * @param string $field_override Name of the field 2238 * @return SolrQuery 2239 * @link http://docs.php.net/manual/en/solrquery.sethighlightmaxalternatefieldlength.php 2240 */ 2241 public function setHighlightMaxAlternateFieldLength($fieldLength, $field_override = null) {} 2242 2243 /** 2244 * Specifies the number of characters into a document to look for suitable snippets 2245 * 2246 * @param int $value The number of characters into a document to look for suitable snippets 2247 * @return SolrQuery 2248 * @link http://docs.php.net/manual/en/solrquery.sethighlightmaxanalyzedchars.php 2249 */ 2250 public function setHighlightMaxAnalyzedChars($value) {} 2251 2252 /** 2253 * Sets whether or not to collapse contiguous fragments into a single fragment 2254 * 2255 * @param bool $flag Whether or not to collapse contiguous fragments into a single fragment 2256 * @param null $field_override 2257 * @return SolrQuery 2258 * @link http://docs.php.net/manual/en/solrquery.sethighlightmergecontiguous.php 2259 */ 2260 public function setHighlightMergeContiguous($flag, $field_override = null) {} 2261 2262 /** 2263 * Specify the maximum number of characters to analyze 2264 * 2265 * @param int $maxAnalyzedChars 2266 * @return SolrQuery 2267 * @link http://docs.php.net/manual/en/solrquery.sethighlightregexmaxanalyzedchars.php 2268 */ 2269 public function setHighlightRegexMaxAnalyzedChars($maxAnalyzedChars) {} 2270 2271 /** 2272 * Specify the regular expression for fragmenting 2273 * 2274 * @param string $value The regular expression for fragmenting. This could be used to extract sentences 2275 * @return SolrQuery 2276 * @link http://docs.php.net/manual/en/solrquery.sethighlightregexpattern.php 2277 */ 2278 public function setHighlightRegexPattern($value) {} 2279 2280 /** 2281 * Sets the factor by which the regex fragmenter can stray from the ideal fragment size 2282 * 2283 * @param float $factor The factor by which the regex fragmenter can stray from the ideal fragment size 2284 * @return SolrQuery 2285 * @link http://docs.php.net/manual/en/solrquery.sethighlightregexslop.php 2286 */ 2287 public function setHighlightRegexSlop($factor) {} 2288 2289 /** 2290 * Sets whether field matching is required when highlighting 2291 * 2292 * @param bool $flag If TRUE, then a field will only be highlighted if the query 2293 * matched in this particular field. This will only work if 2294 * SolrQuery::setHighlightUsePhraseHighlighter() was set to TRUE 2295 * 2296 * @return SolrQuery 2297 * @link http://docs.php.net/manual/en/solrquery.sethighlightrequirefieldmatch.php 2298 */ 2299 public function setHighlightRequireFieldMatch($flag) {} 2300 2301 /** 2302 * Sets the text which appears after a highlighted term 2303 * 2304 * @param string $simplePost 2305 * @param string $field_override [optional] Name of the field 2306 * @return SolrQuery 2307 * @link http://docs.php.net/manual/en/solrquery.sethighlightsimplepost.php 2308 */ 2309 public function setHighlightSimplePost($simplePost, $field_override = null) {} 2310 2311 /** 2312 * Sets the text which appears before a highlighted term 2313 * 2314 * @param string $simplePre 2315 * @param string $field_override [optional] Name of the field 2316 * @return SolrQuery 2317 * @link http://docs.php.net/manual/en/solrquery.sethighlightsimplepre.php 2318 */ 2319 public function setHighlightSimplePre($simplePre, $field_override = null) {} 2320 2321 /** 2322 * @param int $value Maximum number of highlighted snippets to generate per field 2323 * @param string $field_override [optional] Name of the field 2324 * @return SolrQuery 2325 * @link http://docs.php.net/manual/en/solrquery.sethighlightsnippets.php 2326 */ 2327 public function setHighlightSnippets($value, $field_override = null) {} 2328 2329 /** 2330 * Whether to highlight phrase terms only when they appear within the query phrase 2331 * 2332 * @param bool $flag 2333 * @return SolrQuery 2334 * @link http://docs.php.net/manual/en/solrquery.sethighlightusephrasehighlighter.php 2335 */ 2336 public function setHighlightUsePhraseHighlighter($flag) {} 2337 2338 /** 2339 * Enables or disables moreLikeThis 2340 * 2341 * @param bool $flag TRUE enables it and FALSE turns it off 2342 * 2343 * @return SolrQuery Returns the current SolrQuery object 2344 * @link http://docs.php.net/manual/en/solrquery.setmlt.php 2345 */ 2346 public function setMlt($flag) {} 2347 2348 /** 2349 * Set if the query will be boosted by the interesting term relevance 2350 * 2351 * @param bool $flag 2352 * @return SolrQuery Returns the current SolrQuery object 2353 * @link http://docs.php.net/manual/en/solrquery.setmltboost.php 2354 */ 2355 public function setMltBoost($flag) {} 2356 2357 /** 2358 * Set the number of similar documents to return for each result 2359 * 2360 * @param int $count 2361 * @return SolrQuery Returns the current SolrQuery object 2362 * @link http://docs.php.net/manual/en/solrquery.setmltcount.php 2363 */ 2364 public function setMltCount($count) {} 2365 2366 /** 2367 * Sets the maximum number of query terms included 2368 * 2369 * @param int $value The maximum number of query terms that will be included in any generated query 2370 * @return SolrQuery Returns the current SolrQuery object 2371 * @link http://docs.php.net/manual/en/solrquery.setmltmaxnumqueryterms.php 2372 */ 2373 public function setMltMaxNumQueryTerms($value) {} 2374 2375 /** 2376 * Specifies the maximum number of tokens to parse 2377 * 2378 * @param int $value The maximum number of tokens to parse 2379 * 2380 * @return SolrQuery Returns the current SolrQuery object 2381 * @link http://docs.php.net/manual/en/solrquery.setmltmaxnumtokens.php 2382 */ 2383 public function setMltMaxNumTokens($value) {} 2384 2385 /** 2386 * Sets the maximum word length 2387 * 2388 * @param int $maxWordLength The maximum word length above which words will be ignored 2389 * @return SolrQuery Returns the current SolrQuery object 2390 * @link http://docs.php.net/manual/en/solrquery.setmltmaxwordlength.php 2391 */ 2392 public function setMltMaxWordLength($maxWordLength) {} 2393 2394 /** 2395 * The frequency at which words will be ignored which do not occur in at least this many docs 2396 * 2397 * @param int $minDocFrequency 2398 * 2399 * @return SolrQuery Returns the current SolrQuery object 2400 * @link http://docs.php.net/manual/en/solrquery.setmltmindocfrequency.php 2401 */ 2402 public function setMltMinDocFrequency($minDocFrequency) {} 2403 2404 /** 2405 * Sets the frequency below which terms will be ignored in the source docs 2406 * 2407 * @param int $minTermFrequency 2408 * @return SolrQuery Returns the current SolrQuery object 2409 * @link http://docs.php.net/manual/en/solrquery.setmltmintermfrequency.php 2410 */ 2411 public function setMltMinTermFrequency($minTermFrequency) {} 2412 2413 /** 2414 * Sets the minimum word length below which words will be ignored 2415 * 2416 * @param int $minWordLength 2417 * @return SolrQuery Returns the current SolrQuery object 2418 * @link http://docs.php.net/manual/en/solrquery.setmltminwordlength.php 2419 */ 2420 public function setMltMinWordLength($minWordLength) {} 2421 2422 /** 2423 * Exclude the header from the returned results 2424 * 2425 * @param bool $flag TRUE excludes the header from the result 2426 * @return SolrQuery Returns the current SolrQuery object 2427 * @link http://docs.php.net/manual/en/solrquery.setomitheader.php 2428 */ 2429 public function setOmitHeader($flag) {} 2430 2431 /** 2432 * Sets the search query 2433 * 2434 * @param string $query 2435 * @return SolrQuery Returns the current SolrQuery object 2436 * @link http://docs.php.net/manual/en/solrquery.setquery.php 2437 */ 2438 public function setQuery($query) {} 2439 2440 /** 2441 * Specifies the maximum number of rows to return in the result 2442 * 2443 * @param int $rows 2444 * @return SolrQuery Returns the current SolrQuery object 2445 * @link http://docs.php.net/manual/en/solrquery.setrows.php 2446 */ 2447 public function setRows($rows) {} 2448 2449 /** 2450 * Flag to show debug information 2451 * 2452 * @param bool $flag 2453 * @return SolrQuery Returns the current SolrQuery object 2454 * @link http://docs.php.net/manual/en/solrquery.setshowdebuginfo.php 2455 */ 2456 public function setShowDebugInfo($flag) {} 2457 2458 /** 2459 * Specifies the number of rows to skip 2460 * 2461 * @param int $start 2462 * @return SolrQuery Returns the current SolrQuery object 2463 * @link http://docs.php.net/manual/en/solrquery.setstart.php 2464 */ 2465 public function setStart($start) {} 2466 2467 /** 2468 * Enables or disables the Stats component 2469 * 2470 * @param bool $flag 2471 * @return SolrQuery Returns the current SolrQuery object 2472 * @link http://docs.php.net/manual/en/solrquery.setstats.php 2473 */ 2474 public function setStats($flag) {} 2475 2476 /** 2477 * Enables or disables the TermsComponent 2478 * 2479 * @param bool $flag 2480 * @return SolrQuery Returns the current SolrQuery object 2481 * @link http://docs.php.net/manual/en/solrquery.setterms.php 2482 */ 2483 public function setTerms($flag) {} 2484 2485 /** 2486 * Sets the name of the field to get the Terms from 2487 * 2488 * @param string $fieldname 2489 * @return SolrQuery Returns the current SolrQuery object 2490 * @link http://docs.php.net/manual/en/solrquery.settermsfield.php 2491 */ 2492 public function setTermsField($fieldname) {} 2493 2494 /** 2495 * Sets whether to include the lower bound term in the result set 2496 * 2497 * @param bool $flag 2498 * @return SolrQuery Returns the current SolrQuery object 2499 * @link http://docs.php.net/manual/en/solrquery.settermsincludelowerbound.php 2500 */ 2501 public function setTermsIncludeLowerBound($flag) {} 2502 2503 /** 2504 * Include the upper bound term in the result set 2505 * 2506 * @param bool $flag 2507 * @return SolrQuery Returns the current SolrQuery object 2508 * @link http://docs.php.net/manual/en/solrquery.settermsincludeupperbound.php 2509 */ 2510 public function setTermsIncludeUpperBound($flag) {} 2511 2512 /** 2513 * Sets the maximum number of terms to return 2514 * 2515 * @param int $limit 2516 * @return SolrQuery Returns the current SolrQuery object 2517 * @link http://docs.php.net/manual/en/solrquery.settermslimit.php 2518 */ 2519 public function setTermsLimit($limit) {} 2520 2521 /** 2522 * Specifies the Term to start from 2523 * 2524 * @param string $lowerBound 2525 * @return SolrQuery Returns the current SolrQuery object 2526 * @link http://docs.php.net/manual/en/solrquery.settermslowerbound.php 2527 */ 2528 public function setTermsLowerBound($lowerBound) {} 2529 2530 /** 2531 * Sets the maximum document frequency 2532 * 2533 * @param int $frequency 2534 * @return SolrQuery Returns the current SolrQuery object 2535 * @link http://docs.php.net/manual/en/solrquery.settermsmaxcount.php 2536 */ 2537 public function setTermsMaxCount($frequency) {} 2538 2539 /** 2540 * Sets the minimum document frequency 2541 * 2542 * @param int $frequency 2543 * @return SolrQuery Returns the current SolrQuery object 2544 * @link http://docs.php.net/manual/en/solrquery.settermsmincount.php 2545 */ 2546 public function setTermsMinCount($frequency) {} 2547 2548 /** 2549 * Restrict matches to terms that start with the prefix 2550 * 2551 * @param string $prefix 2552 * @return SolrQuery Returns the current SolrQuery object 2553 * @link http://docs.php.net/manual/en/solrquery.settermsprefix.php 2554 */ 2555 public function setTermsPrefix($prefix) {} 2556 2557 /** 2558 * Return the raw characters of the indexed term 2559 * 2560 * @param bool $flag 2561 * @return SolrQuery Returns the current SolrQuery object 2562 * @link http://docs.php.net/manual/en/solrquery.settermsreturnraw.php 2563 */ 2564 public function setTermsReturnRaw($flag) {} 2565 2566 /** 2567 * Specifies how to sort the returned terms 2568 * 2569 * @param int $sortType If SolrQuery::TERMS_SORT_COUNT, sorts the terms by the term frequency (highest count first). If SolrQuery::TERMS_SORT_INDEX, returns the terms in index order 2570 * @return SolrQuery Returns the current SolrQuery object 2571 * @link http://docs.php.net/manual/en/solrquery.settermssort.php 2572 */ 2573 public function setTermsSort($sortType) {} 2574 2575 /** 2576 * Sets the term to stop at 2577 * 2578 * @param string $upperBound 2579 * @return SolrQuery Returns the current SolrQuery object 2580 * @link http://docs.php.net/manual/en/solrquery.settermsupperbound.php 2581 */ 2582 public function setTermsUpperBound($upperBound) {} 2583 2584 /** 2585 * The time allowed for search to finish 2586 * 2587 * @param int $timeAllowed Time in milliseconds 2588 * @return SolrQuery Returns the current SolrQuery object 2589 * @link http://docs.php.net/manual/en/solrquery.settimeallowed.php 2590 */ 2591 public function setTimeAllowed($timeAllowed) {} 2592 2593 /** 2594 * Collapses the result set to a single document per group before it forwards 2595 * the result set to the rest of the search components. 2596 * So all downstream components (faceting, highlighting, etc...) will work with 2597 * the collapsed result set. 2598 * 2599 * A collapse function object is passed to collapse the query 2600 * 2601 * @param SolrCollapseFunction $function 2602 * @throws SolrMissingMandatoryParameterException 2603 * @return SolrQuery 2604 */ 2605 public function collapse(SolrCollapseFunction $function) {} 2606 2607 /** 2608 * Enable/Disable result grouping (group parameter) 2609 * 2610 * @param bool $value 2611 * @return SolrQuery 2612 */ 2613 public function setGroup($value) {} 2614 2615 /** 2616 * Returns true if grouping is enabled 2617 * @return bool 2618 */ 2619 public function getGroup() {} 2620 2621 /** 2622 * The name of the field by which to group results. The field must be single-valued, and either be indexed 2623 * or a field type that has a value source and works in a function query, 2624 * such as ExternalFileField. It must also be a string-based field, such as StrField or TextField 2625 * 2626 * @param string $value 2627 * @return SolrQuery 2628 */ 2629 public function addGroupField($value) {} 2630 2631 /** 2632 * Returns group fields (group.field parameter values) 2633 * 2634 * @return array 2635 */ 2636 public function getGroupFields() {} 2637 2638 /** 2639 * Adds a group function (group.func parameter) 2640 * Allows grouping results based on the unique values of a function query. 2641 * 2642 * @param string $value 2643 * @return SolrQuery 2644 */ 2645 public function addGroupFunction($value) {} 2646 2647 /** 2648 * Returns group functions (group.func parameter values) 2649 * 2650 * @return array 2651 */ 2652 public function getGroupFunctions () {} 2653 2654 /** 2655 * Adds query to the group.query parameter 2656 * Allows grouping of documents that match the given query. 2657 * 2658 * @param string $value 2659 * @return SolrQuery 2660 */ 2661 public function addGroupQuery($value) {} 2662 2663 /** 2664 * Returns all the group.query parameter values 2665 * 2666 * @return array 2667 */ 2668 public function getGroupQueries() {} 2669 2670 /** 2671 * Specifies the number of results to return for each group. The server default value is 1. 2672 * 2673 * @param integer $value 2674 * @return SolrQuery 2675 */ 2676 public function setGroupLimit($value) {} 2677 2678 /** 2679 * Returns the group.limit value 2680 * @return integer 2681 */ 2682 public function getGroupLimit() {} 2683 2684 /** 2685 * Sets the group.offset parameter. 2686 * @param integer $offset 2687 * @return SolrQuery 2688 */ 2689 public function setGroupOffset($offset) {} 2690 2691 /** 2692 * Returns the group.offset value 2693 * 2694 * @return integer 2695 */ 2696 public function getGroupOffset() {} 2697 2698 /** 2699 * Adds a group sort field (group.sort parameter). 2700 * 2701 * @param string $sort 2702 * @param integer $direction 2703 * @return SolrQuery 2704 */ 2705 public function addGroupSortField($sort, $direction) {} 2706 2707 /** 2708 * Returns the group.sort value 2709 * 2710 * @return array 2711 */ 2712 public function getGroupSortFields() {} 2713 2714 /** 2715 * Sets the group.format parameter. 2716 * If this parameter is set to simple, the grouped documents are presented in a single flat list, and the start and 2717 * rows parameters affect the numbers of documents instead of groups. 2718 * 2719 * @param string $value 2720 * @return SolrQuery 2721 */ 2722 public function setGroupFormat($value) {} 2723 2724 /** 2725 * Returns the group.format value 2726 * 2727 * @return string 2728 */ 2729 public function getGroupFormat() {} 2730 2731 /** 2732 * If true, the result of the first field grouping command is used as the main result list in the response, using group.format=simple. 2733 * 2734 * @param bool $value 2735 * @return SolrQuery 2736 */ 2737 public function setGroupMain($value) {} 2738 2739 /** 2740 * Returns the group.main value 2741 * 2742 * @return bool 2743 */ 2744 public function getGroupMain() {} 2745 2746 /** 2747 * If true, Solr includes the number of groups that have matched the query in the results. 2748 * The default value is false. (group.ngroups parameter) 2749 * 2750 * @param bool $value 2751 * @return SolrQuery 2752 */ 2753 public function setGroupNGroups($value) {} 2754 2755 /** 2756 * Returns the group.ngroups value 2757 * @return bool 2758 */ 2759 public function getGroupNGroups() {} 2760 2761 /** 2762 * If true, facet counts are based on the most relevant document of each group matching the query. 2763 * The server default value is false. 2764 * group.truncate parameter 2765 * 2766 * @param bool $value 2767 * @return SolrQuery 2768 */ 2769 public function setGroupTruncate($value) {} 2770 2771 /** 2772 * Returns the group.truncate value 2773 * 2774 * @return bool 2775 */ 2776 public function getGroupTruncate() {} 2777 2778 /** 2779 * Determines whether to compute grouped facets for the field facets specified in facet.field parameters. 2780 * Grouped facets are computed based on the first specified group. 2781 * group.facet parameter 2782 * 2783 * @param bool $value 2784 * @return SolrQuery 2785 */ 2786 public function setGroupFacet($value) {} 2787 2788 /** 2789 * Returns the group.facet parameter value 2790 * 2791 * @return bool 2792 */ 2793 public function getGroupFacet() {} 2794 2795 /** 2796 * Setting this parameter to a number greater than 0 enables caching for result grouping. 2797 * Result Grouping executes two searches; this option caches the second search. The default value is 0. 2798 * 2799 * Testing has shown that group caching only improves search time with Boolean, wildcard, and fuzzy queries. For simple queries like term or "match all" queries, group caching degrades performance. 2800 * group.cache.percent parameter 2801 * 2802 * @param integer 2803 * @throws SolrIllegalArgumentException 2804 * @return SolrQuery 2805 */ 2806 public function setGroupCachePercent($value) {} 2807 2808 /** 2809 * Returns the group cache percent group.cache.percent value 2810 * 2811 * @return integer 2812 */ 2813 public function getGroupCachePercent() {} 2814 2815 /** 2816 * Sets the expand parameter. This enables or disables group expanding. 2817 * 2818 * @param bool $value 2819 * @return SolrQuery 2820 */ 2821 public function setExpand($value) {} 2822 2823 /** 2824 * Returns true if group expanding is enabled 2825 * @return bool 2826 */ 2827 public function getExpand() {} 2828 2829 /** 2830 * Orders the documents within the expanded groups (expand.sort parameter). 2831 * 2832 * @param string $sort 2833 * @param integer $direction defaults to DESC 2834 * @return SolrQuery 2835 */ 2836 public function addExpandSortField($sort, $direction = SolrQuery::ORDER_DESC) {} 2837 2838 /** 2839 * Removes an expand sort field from the expand.sort parameter. 2840 * 2841 * @param string $field 2842 * @return SolrQuery 2843 */ 2844 public function removeExpandSortField($field) {} 2845 2846 /** 2847 * Returns an array of fields 2848 * 2849 * @return array 2850 */ 2851 public function getExpandSortFields() {} 2852 2853 /** 2854 * Sets the number of rows to display in each group (expand.rows). Server Default 5 2855 * @param integer $rows 2856 * @return SolrQuery 2857 */ 2858 public function setExpandRows($rows) {} 2859 2860 /** 2861 * Returns The number of rows to display in each group (expand.rows) 2862 * 2863 * @return integer 2864 */ 2865 public function getExpandRows() {} 2866 2867 /** 2868 * Sets the expand.q parameter. Overrides the main q parameter, 2869 * determines which documents to include in the main group. 2870 * 2871 * @param string $q 2872 * @return SolrQuery 2873 */ 2874 public function setExpandQuery($q) {} 2875 2876 /** 2877 * Returns the expand query expand.q parameter 2878 * 2879 * @return string 2880 */ 2881 public function getExpandQuery() {} 2882 2883 /** 2884 * Overrides main fq's, determines which documents to include in the main group. 2885 * 2886 * @param string $fq 2887 * @return SolrQuery 2888 */ 2889 public function addExpandFilterQuery($fq) {} 2890 2891 /** 2892 * Removes an expand filter query. 2893 * 2894 * @param string $fq 2895 * @return SolrQuery 2896 */ 2897 public function removeExpandFilterQuery($fq) {} 2898 2899 /** 2900 * Returns the expand filter queries 2901 * 2902 * @return array 2903 */ 2904 public function getExpandFilterQueries() {} 2905 2906} 2907 2908/** 2909 * SolrDisMaxQuery Makes use of the Solr's DisMax query parser 2910 * and eases the use of it using class methods 2911 * 2912 * @author Omar Shaban <omars@php.net> 2913 */ 2914class SolrDisMaxQuery extends SolrQuery { 2915 2916 public function __construct($q = null) {} 2917 2918 /** 2919 * Switch Query Parser to dismax 2920 */ 2921 public function useDisMaxQueryParser() {} 2922 2923 /** 2924 * Switch Query Parser to edismax 2925 */ 2926 public function useEDisMaxQueryParser() {} 2927 2928 /** 2929 * Set Query Alternate (q.alt parameter) 2930 * When the main q parameter is not specified or is blank. The q.alt parameter is used 2931 * 2932 * @param string $q 2933 */ 2934 public function setQueryAlt($q) {} 2935 2936 /** 2937 * Add a query field with optional boost (qf parameter) 2938 * 2939 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Theqf%28QueryFields%29Parameter 2940 * @param string $field 2941 * @param string $boost 2942 * @return SolrDisMaxQuery 2943 */ 2944 public function addQueryField ($field, $boost=null) {} 2945 2946 /** 2947 * Remove query field (qf parameter) 2948 * 2949 * @param string $field 2950 * @return SolrDisMaxQuery 2951 */ 2952 public function removeQueryField($field) {} 2953 2954 /** 2955 * Add a phrase field (pf parameter) 2956 * output format: field~slop^boost 2957 * 2958 * Sample output: title~2^4 2959 * 2960 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thepf%28PhraseFields%29Parameter 2961 * @param string $field 2962 * @param float $boost 2963 * @param integer $slop 2964 * @return SolrDisMaxQuery 2965 */ 2966 public function addPhraseField($field, $boost, $slop=null) {} 2967 2968 /** 2969 * Removes a phrase field (pf parameter) 2970 * @param string $field 2971 * @return SolrDisMaxQuery 2972 */ 2973 public function removePhraseField($field) {} 2974 2975 /** 2976 * Set Phrase Fields (pf parameter) 2977 * @param string $fields 2978 * @return SolrDisMaxQuery 2979 */ 2980 public function setPhraseFields($fields) {} 2981 2982 /** 2983 * Set Phrase Slop (ps parameter) 2984 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Theps%28PhraseSlop%29Parameter 2985 * @param integer $slop 2986 * @return SolrDisMaxQuery 2987 */ 2988 public function setPhraseSlop($slop) {} 2989 2990 /** 2991 * Set Query Phrase Slop (qs parameter) 2992 * 2993 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Theqs%28QueryPhraseSlop%29Parameter 2994 * @param integer $slop 2995 * @return SolrDisMaxQuery 2996 */ 2997 public function setQueryPhraseSlop($slop) {} 2998 2999 /** 3000 * Add a boost query field with value and boost 3001 * Sample Output: type:lucene^2 3002 * 3003 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thebq%28BoostQuery%29Parameter 3004 * 3005 * @param string $field 3006 * @param string $value 3007 * @param string $boost 3008 * @return SolrDisMaxQuery 3009 */ 3010 public function addBoostQuery($field, $value, $boost=null) {} 3011 3012 /** 3013 * Remove a boost query field 3014 * 3015 * @param string $field 3016 * @return SolrDisMaxQuery 3017 */ 3018 public function removeBoostQuery($field) {} 3019 3020 /** 3021 * Sets Boost Query Parameter (bq) 3022 * 3023 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thebq%28BoostQuery%29Parameter 3024 * 3025 * @param string $q 3026 * @return SolrDisMaxQuery 3027 * 3028 */ 3029 public function setBoostQuery($q) {} 3030 3031 /** 3032 * Sets the boost function (bf) 3033 * 3034 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thebf%28BoostFunctions%29Parameter 3035 * 3036 * @param string $function 3037 * @return SolrDisMaxQuery 3038 */ 3039 public function setBoostFunction($function) {} 3040 3041 /** 3042 * Set Tie Minimum *Should* Match parameter (mm) 3043 * 3044 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Themm%28MinimumShouldMatch%29Parameter 3045 * 3046 * @param mixed $value 3047 * @return SolrDisMaxQuery 3048 */ 3049 public function setMinimumMatch($value) {} 3050 3051 /** 3052 * Set Tie Breaker parameter (tie) 3053 * 3054 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thetie%28TieBreaker%29Parameter 3055 * @param float $tieBreaker 3056 * @return SolrDisMaxQuery 3057 */ 3058 public function setTieBreaker($tieBreaker) {} 3059 3060 /** 3061 * Set Bigram Phrase Slop (ps2 parameter) 3062 * 3063 * @see https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser 3064 * 3065 * @param integer $slop 3066 * @return SolrDisMaxQuery 3067 */ 3068 public function setBigramPhraseSlop($slop) {} 3069 3070 /** 3071 * Add a phrase Bigram field (pf2 parameter) 3072 * output format: field~slop^boost 3073 * 3074 * Sample output: title~2^4 3075 * 3076 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thepf%28PhraseFields%29Parameter 3077 * 3078 * @param string $field 3079 * @param float $boost 3080 * @param integer $slop 3081 * @return SolrDisMaxQuery 3082 */ 3083 public function addBigramPhraseField($field, $boost, $slop=null) {} 3084 3085 /** 3086 * Removes phrase bigram field (pf2 parameter) 3087 * 3088 * @param string $field 3089 * @return SolrDisMaxQuery 3090 */ 3091 public function removeBigramPhraseField($field) {} 3092 3093 /** 3094 * Sets pf2 parameter 3095 * 3096 * @param string $fields 3097 * @return SolrDisMaxQuery 3098 */ 3099 public function setBigramPhraseFields($fields) {} 3100 3101 /** 3102 * Add a Trigram Phrase Field (pf3 parameter) 3103 * output format: field~slop^boost 3104 * 3105 * Sample output: title~2^4 3106 * 3107 * @see https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser#TheDisMaxQueryParser-Thepf%28PhraseFields%29Parameter 3108 * @param string $field 3109 * @param float $boost 3110 * @param integer $slop 3111 * @return SolrDisMaxQuery 3112 */ 3113 public function addTrigramPhraseField($field, $boost, $slop=null) {} 3114 3115 /** 3116 * Removes a Trigram Phrase Field (pf3 parameter) 3117 * @param string $field 3118 * @return SolrDisMaxQuery 3119 */ 3120 public function removeTrigramPhraseField($field) {} 3121 3122 /** 3123 * Sets pf3 parameter 3124 * 3125 * @param string $fields 3126 * @return SolrDisMaxQuery 3127 */ 3128 public function setTrigramPhraseFields($fields) {} 3129 3130 /** 3131 * Set Trigram Phrase Slop (ps3 parameter) 3132 * 3133 * @see https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser 3134 * 3135 * @param integer $slop 3136 * @return SolrDisMaxQuery 3137 */ 3138 public function setTrigramPhraseSlop ($slop) {} 3139 3140 /** 3141 * Adds a field to User Fields Parameter (uf) 3142 * 3143 * Specifies which schema fields the end user shall be allowed to query for explicitly. 3144 * This parameter supports wildcards. 3145 * 3146 * @param string $field 3147 * @return SolrDisMaxQuery 3148 */ 3149 public function addUserField($field){} 3150 3151 /** 3152 * Removes a field from User Fields Parameter (uf) 3153 * 3154 * @param string $field 3155 * @return SolrDisMaxQuery 3156 */ 3157 public function removeUserField($field){} 3158 3159 /** 3160 * Sets User Fields parameter (uf) 3161 * 3162 * Specifies which schema fields the end user shall be allowed to query for explicitly. 3163 * This parameter supports wildcards. 3164 * 3165 * @param string $fields 3166 * @return SolrDisMaxQuery 3167 */ 3168 public function setUserFields($fields){} 3169 3170} 3171 3172/** 3173 * Collapses the result set to a single document per group before it forwards 3174 * the result set to the rest of the search components. 3175 * So all downstream components (faceting, highlighting, etc...) will work with 3176 * the collapsed result set. 3177 * 3178 * @see https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results 3179 * 3180 * @author Omar Shaban <omars@php.net> 3181 */ 3182class SolrCollapseFunction 3183{ 3184 3185 const NULLPOLICY_IGNORE = 'ignore'; 3186 3187 const NULLPOLICY_EXPAND = 'expand'; 3188 3189 const NULLPOLICY_COLLAPSE = 'collapse'; 3190 3191 /** 3192 * Accepts the field to collapse on. 3193 * 3194 * @param string $field 3195 */ 3196 public function __construct($field = null) {} 3197 3198 /** 3199 * Set the field that is being collapsed on. 3200 * In order to collapse a result. The field type must be a single valued String, Int or Float. 3201 * 3202 * @param string $field 3203 * @return SolrCollapseFunction 3204 */ 3205 public function setField($field) {} 3206 3207 /** 3208 * Get the field that is being collapsed on. 3209 * 3210 * @return string 3211 */ 3212 public function getField() {} 3213 3214 /** 3215 * Selects the group heads by the max value of a numeric field or function query. 3216 * 3217 * @param string $max 3218 * @return SolrCollapseFunction 3219 */ 3220 public function setMax($max) {} 3221 3222 /** 3223 * Get max 3224 * 3225 * @return string 3226 */ 3227 public function getMax() {} 3228 3229 /** 3230 * Sets the initial size of the collapse data structures when collapsing on a numeric field only. 3231 * 3232 * @param string $min 3233 * @return SolrCollapseFunction 3234 */ 3235 public function setMin($min) {} 3236 3237 /** 3238 * Return min parameter 3239 * 3240 * @return string 3241 */ 3242 public function getMin() {} 3243 3244 /** 3245 * Currently there is only one hint available "top_fc", which stands for top level FieldCache. 3246 * 3247 * @param string $hint 3248 * @return SolrCollapseFunction 3249 */ 3250 public function setHint($hint) {} 3251 3252 /** 3253 * Get collapse hint. 3254 * 3255 * @return string 3256 */ 3257 public function getHint() {} 3258 3259 /** 3260 * Sets the NULL Policy. 3261 * Accepts ignore, expand, or collapse. 3262 * 3263 * @param string $policy 3264 * @return SolrCollapseFunction 3265 */ 3266 public function setNullPolicy($policy) {} 3267 3268 /** 3269 * Returns null policy 3270 * 3271 * @return string 3272 */ 3273 public function getNullPolicy() {} 3274 3275 /** 3276 * Sets the initial size of the collapse data structures when collapsing on a numeric field only. 3277 * 3278 * @param integer $size 3279 * @return SolrCollapseFunction 3280 */ 3281 public function setSize($size) {} 3282 3283 /** 3284 * Gets the initial size of the collapse data structures when collapsing on a numeric field only. 3285 * 3286 * @return integer 3287 */ 3288 public function getSize() {} 3289 3290 /** 3291 * A string representation (Solr LocalParams) of the function. 3292 * @return string 3293 */ 3294 public function __toString() {} 3295} 3296 3297/* phpdoc -f documentation.php --title Solr --parseprivate on --defaultpackagename Solr --output "HTML:frames:phphtmllib" -t solr_phpdoc */ 3298 3299/* 3300 * Local variables: 3301 * tab-width: 4 3302 * c-basic-offset: 4 3303 * End: 3304 * vim600: fdm=marker 3305 * vim: noet sw=4 ts=4 3306 */ 3307