assertU(commit());
Map<String,String> args = new HashMap<String, String>();
args.put( CommonParams.Q, "text_en:simple" );
args.put( "indent", "true" );
SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("Make sure they got in", req
,"//*[@numFound='1']"
,"//result/doc[1]/int[@name='id'][.='10']"
);
args = new HashMap<String, String>();
args.put( CommonParams.Q, "highlight:simple" );
args.put( "indent", "true" );
req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("dynamic source", req
,"//*[@numFound='1']"
,"//result/doc[1]/int[@name='id'][.='10']"
,"//result/doc[1]/arr[@name='highlight']/str[.='this is a simple test of ']"
);
args = new HashMap<String, String>();
args.put( CommonParams.Q, "text_en:functionality" );
args.put( "indent", "true" );
req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("Make sure they got in", req
,"//*[@numFound='1']");
args = new HashMap<String, String>();
args.put( CommonParams.Q, "highlight:functionality" );
args.put( "indent", "true" );
req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
assertQ("dynamic source", req
,"//*[@numFound='0']");
}