mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
General updates, see README.txt.
This commit is contained in:
parent
d9e1bf2478
commit
b585dc5fcb
12 changed files with 149 additions and 279 deletions
|
@ -430,7 +430,7 @@ class Zend_Search_Lucene_Index_SegmentInfo
|
|||
$freqPointer = $prevTermInfo->freqPointer;
|
||||
$proxPointer = $prevTermInfo->proxPointer;
|
||||
for ($count = $prevPosition*$indexInterval + 1;
|
||||
$count < $termCount &&
|
||||
$count <= $termCount &&
|
||||
( $this->_getFieldPosition($termFieldNum) < $searchDicField ||
|
||||
($this->_getFieldPosition($termFieldNum) == $searchDicField &&
|
||||
strcmp($termValue, $term->text) < 0) );
|
||||
|
|
|
@ -64,7 +64,16 @@ class Zend_Search_Lucene_Search_QueryTokenizer implements Iterator
|
|||
|
||||
$currentToken = '';
|
||||
for ($count = 0; $count < strlen($inputString); $count++) {
|
||||
if (ctype_alnum( $inputString{$count} )) {
|
||||
if (ctype_alnum( $inputString{$count} ) ||
|
||||
$inputString{$count} == '_') {
|
||||
$currentToken .= $inputString{$count};
|
||||
} else if ($inputString{$count} == '\\') { // Escaped character
|
||||
$count++;
|
||||
|
||||
if ($count == strlen($inputString)) {
|
||||
throw new Zend_Search_Lucene_Exception('Non finished escape sequence.');
|
||||
}
|
||||
|
||||
$currentToken .= $inputString{$count};
|
||||
} else {
|
||||
// Previous token is finished
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue