Lines Matching defs:idx

59                     $idx = ($wid < count($index)) ? $index[$wid] : '';
60 $index[$wid] = $this->updateTuple($idx, $pid, $freq);
462 @unlink($conf['indexdir'] . '/page.idx');
463 @unlink($conf['indexdir'] . '/title.idx');
464 @unlink($conf['indexdir'] . '/pageword.idx');
465 @unlink($conf['indexdir'] . '/metadata.idx');
470 str_ends_with($f, '.idx') &&
473 str_ends_with($f, '_w.idx') ||
474 str_ends_with($f, '_i.idx') ||
475 str_ends_with($f, '_p.idx'))
480 @unlink($conf['indexdir'] . '/lengths.idx');
992 * @param string $idx name of the index
998 protected function getIndex($idx, $suffix)
1001 $fn = $conf['indexdir'] . '/' . $idx . $suffix . '.idx';
1009 * @param string $idx name of the index
1016 protected function saveIndex($idx, $suffix, &$lines)
1019 $fn = $conf['indexdir'] . '/' . $idx . $suffix;
1028 io_rename($fn . '.tmp', $fn . '.idx');
1035 * @param string $idx name of the index
1042 protected function getIndexKey($idx, $suffix, $id)
1045 $fn = $conf['indexdir'] . '/' . $idx . $suffix . '.idx';
1060 * @param string $idx name of the index
1068 protected function saveIndexKey($idx, $suffix, $id, $line)
1073 $fn = $conf['indexdir'] . '/' . $idx . $suffix;
1076 $ih = @fopen($fn . '.idx', 'r');
1097 io_rename($fn . '.tmp', $fn . '.idx');
1104 * @param string $idx name of the index
1111 protected function addIndexKey($idx, $suffix, $value)
1113 $index = $this->getIndex($idx, $suffix);
1118 if (!$this->saveIndex($idx, $suffix, $index)) {
1119 trigger_error("Failed to write $idx index", E_USER_ERROR);
1155 $idx = [];
1160 if (file_exists($path . $key . '.idx'))
1161 $idx[] = $key;
1168 $idx[] = $length;
1171 return $idx;