| @@ 816-824 (lines=9) @@ | ||
| 813 | } |
|
| 814 | ||
| 815 | /// bind per-field weights by name |
|
| 816 | public function setFieldWeights($weights) |
|
| 817 | { |
|
| 818 | assert(is_array($weights)); |
|
| 819 | foreach ($weights as $name => $weight) { |
|
| 820 | assert(is_string($name)); |
|
| 821 | assert(is_int($weight)); |
|
| 822 | } |
|
| 823 | $this->fieldweights = $weights; |
|
| 824 | } |
|
| 825 | ||
| 826 | /// bind per-index weights by name |
|
| 827 | public function setIndexWeights($weights) |
|
| @@ 827-835 (lines=9) @@ | ||
| 824 | } |
|
| 825 | ||
| 826 | /// bind per-index weights by name |
|
| 827 | public function setIndexWeights($weights) |
|
| 828 | { |
|
| 829 | assert(is_array($weights)); |
|
| 830 | foreach ($weights as $index => $weight) { |
|
| 831 | assert(is_string($index)); |
|
| 832 | assert(is_int($weight)); |
|
| 833 | } |
|
| 834 | $this->indexweights = $weights; |
|
| 835 | } |
|
| 836 | ||
| 837 | /// set IDs range to match |
|
| 838 | /// only match records if document ID is beetwen $min and $max (inclusive) |
|