mirror of https://github.com/apache/lucene.git
SOLR-3775: Add a test for Office 2003 file (.doc)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379357 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
adc8db0353
commit
90e692e180
Binary file not shown.
|
@ -145,7 +145,22 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
assertU(commit());
|
||||
assertQ(req("stream_name:version_control.xml"), "//*[@numFound='1']");
|
||||
|
||||
|
||||
loadLocal("extraction/word2003.doc", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
|
||||
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
|
||||
"fmap.Author", "extractedAuthor",
|
||||
"literal.id", "four",
|
||||
"uprefix", "ignored_",
|
||||
"fmap.content", "extractedContent",
|
||||
"fmap.language", "extractedLanguage",
|
||||
"fmap.Last-Modified", "extractedDate"
|
||||
);
|
||||
assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='0']");
|
||||
// There is already a PDF file with this content:
|
||||
assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='1']");
|
||||
assertU(commit());
|
||||
assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='1']");
|
||||
// now 2 of them:
|
||||
assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='2']");
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,8 +178,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
//"fmap.content_type", "abcxyz",
|
||||
"commit", "true" // test immediate commit
|
||||
);
|
||||
assertTrue(false);
|
||||
|
||||
fail("Should throw SolrException");
|
||||
} catch (SolrException e) {
|
||||
//do nothing
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue