Retrieves meta data about the index from the luke request handler

@param int $numberOfTerms Number of top terms to fetch for each field
@return ResponseAdapter Index meta data
166473
public function getLukeMetaData($numberOfTerms = 0)
    {
        if (!isset($this->lukeData[$numberOfTerms])) {
            $lukeUrl = $this->_constructUrl(
                self::LUKE_SERVLET, ['numTerms' => $numberOfTerms, 'wt' => 'json', 'fl' => '*']
            );

            $this->lukeData[$numberOfTerms] = $this->_sendRawGet($lukeUrl);
        }

        return $this->lukeData[$numberOfTerms];
    }
186841
function GetArrayLimit($nrows,$offset=-1)
	{
		if ($offset <= 0) {
			$arr = $this->GetArray($nrows);
			return $arr;
		}
		for ($i=1; $i < $offset; $i++)
			if (!@OCIFetch($this->_queryID)) {
				$arr = array();
				return $arr;
			}
		$ret = @oci_fetch_array($this->_queryID,$this->fetchMode);
		if ($ret === false) {
			$arr = array();
			return $arr;
		}
		$this->fields = $ret;
		$this->_updatefields();
		$results = array();
		$cnt = 0;
		while (!$this->EOF && $nrows != $cnt) {
			$results[$cnt++] = $this->fields;
			$this->MoveNext();
		}

		return $results;
	}
1254593
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildDealerContentVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(DealerContentVersionTableMap::VERSION);
        $criteria->limit($number);

        return $this->getDealerContentVersions($criteria, $con);
    }
730089
public function getNumberLookup($messageId)
    {
        $numberLookup = $this->factory->createEmptyNumberLookup();
        $numberLookup->populate($messageId);

        return $numberLookup;
    }
775881
public function read($phoneNumber = null, $countryCode = null)
    {
        if(empty($phoneNumber)) {
            throw new InvalidArgumentException('The phone number cannot be empty.');
        }

        $query = null;
        if ($countryCode != null) {
            $query = array("countryCode" => $countryCode);
        }
        $ResourceName = $this->resourceName . '/' . $phoneNumber . '/hlr' ;
        list(, , $body) = $this->HttpClient->performHttpRequest(Common\HttpClient::REQUEST_GET, $ResourceName, $query, null);
        return $this->processRequest($body);
    }
285135
public function count($meta, ...$args)
    {
        $query = $args && $args[0] instanceof Query\Select ? $args[0] : Query\Select::fromParamArgs($args);
        $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
        
        $table = $query->table ?: $meta->table;
        
        list ($where, $params, $props) = $query->buildClause($meta);
        if ($props) {
            $params = $this->mapper->formatParams($meta, $props, $params);
        }

        $t = ($meta->schema ? "`{$meta->schema}`." : null)."`{$table}`";
        $query = "SELECT COUNT(1) FROM $t "
            .($where  ? "WHERE $where" : '');

        $stmt = $this->getConnector()->prepare($query)->execute($params);
        return (int)$stmt->fetchColumn();
    }
894726
public function indexMetrics($num = 1000, $page = 1)
    {
        if ($this->cache != false) {
            return $this->cacheMetrics($num, $page);
        }

        return $this->client->call(
            'GET',
            'metrics',
            [
                'query' => [
                    'per_page' => $num,
                    'current_page' => $page,
                ],
            ]
        );
    }
841876
static function parseMobileNumber($number) {
    // Extract numerics
    $numerics = static::extractNumerics($number);
    // Set country code
    $countryCode = '';
    // Get last 10 digits
    $short = static::right($numerics, 10, $countryCode);
    // Set carrier code
    $carriercode = '';
    // Get number
    $number = static::right($short, 7, $carrierCode);
    // Return
    return compact('countryCode', 'carrierCode', 'number');
  }
257166
public function getResponseOfType($type, $nth = 0)
    {
        if (!in_array($type, [IResponse::TYPE_IS, IResponse::TYPE_PROXY, IResponse::TYPE_INJECT])) {
            throw new \InvalidArgumentException("Unknown response type: '$type'");
        }
        $matches_found = 0;
        foreach ($this->responses as $response) {
            if ($response->getType() === $type && $matches_found++ === $nth) {
                return $response;
            }
        }
        throw new NotFoundException("Unable to find response of type '$type' at position $nth ($matches_found '$type' responses were found)");
    }
1166585
public function numberOfFields()
    {
        // auto reconnect
        $this->connect();
        
        if (isset($this->statement)) {
            $this->statement->store_result();
            return $this->statement->field_count;
        } else if (isset($this->result)) {
            return $this->connection->field_count;
        } else {
            throw new Exception('Error: The database result resource is not currently set.');
        }
    }
