Search in sources :

Example 31 with OrcidSolrDocument

use of org.orcid.utils.solr.entities.OrcidSolrDocument in project ORCID-Source by ORCID.

the class SolrDaoTest method queryStringSearchPatent.

@Test
public void queryStringSearchPatent() throws Exception {
    OrcidSolrDocument firstOrcid = buildAndPersistFirstOrcid();
    String patentQueryString = "patent-numbers:Elec-hammer01X%3A";
    OrcidSolrResults orcidSolrResults = solrDao.findByDocumentCriteria(patentQueryString, null, null);
    List<OrcidSolrResult> solrResultsList = orcidSolrResults.getResults();
    assertTrue(solrResultsList.size() == 1);
    assertEquals(firstOrcid.getOrcid(), solrResultsList.get(0).getOrcid());
}
Also used : OrcidSolrResult(org.orcid.utils.solr.entities.OrcidSolrResult) OrcidSolrDocument(org.orcid.utils.solr.entities.OrcidSolrDocument) OrcidSolrResults(org.orcid.utils.solr.entities.OrcidSolrResults) Test(org.junit.Test)

Aggregations

OrcidSolrDocument (org.orcid.utils.solr.entities.OrcidSolrDocument)31 Test (org.junit.Test)16 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)12 OrcidMessage (org.orcid.jaxb.model.message.OrcidMessage)11 OrcidSolrResult (org.orcid.utils.solr.entities.OrcidSolrResult)9 ArrayList (java.util.ArrayList)4 BaseTest (org.orcid.core.BaseTest)4 Funding (org.orcid.jaxb.model.record_v2.Funding)4 Rollback (org.springframework.test.annotation.Rollback)4 HashMap (java.util.HashMap)3 List (java.util.List)3 OrcidWork (org.orcid.jaxb.model.message.OrcidWork)3 Record (org.orcid.jaxb.model.record_v2.Record)3 OrcidRecordToSolrDocument (org.orcid.listener.solr.OrcidRecordToSolrDocument)3 OrcidSolrResults (org.orcid.utils.solr.entities.OrcidSolrResults)3 ContactDetails (org.orcid.jaxb.model.message.ContactDetails)2 Email (org.orcid.jaxb.model.message.Email)2 ExternalIdReference (org.orcid.jaxb.model.message.ExternalIdReference)2 ExternalIdentifier (org.orcid.jaxb.model.message.ExternalIdentifier)2 ExternalIdentifiers (org.orcid.jaxb.model.message.ExternalIdentifiers)2