Hi,

I am trying to use the entityhub/yard/solr module to directly query the
dbpedia.solrindex.
I have unzipped the dbpedia.solrindex.zip file
in entityhub/yard/solr/target/indexes/default folder.

And modified the Solryardtest.java as given below but unable to find any
results. Am I missing something?



public static final String TEST_SOLR_CORE_NAME = "dbpedia";


@Test

    public void testFieldQuery() throws YardException {

        Yard yard = getYard();

        String field = "rdfs:label";


        TextConstraint tc = new TextConstraint("Roger Federer",
PatternType.wildcard, false, "en");

        FieldQuery query = yard.getQueryFactory().createFieldQuery();

        query.addSelectedField(field);

        query.setOffset(0);

        query.setLimit(10);

        query.setConstraint(field, tc);

        QueryResultList<Representation> results = yard.find(query);

        Representation result;

        Iterator<Representation> it = results.iterator();

        log.info("Number of results: " + results.size());

   }

Reply via email to