595146
public function getStatistics($index = -1, $num = 100)
    {
        if ($index < 0) {
            return $this->statisticsMap;
        }
        $data['total'] = ceil(count($this->statisticsMap) / $num);
        $data['data'] = array_slice($this->statisticsMap, $num * $index, $num);
        return $data;
    }
511136
public function get(array $params) {
        $this->_requireDataType($params);

        if (array_get($params, 'datatype') === self::METHOD_DICTIONARY) {
            return $this->getDictionary();
        } elseif (array_get($params, 'relatedType') && array_get($params, 'id')) {
            list($response, $httpCode) = $this->_getRelatedResults($params);
        } elseif (array_get($params, 'id')) {
            list($response, $httpCode) = $this->_getSingleResult($params);
        } else {
            list($response, $httpCode) = $this->_getIndex($params);
        }

        return $this->_formatResponse($response, $httpCode);
    }
290086
public static String getClassName(ResultSetMetaData meta, int index) throws SQLException {
        switch (meta.getColumnType(index)) {
        case Types.NUMERIC:
            int precision = meta.getPrecision(index);
            if (meta.getScale(index) == 0) {
                if (precision > 18) {
                    return "java.math.BigInteger";
                } else if (precision > 9) {
                    return "java.lang.Long";
                } else if (precision > 4) {
                    return "java.lang.Integer";
                } else if (precision > 2) {
                    return "java.lang.Short";
                } else {
                    return "java.lang.Byte";
                }
            } else {
                if (precision > 16) {
                    return "java.math.BigDecimal";
                } else if (precision > 7) {
                    return "java.lang.Double";
                } else {
                    return "java.lang.Float";
                }
            }
        case Types.TIMESTAMP:
            if (meta.getScale(index) == 0) {
                return "java.sql.Date";
            } else {
                return "java.sql.Timestamp";
            }
        default:
            return meta.getColumnClassName(index);
        }
    }
444836
public function getNumber($number)
    {
        switch ($this->_type) {
            case self::TYPE_ALPHA_UPPER:
                return $this->getAlphaNumber($number);
            case self::TYPE_ALPHA_LOWER:
                return $this->getAlphaNumber($number, true);
            case self::TYPE_ROMAN_UPPER:
                return $this->getRomanNumber($number);
            case self::TYPE_ROMAN_LOWER:
                return $this->getRomanNumber($number, true);
            // default is alpha
            default:
                return $number;
        }
    }
199771
public function getMetaSummaryFields($params = [])
    {
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNDEFAULT', '(default)');
        
        // Create Field Objects:
        
        $fields = [
            HTMLEditorField::create(
                'SummaryMeta',
                $this->owner->fieldLabel('SummaryMeta')
            )->setRows(10),
            $mode = DropdownField::create(
                'SummaryMode',
                $this->owner->fieldLabel('SummaryMode'),
                $this->getSummaryModeOptions()
            )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
        ];
        
        // Define Mode Right Title:
        
        $mode->setRightTitle(
            _t(
                __CLASS__ . '.SUMMARYMODERIGHTTITLE',
                'This mode only applies to summary text automatically generated from the record content.'
            )
        );
        
        // Answer Field Objects:
        
        return FieldList::create([
            FieldSection::create(
                'SummaryMetaSection',
                $this->owner->fieldLabel('SummaryMetaSection'),
                $fields
            )
        ]);
    }
436924
protected function getListViewData($start = null, $rowPerPage = null, $keyword = null, $sortField = null, $sortOrder = null) {
        $list = [];

        if ($this->listViewDataClosure != null) {
            $c = $this->listViewDataClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } elseif ($keyword != null && trim($keyword) != "" && $this->searchClosure != null) {         // For Custom Searching
            $c = $this->searchClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } else {
            $this->beforeGetListViewData(function ($tableName, $findClause, $limit, $bindingData) use (&$list) {

                // For RedBean Case
                $list = R::find($tableName, $findClause . $limit, $bindingData);

            }, function ($sql, $limit, $bindingData) use (&$list) {

                // For SQL Case
                $list = R::getAll($sql . $limit, $bindingData);

                try {
                    $list = R::convertToBeans($this->tableName, $list);
                } catch (\Exception $ex) {

                }

            }, $start, $rowPerPage, $keyword, $sortField, $sortOrder);
        }

        return $list;
    }
268970
protected function getPluralIndex(callable $pluralForm, $number)
    {
        $nplurals = 0;
        $plural = 0;

        call_user_func_array($pluralForm, [&$nplurals, &$plural, $number]);

        if (is_bool($plural)) {
            $plural = $plural ? 1 : 0;
        }

        if ($plural < 0) {
            $plural = 0;
        }

        if ($plural > $nplurals - 1) {
            $plural = $nplurals - 1;
        }

        return $plural;
    }