protected Document doGet(String spaceId, String key) throws IOException {
        Term termGet = buildIdTerm(spaceId, key);
        IndexSearcher indexSearcher = getIndexSearcher();
        TopDocs result = indexSearcher.search(new TermQuery(termGet), 1);
        ScoreDoc[] hits = result != null ? result.scoreDocs : null;
        Document doc = hits != null && hits.length > 0 ? indexSearcher.doc(hits[0].doc) : null;
        return doc;
    }
protected Document doGet ( String spaceId , String key ) throws IOException { Term termGet = buildIdTerm ( spaceId , key ) ; IndexSearcher indexSearcher = getIndexSearcher ( ) ; TopDocs result = indexSearcher . search ( new TermQuery ( termGet ) , 1 ) ; ScoreDoc [ ] hits = result != null ? result . scoreDocs : null ; Document doc = hits != null && hits . length > 0 ? indexSearcher . doc ( hits [ 0 ] . doc ) : null ; return doc ; }
Fetch a document, identified by {@code spaceId:key}, from index.

@param spaceId
@param key
@return
@throws IOException