public function getSearchDocumentSpecifications($storeName, $type=null, $justReturnSpecId=false)
    {

        if(!isset($this->searchDocSpecs[$storeName]) || empty($this->searchDocSpecs[$storeName]))
        {
            return [];
        }
        $specs = [];

        if(empty($type)){
            if($justReturnSpecId){
                $specIds = [];
                foreach($this->searchDocSpecs[$storeName] as $specId=>$spec){
                    $specIds[] = $specId;
                }
                return $specIds;
            } else {
                return $this->searchDocSpecs[$storeName];
            }
        }

        $labeller = $this->getLabeller();
        $typeAsUri = $labeller->uri_to_alias($type);
        $typeAsQName = $labeller->qname_to_alias($type);

        foreach ($this->searchDocSpecs[$storeName] as $spec)
        {
            if(is_array($spec[_ID_TYPE])){
                if(in_array($typeAsUri, $spec[_ID_TYPE]) || in_array($typeAsQName, $spec[_ID_TYPE])){
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            } else {
                if ($spec[_ID_TYPE]==$typeAsUri || $spec[_ID_TYPE]==$typeAsQName)
                {
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            }
        }
        return $specs;
    }