Add one level of scoring
@return OpenSearchServer\Search\Search
505549
public function scoring($field = null, $weight = 1, $ascending = false, $type = self::SCORING_FIELD_ORDER) {
		if(empty($this->data['scorings'])) {
			$this->data['scorings'] = array();
		}
		$newScoring = array(
			'ascending' => (boolean) $ascending,
			'type' => $type,
			'weight' => $weight
		);
		if(!empty($field)) {
			$newScoring['field'] = $field;
		}
		$this->data['scorings'][] = $newScoring;
		return $this;
	}
711215
protected function addFilters()
    {
        $search = static::$versionTransformer->getSearchValue();
        if ($search != '') {
            $this->addAllFilter($search);
        }
        $this->addColumnFilters();
        return $this;
    }
931618
protected function _calculateNumberScore()
    {
        $score = 0;
        $numberCount = $this->_getClassCount(self::CLASS_NUMBER);

        if ($numberCount > 0 && $numberCount != $this->_length) {
            $score += $numberCount * 4;
        }

        return $score;
    }
100560
public function previous_level()
    {
        if (!$this->previous_level) {
            $this->previous_level = new Level(
                $this->level->profile,
                $this->level->number - 1
            );
        }
        return $this->previous_level;
    }
274236
public function majRankPointGame()
    {
        $players = $this->findBy(array(), array('pointGame' => 'DESC'));

        Ranking::addObjectRank($players, 'rankPointGame', array('pointGame'));
        $this->getEntityManager()->flush();
    }
582163
private function getScore()
    {
        $score = [];
        $score_area = $this->_parser->find('h2', 1)->next_sibling();
        if ($score_area->tag == 'table') {
            foreach ($score_area->find('tr') as $each_score) {
                $temp_score = [];

                $temp_score['type'] = $this->getScoreType($each_score);
                $temp_score['vote'] = $this->getScoreVote($each_score);
                $temp_score['percent'] = $this->getScorePercent($each_score);

                $score[] = $temp_score;
            }
        }

        return $score;
    }
1042314
public function incrementTotalAccess()
    {
        $this->redis->incr($this->keyTotal);

        $key = $this->createDailyKey($this->keyTotal);
        $this->redis->incr($key);

        $key = $this->createMonthlyKey($this->keyTotal);
        $this->redis->incr($key);

        $key = $this->createYearlyKey($this->keyTotal);
        $this->redis->incr($key);

        return $this;
    }
1170474
public function add($goal)
    {
        if (is_array($goal)) {
            $this->collection[] = new Goal($goal);
        } elseif (is_object($goal) && $goal instanceof Goal) {
            $this->collection[] = $goal;
        }

        return $this;
    }
662992
public function majRankProof()
    {
        $players = $this->findBy(array(), array('nbChartProven' => 'DESC'));

        Ranking::addObjectRank($players, 'rankProof', array('nbChartProven'));
        $this->getEntityManager()->flush();
    }
745334
public function add($points = 0, $user, $leaderboardType)
    {
        $leaderboard = $this->findOrCreateLeaderboardByUser($user, $leaderboardType);
        $leaderboard->setTotalPoints($leaderboard->getTotalPoints() + $points);
        $leaderboard = $this->getLeaderboardMapper()->update($leaderboard);

        return $leaderboard;
    }
646871
protected function finishQuery() {
        
        $this->query .= ' ' . $this->addLimit($this->criteriaList->getLimit() , $this->criteriaList->getOffset()) .' ) ' . 
                $this->operationSeparator .
                $this->getDriverEscaper()->dbCommand('AS') .
                ' subQuery ) ' . $this->operationSeparator . 
                $this->addSort($this->criteriaList->getSort());
        
        return $this;
    }
524352
public function buildRanking()
    {
        $i = 0;

        return $this->map(function (ComponentInterface $component) use (&$i) {
            return $component->setRanking(++$i);
        });
    }
806755
public function majRankPointChart()
    {
        $players = $this->findBy(array(), array('pointChart' => 'DESC'));

        Ranking::addObjectRank($players, 'rankPointChart', array('pointChart'));
        $this->getEntityManager()->flush();
    }
117194
public function multiLevelCount() {
		$levelCount = 0;
		foreach($this->_dataValues as $dataValueSet) {
			$levelCount = max($levelCount,count($dataValueSet));
		}
		return $levelCount;
	}
988366
final public function setMinLevel($minLevel)
    {
        if (isset($this->levels[$minLevel])) {
            $this->minLevel = $this->levels[$minLevel];
        }
        
        return $this;
    }
609446
function under_score()
    {
        $key = (string) $this;

        $output = strtolower(preg_replace(array('/([a-z\d])([A-Z])/', '/([^_])([A-Z][a-z])/'), '$1_$2', $key));

        return new self($output);
    }
1038803
public function getPercentagePartial()
    {
        $total = $this->getTotal();

        return round((($this->score->getValid() + $this->score->getPartial())/$total) * 100);
    }