Repository: incubator-nifi Updated Branches: refs/heads/develop 73a368f86 -> a69ed6bae
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/protwords.txt ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/protwords.txt b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/protwords.txt new file mode 100644 index 0000000..1dfc0ab --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/protwords.txt @@ -0,0 +1,21 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +# Use a protected word file to protect against the stemmer reducing two +# unrelated words to the same base word. + +# Some non-words that normally won't be encountered, +# just to test that they won't be stemmed. +dontstems +zwhacky + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/schema.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/schema.xml b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/schema.xml new file mode 100644 index 0000000..d2f7e8f --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/schema.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<schema version="1.5" name="testCollection"> + + <fieldType name="string" class="solr.StrField"/> + <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/> + <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/> + <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/> + <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/> + <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/> + + <field name="_version_" type="long" indexed="true" stored="true"/> + + <field name="first" type="string" indexed="true" stored="true" /> + <field name="last" type="string" indexed="true" stored="true" /> + <field name="grade" type="int" indexed="true" stored="true" /> + <field name="marks" type="int" indexed="true" stored="true" /> + <field name="test" type="string" indexed="true" stored="true" /> + <field name="subject" type="string" indexed="true" stored="true" /> + <field name="created" type="date" indexed="true" stored="true" /> + +</schema> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/solrconfig.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/solrconfig.xml b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/solrconfig.xml new file mode 100644 index 0000000..148a2db --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/solrconfig.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<config> + <luceneMatchVersion>5.0.0</luceneMatchVersion> + + <dataDir>${solr.data.dir:}</dataDir> + + <directoryFactory name="DirectoryFactory" + class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/> + <indexConfig> + <lockType>single</lockType> + </indexConfig> + + <requestDispatcher handleSelect="false"> + <httpCaching never304="true" /> + </requestDispatcher> + + <requestHandler name="/select" class="solr.SearchHandler" /> + <requestHandler name="/update" class="solr.UpdateRequestHandler" /> + +</config> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/synonyms.txt ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/synonyms.txt b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/synonyms.txt new file mode 100644 index 0000000..7f72128 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/conf/synonyms.txt @@ -0,0 +1,29 @@ +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#----------------------------------------------------------------------- +#some test synonym mappings unlikely to appear in real input text +aaafoo => aaabar +bbbfoo => bbbfoo bbbbar +cccfoo => cccbar cccbaz +fooaaa,baraaa,bazaaa + +# Some synonym groups specific to this example +GB,gib,gigabyte,gigabytes +MB,mib,megabyte,megabytes +Television, Televisions, TV, TVs +#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming +#after us won't split it into two words. + +# Synonym mappings can be used for spelling correction too +pixima => pixma + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/core.properties ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/core.properties b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/core.properties new file mode 100644 index 0000000..4e16ece --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testCollection/core.properties @@ -0,0 +1 @@ +name=jsonCollection \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-csv-multiple-docs.csv ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-csv-multiple-docs.csv b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-csv-multiple-docs.csv new file mode 100644 index 0000000..5657a89 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-csv-multiple-docs.csv @@ -0,0 +1,2 @@ +John,Doe,8,Math,term1,90 +John,Doe,8,Biology,term1,86 http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-custom-json-single-doc.json ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-custom-json-single-doc.json b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-custom-json-single-doc.json new file mode 100644 index 0000000..5cca807 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-custom-json-single-doc.json @@ -0,0 +1,15 @@ +{ + "first": "John", + "last": "Doe", + "grade": 8, + "exams": [ + { + "subject": "Math", + "test" : "term1", + "marks":90}, + { + "subject": "Biology", + "test" : "term1", + "marks":86} + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-solr-json-multiple-docs.json ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-solr-json-multiple-docs.json b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-solr-json-multiple-docs.json new file mode 100644 index 0000000..cea939b --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-solr-json-multiple-docs.json @@ -0,0 +1,18 @@ +[ +{ + "first": "John", + "last": "Doe", + "grade": 8, + "subject": "Math", + "test" : "term1", + "marks": 90 +}, +{ + "first": "John", + "last": "Doe", + "grade": 8, + "subject": "Biology", + "test" : "term1", + "marks": 86 +} +] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-xml-multiple-docs.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-xml-multiple-docs.xml b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-xml-multiple-docs.xml new file mode 100644 index 0000000..4622e0d --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/test/resources/testdata/test-xml-multiple-docs.xml @@ -0,0 +1,18 @@ +<add> + <doc> + <field name="first">John</field> + <field name="last">Doe</field> + <field name="grade">8</field> + <field name="subject">Math</field> + <field name="test">term1</field> + <field name="marks">90</field> + </doc> + <doc> + <field name="first">John</field> + <field name="last">Doe</field> + <field name="grade">8</field> + <field name="subject">Biology</field> + <field name="test">term1</field> + <field name="marks">86</field> + </doc> +</add> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/nifi-solr-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-solr-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-solr-bundle/pom.xml new file mode 100644 index 0000000..d716b88 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-solr-bundle/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-nar-bundles</artifactId> + <version>0.1.0-incubating-SNAPSHOT</version> + </parent> + + <artifactId>nifi-solr-bundle</artifactId> + <packaging>pom</packaging> + + <description>A bundle of processors that can store and retrieve data from Apache Solr</description> + + <properties> + <solr.version>5.0.0</solr.version> + </properties> + + <modules> + <module>nifi-solr-processors</module> + <module>nifi-solr-nar</module> + </modules> + +</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/nifi-nar-bundles/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/pom.xml b/nifi/nifi-nar-bundles/pom.xml index e7c122d..8acf9b9 100644 --- a/nifi/nifi-nar-bundles/pom.xml +++ b/nifi/nifi-nar-bundles/pom.xml @@ -35,6 +35,7 @@ <module>nifi-update-attribute-bundle</module> <module>nifi-kafka-bundle</module> <module>nifi-kite-bundle</module> + <module>nifi-solr-bundle</module> </modules> <dependencyManagement> <dependencies> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/71b6ffc9/nifi/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/pom.xml b/nifi/pom.xml index e7d8f5b..0c5ca9a 100644 --- a/nifi/pom.xml +++ b/nifi/pom.xml @@ -170,12 +170,12 @@ <groupId>org.antlr</groupId> <artifactId>antlr-runtime</artifactId> <version>3.5.2</version> - </dependency> + </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> - </dependency> + </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> @@ -220,7 +220,7 @@ <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> <version>9.6.0-4</version> - </dependency> + </dependency> <dependency> <groupId>stax</groupId> <artifactId>stax-api</artifactId> @@ -231,10 +231,10 @@ <artifactId>quartz</artifactId> <version>2.2.1</version> <exclusions> - <!-- + <!-- | Exclude the quartz 2.2.1 bundled version of c3p0 because it is lgpl licensed | We also don't use the JDBC related features of quartz for which the dependency would matter - --> + --> <exclusion> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> @@ -303,7 +303,7 @@ <artifactId>spring-core</artifactId> <version>${spring.version}</version> <exclusions> - <!-- <artifactId>jcl-over-slf4j</artifactId> is used in dependencies + <!-- <artifactId>jcl-over-slf4j</artifactId> is used in dependencies section --> <exclusion> <groupId>commons-logging</groupId> @@ -470,7 +470,7 @@ <groupId>com.jcraft</groupId> <artifactId>jzlib</artifactId> <version>1.1.3</version> - </dependency> + </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> @@ -516,7 +516,7 @@ <artifactId>hadoop-hdfs</artifactId> <version>${hadoop.version}</version> </dependency> - + <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-yarn-api</artifactId> @@ -542,7 +542,7 @@ <artifactId>avro</artifactId> <version>1.7.6</version> </dependency> - + <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> @@ -562,7 +562,7 @@ <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> <version>${jersey.version}</version> - </dependency> + </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> @@ -627,7 +627,7 @@ <artifactId>jetty-jsp-jdt</artifactId> <version>2.3.3</version> <scope>provided</scope> - </dependency> + </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> @@ -783,6 +783,12 @@ </dependency> <dependency> <groupId>org.apache.nifi</groupId> + <artifactId>nifi-solr-nar</artifactId> + <version>0.1.0-incubating-SNAPSHOT</version> + <type>nar</type> + </dependency> + <dependency> + <groupId>org.apache.nifi</groupId> <artifactId>nifi-kafka-nar</artifactId> <version>0.1.0-incubating-SNAPSHOT</version> <type>nar</type> @@ -802,7 +808,7 @@ <groupId>org.apache.nifi</groupId> <artifactId>nifi-security-utils</artifactId> <version>0.1.0-incubating-SNAPSHOT</version> - </dependency> + </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-logging-utils</artifactId> @@ -852,7 +858,7 @@ <artifactId>slf4j-simple</artifactId> <scope>test</scope> </dependency> - </dependencies> + </dependencies> <build> <pluginManagement> <plugins> @@ -999,7 +1005,7 @@ <requireMavenVersion> <version>${maven.min-version}</version> </requireMavenVersion> - </rules> + </rules> </configuration> </execution> </executions>
