mirror of https://github.com/apache/lucene.git
SOLR-2901: Upgrade Solr to Tika 1.0
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1235753 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1b9e732bed
commit
8f550126f7
|
@ -96,7 +96,7 @@
|
||||||
<classpathentry kind="lib" path="modules/analysis/morfologik/lib/morfologik-stemming-1.5.2.jar"/>
|
<classpathentry kind="lib" path="modules/analysis/morfologik/lib/morfologik-stemming-1.5.2.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/commons-beanutils-1.7.0.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/commons-beanutils-1.7.0.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/commons-collections-3.1.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/commons-collections-3.1.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/commons-compress-1.2.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/commons-compress-1.3.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/commons-digester-1.7.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/commons-digester-1.7.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/commons-logging-1.0.4.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/commons-logging-1.0.4.jar"/>
|
||||||
<classpathentry kind="lib" path="modules/benchmark/lib/xercesImpl-2.9.1-patched-XERCESJ-1257.jar"/>
|
<classpathentry kind="lib" path="modules/benchmark/lib/xercesImpl-2.9.1-patched-XERCESJ-1257.jar"/>
|
||||||
|
@ -149,8 +149,8 @@
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/poi-scratchpad-3.8-beta4.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/poi-scratchpad-3.8-beta4.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/rome-0.9.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/rome-0.9.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tagsoup-1.2.1.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tagsoup-1.2.1.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-core-0.10.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-core-1.0.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-parsers-0.10.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/tika-parsers-1.0.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/extraction/lib/xmlbeans-2.3.0.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/extraction/lib/xmlbeans-2.3.0.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/langid/lib/langdetect-r111.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/langid/lib/langdetect-r111.jar"/>
|
||||||
<classpathentry kind="lib" path="solr/contrib/langid/lib/jsonic-1.2.0.jar"/>
|
<classpathentry kind="lib" path="solr/contrib/langid/lib/jsonic-1.2.0.jar"/>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<jetty.version>6.1.26</jetty.version>
|
<jetty.version>6.1.26</jetty.version>
|
||||||
<patched.jetty.version>6.1.26-patched-JETTY-1340</patched.jetty.version>
|
<patched.jetty.version>6.1.26-patched-JETTY-1340</patched.jetty.version>
|
||||||
<slf4j.version>1.6.1</slf4j.version>
|
<slf4j.version>1.6.1</slf4j.version>
|
||||||
<tika.version>0.10</tika.version>
|
<tika.version>1.0</tika.version>
|
||||||
</properties>
|
</properties>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
<system>JIRA</system>
|
<system>JIRA</system>
|
||||||
|
|
|
@ -24,7 +24,7 @@ $Id$
|
||||||
================== 4.0.0-dev ==================
|
================== 4.0.0-dev ==================
|
||||||
Versions of Major Components
|
Versions of Major Components
|
||||||
---------------------
|
---------------------
|
||||||
Apache Tika 0.10
|
Apache Tika 1.0
|
||||||
Carrot2 3.5.0
|
Carrot2 3.5.0
|
||||||
Velocity 1.6.4 and Velocity Tools 2.0
|
Velocity 1.6.4 and Velocity Tools 2.0
|
||||||
Apache UIMA 2.3.1
|
Apache UIMA 2.3.1
|
||||||
|
@ -556,6 +556,8 @@ Other Changes
|
||||||
* SOLR-2718: Add ability to lazy load response writers, defined with startup="lazy".
|
* SOLR-2718: Add ability to lazy load response writers, defined with startup="lazy".
|
||||||
(ehatcher)
|
(ehatcher)
|
||||||
|
|
||||||
|
* SOLR-2901: Upgrade Solr to Tika 1.0 (janhoy)
|
||||||
|
|
||||||
Build
|
Build
|
||||||
----------------------
|
----------------------
|
||||||
* SOLR-2487: Add build target to package war without slf4j jars (janhoy)
|
* SOLR-2487: Add build target to package war without slf4j jars (janhoy)
|
||||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.solr.handler.dataimport;
|
||||||
|
|
||||||
import com.sun.mail.imap.IMAPMessage;
|
import com.sun.mail.imap.IMAPMessage;
|
||||||
|
|
||||||
import org.apache.tika.config.TikaConfig;
|
import org.apache.tika.Tika;
|
||||||
import org.apache.tika.utils.ParseUtils;
|
import org.apache.tika.metadata.Metadata;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -95,6 +95,8 @@ public class MailEntityProcessor extends EntityProcessorBase {
|
||||||
getStringFromContext("processAttachment",null) == null ? "processAttachement":"processAttachment"
|
getStringFromContext("processAttachment",null) == null ? "processAttachement":"processAttachment"
|
||||||
, true);
|
, true);
|
||||||
|
|
||||||
|
tika = new Tika();
|
||||||
|
|
||||||
logConfig();
|
logConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +168,10 @@ public class MailEntityProcessor extends EntityProcessorBase {
|
||||||
if (!processAttachment || (disp != null && disp.equalsIgnoreCase(Part.ATTACHMENT))) return;
|
if (!processAttachment || (disp != null && disp.equalsIgnoreCase(Part.ATTACHMENT))) return;
|
||||||
InputStream is = part.getInputStream();
|
InputStream is = part.getInputStream();
|
||||||
String fileName = part.getFileName();
|
String fileName = part.getFileName();
|
||||||
String content = ParseUtils.getStringContent(is, TikaConfig.getDefaultConfig(), ctype.getBaseType().toLowerCase(Locale.ENGLISH));
|
Metadata md = new Metadata();
|
||||||
|
md.set(Metadata.CONTENT_TYPE, ctype.getBaseType().toLowerCase(Locale.ENGLISH));
|
||||||
|
md.set(Metadata.RESOURCE_NAME_KEY, fileName);
|
||||||
|
String content = tika.parseToString(is, md);
|
||||||
if (disp != null && disp.equalsIgnoreCase(Part.ATTACHMENT)) {
|
if (disp != null && disp.equalsIgnoreCase(Part.ATTACHMENT)) {
|
||||||
if (row.get(ATTACHMENT) == null)
|
if (row.get(ATTACHMENT) == null)
|
||||||
row.put(ATTACHMENT, new ArrayList<String>());
|
row.put(ATTACHMENT, new ArrayList<String>());
|
||||||
|
@ -529,6 +534,8 @@ public class MailEntityProcessor extends EntityProcessorBase {
|
||||||
|
|
||||||
private boolean processAttachment = true;
|
private boolean processAttachment = true;
|
||||||
|
|
||||||
|
private Tika tika;
|
||||||
|
|
||||||
// holds the current state
|
// holds the current state
|
||||||
private Store mailbox;
|
private Store mailbox;
|
||||||
private boolean connected = false;
|
private boolean connected = false;
|
||||||
|
|
|
@ -118,9 +118,7 @@ public class TikaEntityProcessor extends EntityProcessorBase {
|
||||||
}
|
}
|
||||||
Parser tikaParser = null;
|
Parser tikaParser = null;
|
||||||
if(parser.equals(AUTO_PARSER)){
|
if(parser.equals(AUTO_PARSER)){
|
||||||
AutoDetectParser parser = new AutoDetectParser();
|
tikaParser = new AutoDetectParser(tikaConfig);
|
||||||
parser.setConfig(tikaConfig);
|
|
||||||
tikaParser = parser;
|
|
||||||
} else {
|
} else {
|
||||||
tikaParser = (Parser) context.getSolrCore().getResourceLoader().newInstance(parser);
|
tikaParser = (Parser) context.getSolrCore().getResourceLoader().newInstance(parser);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ to your Solr Home lib directory. See http://wiki.apache.org/solr/ExtractingRequ
|
||||||
Tika Dependency
|
Tika Dependency
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Current Version: Tika 0.10 (released 2011-09-30)
|
Current Version: Tika 1.0 (released 2011-11-07)
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ $Id$
|
||||||
This is convenient when Tika's auto detector cannot detect encoding, especially
|
This is convenient when Tika's auto detector cannot detect encoding, especially
|
||||||
the text file is too short to detect encoding. (koji)
|
the text file is too short to detect encoding. (koji)
|
||||||
|
|
||||||
|
* SOLR-2901: Upgrade Solr to Tika 1.0 (janhoy)
|
||||||
|
|
||||||
================== Release 3.5.0 ==================
|
================== Release 3.5.0 ==================
|
||||||
|
|
||||||
* SOLR-2372: Upgrade Solr to Tika 0.10 (janhoy)
|
* SOLR-2372: Upgrade Solr to Tika 0.10 (janhoy)
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
AnyObjectId[61753909c3f32306bf60d09e5345d47058ba2122] was removed in git history.
|
|
||||||
Apache SVN contains full history.
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
AnyObjectId[6c826c528b60bb1b25e9053b7f4c920292f6c343] was removed in git history.
|
||||||
|
Apache SVN contains full history.
|
|
@ -1,2 +0,0 @@
|
||||||
AnyObjectId[2259a3b83e63f6ad14b866bff7925b2a1b9f0c23] was removed in git history.
|
|
||||||
Apache SVN contains full history.
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
AnyObjectId[5d6bc873cd8bd72dd426090f1b237f373f5fdc00] was removed in git history.
|
||||||
|
Apache SVN contains full history.
|
|
@ -1,2 +0,0 @@
|
||||||
AnyObjectId[57368ebb26d4b6493e76efa5552b2e489bc09bbe] was removed in git history.
|
|
||||||
Apache SVN contains full history.
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
AnyObjectId[d5e5f8fa0ad29f21719ea9bc2a85c6a95cd8a205] was removed in git history.
|
||||||
|
Apache SVN contains full history.
|
|
@ -39,6 +39,7 @@ import org.apache.tika.exception.TikaException;
|
||||||
import org.apache.tika.metadata.Metadata;
|
import org.apache.tika.metadata.Metadata;
|
||||||
import org.apache.tika.mime.MediaType;
|
import org.apache.tika.mime.MediaType;
|
||||||
import org.apache.tika.parser.AutoDetectParser;
|
import org.apache.tika.parser.AutoDetectParser;
|
||||||
|
import org.apache.tika.parser.DefaultParser;
|
||||||
import org.apache.tika.parser.ParseContext;
|
import org.apache.tika.parser.ParseContext;
|
||||||
import org.apache.tika.parser.Parser;
|
import org.apache.tika.parser.Parser;
|
||||||
import org.apache.tika.sax.XHTMLContentHandler;
|
import org.apache.tika.sax.XHTMLContentHandler;
|
||||||
|
@ -138,7 +139,7 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
|
||||||
if (streamType != null) {
|
if (streamType != null) {
|
||||||
//Cache? Parsers are lightweight to construct and thread-safe, so I'm told
|
//Cache? Parsers are lightweight to construct and thread-safe, so I'm told
|
||||||
MediaType mt = MediaType.parse(streamType.trim().toLowerCase(Locale.ENGLISH));
|
MediaType mt = MediaType.parse(streamType.trim().toLowerCase(Locale.ENGLISH));
|
||||||
parser = config.getParser(mt);
|
parser = new DefaultParser(config.getMediaTypeRegistry()).getParsers().get(mt);
|
||||||
} else {
|
} else {
|
||||||
parser = autoDetectParser;
|
parser = autoDetectParser;
|
||||||
}
|
}
|
||||||
|
@ -151,6 +152,10 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
|
||||||
if (resourceName != null) {
|
if (resourceName != null) {
|
||||||
metadata.add(Metadata.RESOURCE_NAME_KEY, resourceName);
|
metadata.add(Metadata.RESOURCE_NAME_KEY, resourceName);
|
||||||
}
|
}
|
||||||
|
// Provide stream's content type as hint for auto detection
|
||||||
|
if(stream.getContentType() != null) {
|
||||||
|
metadata.add(Metadata.CONTENT_TYPE, stream.getContentType());
|
||||||
|
}
|
||||||
|
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.apache.solr.handler.extraction;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.util.ContentStream;
|
import org.apache.solr.common.util.ContentStream;
|
||||||
|
@ -420,6 +419,32 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
assertQ(req("*:*"), "//result[@numFound=1]");
|
assertQ(req("*:*"), "//result[@numFound=1]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testWrongStreamType() throws Exception {
|
||||||
|
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
|
||||||
|
assertTrue("handler is null and it shouldn't be", handler != null);
|
||||||
|
|
||||||
|
try{
|
||||||
|
// Load plain text specifying another mime type, should fail
|
||||||
|
loadLocal("extraction/version_control.txt",
|
||||||
|
"literal.id", "one",
|
||||||
|
ExtractingParams.STREAM_TYPE, "application/pdf"
|
||||||
|
);
|
||||||
|
fail("SolrException is expected because wrong parser specified for the file type");
|
||||||
|
}
|
||||||
|
catch(Exception expected){}
|
||||||
|
|
||||||
|
try{
|
||||||
|
// Load plain text specifying non existing mimetype, should fail
|
||||||
|
loadLocal("extraction/version_control.txt",
|
||||||
|
"literal.id", "one",
|
||||||
|
ExtractingParams.STREAM_TYPE, "foo/bar"
|
||||||
|
);
|
||||||
|
fail("SolrException is expected because nonexsisting parser specified");
|
||||||
|
}
|
||||||
|
catch(Exception expected){}
|
||||||
|
}
|
||||||
|
|
||||||
SolrQueryResponse loadLocal(String filename, String... args) throws Exception {
|
SolrQueryResponse loadLocal(String filename, String... args) throws Exception {
|
||||||
LocalSolrQueryRequest req = (LocalSolrQueryRequest) req(args);
|
LocalSolrQueryRequest req = (LocalSolrQueryRequest) req(args);
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public abstract class LanguageIdentifierUpdateProcessorFactoryTestCase extends S
|
||||||
assertLang("no", "id", "1no", "name", "Lucene", "subject", "Lucene er et fri/åpen kildekode programvarebibliotek for informasjonsgjenfinning, opprinnelig utviklet i programmeringsspråket Java av Doug Cutting. Lucene støttes av Apache Software Foundation og utgis under Apache-lisensen.");
|
assertLang("no", "id", "1no", "name", "Lucene", "subject", "Lucene er et fri/åpen kildekode programvarebibliotek for informasjonsgjenfinning, opprinnelig utviklet i programmeringsspråket Java av Doug Cutting. Lucene støttes av Apache Software Foundation og utgis under Apache-lisensen.");
|
||||||
assertLang("en", "id", "2en", "name", "Lucene", "subject", "Apache Lucene is a free/open source information retrieval software library, originally created in Java by Doug Cutting. It is supported by the Apache Software Foundation and is released under the Apache Software License.");
|
assertLang("en", "id", "2en", "name", "Lucene", "subject", "Apache Lucene is a free/open source information retrieval software library, originally created in Java by Doug Cutting. It is supported by the Apache Software Foundation and is released under the Apache Software License.");
|
||||||
assertLang("sv", "id", "3sv", "name", "Maven", "subject", "Apache Maven är ett verktyg utvecklat av Apache Software Foundation och används inom systemutveckling av datorprogram i programspråket Java. Maven används för att automatiskt paketera (bygga) programfilerna till en distribuerbar enhet. Maven används inom samma område som Apache Ant men dess byggfiler är deklarativa till skillnad ifrån Ants skriptbaserade.");
|
assertLang("sv", "id", "3sv", "name", "Maven", "subject", "Apache Maven är ett verktyg utvecklat av Apache Software Foundation och används inom systemutveckling av datorprogram i programspråket Java. Maven används för att automatiskt paketera (bygga) programfilerna till en distribuerbar enhet. Maven används inom samma område som Apache Ant men dess byggfiler är deklarativa till skillnad ifrån Ants skriptbaserade.");
|
||||||
assertLang("es", "id", "4es", "name", "Lucene", "subject", "Lucene es un API de código abierto para recuperación de información, originalmente implementada en Java por Doug Cutting. Está apoyado por el Apache Software Foundation y se distribuye bajo la Apache Software License. Lucene tiene versiones para otros lenguajes incluyendo Delphi, Perl, C#, C++, Python, Ruby y PHP.");
|
assertLang("es", "id", "4es", "name", "Español", "subject", "El español, como las otras lenguas romances, es una continuación moderna del latín hablado (denominado latín vulgar), desde el siglo III, que tras el desmembramiento del Imperio romano fue divergiendo de las otras variantes del latín que se hablaban en las distintas provincias del antiguo Imperio, dando lugar mediante una lenta evolución a las distintas lenguas romances. Debido a su propagación por América, el español es, con diferencia, la lengua romance que ha logrado mayor difusión.");
|
||||||
assertLang("un", "id", "5un", "name", "a", "subject", "b");
|
assertLang("un", "id", "5un", "name", "a", "subject", "b");
|
||||||
assertLang("th", "id", "6th", "name", "บทความคัดสรรเดือนนี้", "subject", "อันเนอลีส มารี อันเนอ ฟรังค์ หรือมักรู้จักในภาษาไทยว่า แอนน์ แฟรงค์ เป็นเด็กหญิงชาวยิว เกิดที่เมืองแฟรงก์เฟิร์ต ประเทศเยอรมนี เธอมีชื่อเสียงโด่งดังในฐานะผู้เขียนบันทึกประจำวันซึ่งต่อมาได้รับการตีพิมพ์เป็นหนังสือ บรรยายเหตุการณ์ขณะหลบซ่อนตัวจากการล่าชาวยิวในประเทศเนเธอร์แลนด์ ระหว่างที่ถูกเยอรมนีเข้าครอบครองในช่วงสงครามโลกครั้งที่สอง");
|
assertLang("th", "id", "6th", "name", "บทความคัดสรรเดือนนี้", "subject", "อันเนอลีส มารี อันเนอ ฟรังค์ หรือมักรู้จักในภาษาไทยว่า แอนน์ แฟรงค์ เป็นเด็กหญิงชาวยิว เกิดที่เมืองแฟรงก์เฟิร์ต ประเทศเยอรมนี เธอมีชื่อเสียงโด่งดังในฐานะผู้เขียนบันทึกประจำวันซึ่งต่อมาได้รับการตีพิมพ์เป็นหนังสือ บรรยายเหตุการณ์ขณะหลบซ่อนตัวจากการล่าชาวยิวในประเทศเนเธอร์แลนด์ ระหว่างที่ถูกเยอรมนีเข้าครอบครองในช่วงสงครามโลกครั้งที่สอง");
|
||||||
assertLang("ru", "id", "7ru", "name", "Lucene", "subject", "The Apache Lucene — это свободная библиотека для высокоскоростного полнотекстового поиска, написанная на Java. Может быть использована для поиска в интернете и других областях компьютерной лингвистики (аналитическая философия).");
|
assertLang("ru", "id", "7ru", "name", "Lucene", "subject", "The Apache Lucene — это свободная библиотека для высокоскоростного полнотекстового поиска, написанная на Java. Может быть использована для поиска в интернете и других областях компьютерной лингвистики (аналитическая философия).");
|
||||||
|
@ -76,8 +76,18 @@ public abstract class LanguageIdentifierUpdateProcessorFactoryTestCase extends S
|
||||||
assertLang("nl", "id", "10nl", "name", "Lucene", "subject", "Lucene is een gratis open source, tekst gebaseerde information retrieval API van origine geschreven in Java door Doug Cutting. Het wordt ondersteund door de Apache Software Foundation en is vrijgegeven onder de Apache Software Licentie. Lucene is ook beschikbaar in andere programeertalen zoals Perl, C#, C++, Python, Ruby en PHP.");
|
assertLang("nl", "id", "10nl", "name", "Lucene", "subject", "Lucene is een gratis open source, tekst gebaseerde information retrieval API van origine geschreven in Java door Doug Cutting. Het wordt ondersteund door de Apache Software Foundation en is vrijgegeven onder de Apache Software Licentie. Lucene is ook beschikbaar in andere programeertalen zoals Perl, C#, C++, Python, Ruby en PHP.");
|
||||||
assertLang("it", "id", "11it", "name", "Lucene", "subject", "Lucene è una API gratuita ed open source per il reperimento di informazioni inizialmente implementata in Java da Doug Cutting. È supportata dall'Apache Software Foundation ed è resa disponibile con l'Apache License. Lucene è stata successivamente reimplementata in Perl, C#, C++, Python, Ruby e PHP.");
|
assertLang("it", "id", "11it", "name", "Lucene", "subject", "Lucene è una API gratuita ed open source per il reperimento di informazioni inizialmente implementata in Java da Doug Cutting. È supportata dall'Apache Software Foundation ed è resa disponibile con l'Apache License. Lucene è stata successivamente reimplementata in Perl, C#, C++, Python, Ruby e PHP.");
|
||||||
assertLang("pt", "id", "12pt", "name", "Lucene", "subject", "Apache Lucene, ou simplesmente Lucene, é um software de busca e uma API de indexação de documentos, escrito na linguagem de programação Java. É um software de código aberto da Apache Software Foundation licenciado através da licença Apache.");
|
assertLang("pt", "id", "12pt", "name", "Lucene", "subject", "Apache Lucene, ou simplesmente Lucene, é um software de busca e uma API de indexação de documentos, escrito na linguagem de programação Java. É um software de código aberto da Apache Software Foundation licenciado através da licença Apache.");
|
||||||
|
// New in Tika1.0
|
||||||
|
assertLang("ca", "id", "13ca", "name", "Catalan", "subject", "El català posseeix dos estàndards principals: el regulat per l'Institut d'Estudis Catalans, o estàndard general, que pren com a base l'ortografia establerta per Pompeu Fabra amb els trets gramaticals i ortogràfics característics del català central; i el regulat per l'Acadèmia Valenciana de la Llengua, estàndard d'àmbit restringit, centrat en l'estandardització del valencià i que pren com a base les Normes de Castelló, és a dir, l'ortografia de Pompeu Fabra però més adaptada a la pronúncia del català occidental i als trets que caracteritzen els dialectes valencians.");
|
||||||
|
assertLang("be", "id", "14be", "name", "Belarusian", "subject", "Наступнай буйной дзяржавай на беларускай зямлі было Вялікае княства Літоўскае, Рускае і Жамойцкае (ВКЛ). Падчас стварэння і пачатковага развіцця гэтай дзяржавы найбуйнейшым і асноўным яе цэнтрам быў Новагародак. Акрамя сучасных земляў Беларусі, у склад гэтай дзяржавы ўваходзілі таксама землі сучаснай Літвы, паўночная частка сучаснай Украіны і частка сучаснай Расіі.");
|
||||||
|
assertLang("eo", "id", "15eo", "name", "Esperanto", "subject", "La vortprovizo de Esperanto devenas plejparte el la okcidenteŭropaj lingvoj, dum ĝia sintakso kaj morfologio montras ankaŭ slavlingvan influon. La morfemoj ne ŝanĝiĝas kaj oni povas ilin preskaŭ senlime kombini, kreante diverssignifajn vortojn, Esperanto do havas multajn kunaĵojn kun la analizaj lingvoj, al kiuj apartenas ekzemple la ĉina; kontraŭe la interna strukturo de Esperanto certagrade respegulas la aglutinajn lingvojn, kiel la japanan, svahilan aŭ turkan.");
|
||||||
|
assertLang("gl", "id", "16gl", "name", "Galician", "subject", "A cifra de falantes medrou axiña durante as décadas seguintes, nun principio no Imperio ruso e na Europa oriental, logo na Europa occidental, América, China e no Xapón. Nos primeiros anos do movemento, os esperantistas mantiñan contacto por correspondencia, pero en 1905 o primeiro Congreso Universal de Esperanto levouse a cabo na cidade francesa de Boulogne-sur-Mer. Dende entón, os congresos mundiais organizáronse nos cinco continentes ano tras ano agás durante as dúas Guerras Mundiais.");
|
||||||
|
assertLang("ro", "id", "17ro", "name", "Romanian", "subject", "La momentul destrămării Uniunii Sovietice și a înlăturării regimului comunist instalat în România (1989), țara a inițiat o serie de reforme economice și politice. După un deceniu de probleme economice, România a introdus noi reforme economice de ordin general (precum cota unică de impozitare, în 2005) și a aderat la Uniunea Europeană la 1 ianuarie 2007.");
|
||||||
|
assertLang("sk", "id", "18sk", "name", "Slovakian", "subject", "Boli vytvorené dva národné parlamenty - Česká národná rada a Slovenská národná rada a spoločný jednokomorový česko-slovenský parlament bol premenovaný z Národného zhromaždenia na Federálne zhromaždenie s dvoma komorami - Snemovňou ľudu a Snemovňu národov.");
|
||||||
|
assertLang("sl", "id", "19sl", "name", "Slovenian", "subject", "Slovenska Wikipedija je različica spletne enciklopedije Wikipedije v slovenskem jeziku. Projekt slovenske Wikipedije se je začel 26. februarja 2002 z ustanovitvijo njene spletne strani, njen pobudnik pa je bil uporabnik Jani Melik.");
|
||||||
|
assertLang("uk", "id", "20uk", "name", "Ukrainian", "subject", "Народно-господарський комплекс країни включає такі види промисловості як важке машинобудування, чорна та кольорова металургія, суднобудування, виробництво автобусів, легкових та вантажних автомобілів, тракторів та іншої сільськогосподарської техніки, тепловозів, верстатів, турбін, авіаційних двигунів та літаків, обладнання для електростанцій, нафто-газової та хімічної промисловості тощо. Крім того, Україна є потужним виробником електроенергії. Україна має розвинуте сільське господарство і займає одне з провідних місць серед експортерів деяких видів сільськогосподарської продукції і продовольства (зокрема, соняшникової олії).");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMapFieldName() throws Exception {
|
public void testMapFieldName() throws Exception {
|
||||||
parameters = new ModifiableSolrParams();
|
parameters = new ModifiableSolrParams();
|
||||||
|
|
Loading…
Reference in New Issue