Remove the existing entry for the given Document from the index, if it exists.

@param Lucene\Index $index The Zend Lucene Index
@param string $hash
164084
private function removeExisting(Lucene\Index $index, $hash)
    {
        try {
            $hits = $index->find(self::HASH_FIELDNAME . ':' . $hash);
            foreach ($hits as $hit) {
                $index->delete($hit->id);
            }
        } catch (\Exception $ex) {
            // FIXME no result ???
        }
    }
570684
public function dropIndex($index, $table)
    {
        if ($index instanceof Index) {
            $index = $index->getQuotedName($this->_platform);
        }

        $this->_execSql($this->_platform->getDropIndexSQL($index, $table));
    }
351369
private static function RemoveIterator( $iter, $index )
	{
		$pos = 1;

		/**
		 * @var XPathItem $item
		 */
		foreach ( $iter as $item )
		{
		    if ( $index != $pos )
			   yield $item;
		    $pos++;
		}
	}
224489
public function remove($index) {
        $e = $this->elements[$index];
        unset($this->elements[$index]);
        $this->clean();
        $this->fire(new ListDeleteEvent($e, $index));
        return $e;
    }
850182
public function setIndex($index)
    {
        if ($this->index !== $index) {
            $this->index = $index;
            $this->addOrUpdate();
        }
    }
878836
private function needToBeDeleted($index, $result)
    {
        if (array_key_exists(self::ERROR, $result) &&
            (in_array(self::NOT_REGISTERED, $result) || in_array(self::INVALID_REGISTRATION, $result))) {
            if ($this->tokens[$index]) {
                $this->tokensToDelete[] = $this->tokens[$index];
            }

            return true;
        }

        return false;
    }
67146
void remove_document(int index)
    {
        ListIterator<Document<K>> listIterator = documents_.listIterator(index);
        Document<K> document = listIterator.next();
        listIterator.set(null);
        composite_.sub_vector(document.feature());
    }
815566
protected function removeHashes(array $hashes): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(IconFile::class, 'if')
                     ->andWhere('if.hash IN (:hashes)')
                     ->setParameter('hashes', array_values($hashes));

        $queryBuilder->getQuery()->execute();
    }
815669
public function removeElementByName($name, $index = null) {

		if($index !== null) {
			unset($this->elements[$name][$index]);
		}
		else {
			unset($this->elements[$name]);
		}

	}
1265916
def delete(index)
      index = self.index(index) unless index.is_a?(Integer)
      stack.delete_at(index)
    end
992147
private void esDelete(String index, String id) {
        logger.debug("Deleting {}/{}", index, id);
        if (!closed) {
            esClient.delete(index, id);
        } else {
            logger.warn("trying to remove a file while closing crawler. Document [{}]/[{}] has been ignored", index, id);
        }
    }
294709
public function remove($index)
    {
        if (!$index instanceof EntityInterface) {
            $index = $this->getRepository()->get($index);
        }
        
        return $this->findAndRemove($index);
    }
419940
public function deleteHyperlinkByIndex($index)
    {
        //check whether workshett name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() .
            '/worksheets/' . $this->worksheetName . '/hyperlinks/' . $index;
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'DELETE', '', '');
        $json = json_decode($responseStream);
        if ($json->Status == 'OK') {
            return true;
        } else {
            return false;
        }

    }
431678
@Override
	public void remove(String oid) throws IndexerException {
		log.debug("Deleting " + oid + " from index");
		try {
			solr.deleteByQuery("storage_id:\"" + oid + "\"");
			solr.commit();
		} catch (SolrServerException sse) {
			throw new IndexerException(sse);
		} catch (IOException ioe) {
			throw new IndexerException(ioe);
		}
	}
250233
public void clear(int index) {
        if(index < 0 || index >= size)
            throw new IndexOutOfBoundsException("index: " + index);

        int wordIndex=wordIndex(index);
        words[wordIndex]&=~(1L << index);
    }
1207627
private void removeFile(int index) {
        String file = files.remove(index);
        FileLogUtils.deleteFile(directory, file);
    }
652449
public function deleteRecord($index)
    {
        if (isset($this->records[$index])) {
            $this->fileLength -= ($this->records[$index]->getContentLength() + 4);
            $count = count($this->records) - 1;
            for ($i = $index; $i < $count; ++$i) {
                $this->records[$i] = $this->records[$i + 1];
            }
            unset($this->records[count($this->records) - 1]);
            $this->_deleteRecordFromDBF($index);
        }
    }