this test was missing @Test, and wasn't actually checking any fields were added

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1072230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2011-02-19 01:33:12 +00:00
parent 8ced9198dc
commit d279ff8251
1 changed files with 9 additions and 2 deletions

View File

@ -17,6 +17,7 @@
package org.apache.solr.handler.dataimport;
import org.junit.BeforeClass;
import org.junit.Test;
/**Testcase for TikaEntityProcessor
* @version $Id$
@ -28,6 +29,7 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
initCore("dataimport-solrconfig.xml", "dataimport-schema-no-unique-key.xml", getFile("solr-dihextras").getAbsolutePath());
}
@Test
public void testIndexingWithTikaEntityProcessor() throws Exception {
String conf =
"<dataConfig>" +
@ -35,12 +37,17 @@ public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
" <document>" +
" <entity processor=\"TikaEntityProcessor\" url=\"" + getFile("solr-word.pdf").getAbsolutePath() + "\" >" +
" <field column=\"Author\" meta=\"true\" name=\"author\"/>" +
" <field column=\"title\" meta=\"true\" name=\"docTitle\"/>" +
" <field column=\"title\" meta=\"true\" name=\"title\"/>" +
" <field column=\"text\"/>" +
" </entity>" +
" </document>" +
"</dataConfig>";
runFullImport(conf);
assertQ(req("*:*"), "//*[@numFound='1']");
assertQ(req("*:*")
,"//*[@numFound='1']"
,"//str[@name='author'][.='Grant Ingersoll']"
,"//str[@name='title'][.='solr-word']"
,"//str[@name='text']"
);
}
}