List of usage examples for org.apache.solr.client.solrj SolrClient getById
public SolrDocumentList getById(Collection<String> ids) throws SolrServerException, IOException
From source file:org.phenotips.variantstore.db.solr.SolrVariantUtils.java
License:Open Source License
/** * Retrieve a metadocument that stores all individual ids. * * @param server the solr server to assist communication with a Solr server * * @return a SolrDocument/* w w w .ja v a2 s . c om*/ * @throws SolrServerException SolrServerException * @throws IOException IOException */ public static SolrDocument getMetaDocument(SolrClient server) throws SolrServerException, IOException { SolrDocument metaDoc = server.getById(METADATA_DOC_ID); if (metaDoc == null) { metaDoc = new SolrDocument(); metaDoc.setField(VariantsSchema.ID, METADATA_DOC_ID); metaDoc.setField(VariantsSchema.CALLSET_IDS, Collections.emptyList()); } return metaDoc; }