RESULTS_PER_BLOCK
RESULTS_PER_BLOCK
Default number of documents returned for each block (at most)
This iterator is used to handle querying a network of queue_servers with regard to a query
currentGenDocOffsetWithWord(): mixed
Gets the doc_offset and generation for the next document that would be return by this iterator. As this is not easily determined for a network iterator, this method always returns -1 for this iterator
an array with the desired document offset and generation; -1 on fail
genDocOffsetCmp(array $gen_doc1,array $gen_doc2, $direction = self::ASCENDING): integer
Compares two arrays each containing a (generation, offset) pair.
array | $gen_doc1 | first ordered pair |
array | $gen_doc2 | second ordered pair |
$direction |
-1,0,1 depending on which is bigger
getCurrentDocsForKeys(array $keys = null): array
Gets the summaries associated with the keys provided the keys can be found in the current block of docs returned by this iterator
array | $keys | keys to try to find in the current block of returned results |
doc summaries that match provided keys
nextDocsWithWord( $doc_offset = null): array
Get the current block of doc summaries for the word iterator and advances the current pointer to the next block of documents. If a doc index is the next block must be of docs after this doc_index
$doc_offset | if set the next block must all have $doc_offsets equal to or larger than this value |
doc summaries matching the $this->restrict_phrases
__construct(string $query,array $queue_servers,string $timestamp,\seekquarry\yioop\library\index_bundle_iterators\SearchfiltersModel $filter = null,string $save_timestamp_name = "")
Creates a network iterator with the given parameters.
string | $query | the query that was supplied by the end user that we are trying to get search results for |
array | $queue_servers | urls of yioop instances on which documents indexes live |
string | $timestamp | the timestamp of the particular current index archive bundles that we look in for results |
\seekquarry\yioop\library\index_bundle_iterators\SearchfiltersModel | $filter | Model responsible for keeping track of edited and deleted search results |
string | $save_timestamp_name | if this timestamp is nonzero, then when making queries to separate machines the save_timestamp is sent so the queries on those machine can make savepoints. Note the format of save_timestamp is timestamp-query_part where query_part is the number of the item in a query presentation (usually 0). |