/** * Filters objects away if they are not indexable. * * @param array $options * @param array $objects * @return array */ protected function filterObjects(array $options, array $objects) { if ($options['skip_indexable_check']) { return $objects; } $index = $options['indexName']; $type = $options['typeName']; $return = array(); foreach ($objects as $object) { if (!$this->indexable->isObjectIndexable($index, $type, $object)) { continue; } $return[] = $object; } return $return; }
/** * Checks if the object is indexable or not. * * @param object $object * * @return bool */ private function isObjectIndexable($object) { return $this->indexable->isObjectIndexable($this->config['indexName'], $this->config['typeName'], $object); }
/** * Checks if a given object should be indexed or not. * * @deprecated To be removed in 4.0 * * @param object $object * * @return bool */ protected function isObjectIndexable($object) { return $this->indexable->isObjectIndexable($this->baseOptions['indexName'], $this->baseOptions['typeName'], $object); }