Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration.js URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration.js?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration.js (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration.js Sat Jul 4 07:34:47 2015 @@ -0,0 +1,148 @@ +<!-- + 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. +--> + +<script type="text/javascript"> +<!-- +function checkConfig() { + if (editconnection.path) { + if (editconnection.path.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidPath'))"); + editconnection.path.focus(); + return false; + } + } + if (editconnection.charfilters) { + if (editconnection.charfilters.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidCharfilters'))"); + editconnection.charfilters.focus(); + return false; + } + } + if (editconnection.tokenizers) { + if (editconnection.tokenizers.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidTokenizers'))"); + editconnection.tokenizers.focus(); + return false; + } + } + if (editconnection.filters) { + if (editconnection.filters.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidFilters'))"); + editconnection.filters.focus(); + return false; + } + } + if (editconnection.analyzers) { + if (editconnection.analyzers.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidAnalyzers'))"); + editconnection.analyzers.focus(); + return false; + } + } + if (editconnection.fields) { + if (editconnection.fields.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidFields'))"); + editconnection.fields.focus(); + return false; + } + } + if (editconnection.idfield) { + if (editconnection.idfield.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidIdfield'))"); + editconnection.idfield.focus(); + return false; + } + } + if (editconnection.contentfield) { + if (editconnection.contentfield.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidIdfield'))"); + editconnection.contentfield.focus(); + return false; + } + } + return true; +} + +function checkConfigForSave() { + if (editconnection.path) { + if (editconnection.path.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidPath'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.path.focus(); + return false; + } + } + if (editconnection.charfilters) { + if (editconnection.charfilters.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidCharfilters'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.charfilters.focus(); + return false; + } + } + if (editconnection.tokenizers) { + if (editconnection.tokenizers.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidTokenizers'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.tokenizers.focus(); + return false; + } + } + if (editconnection.filters) { + if (editconnection.filters.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidFilters'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.filters.focus(); + return false; + } + } + if (editconnection.analyzers) { + if (editconnection.analyzers.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidAnalyzers'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.analyzers.focus(); + return false; + } + } + if (editconnection.fields) { + if (editconnection.fields.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidFields'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.fields.focus(); + return false; + } + } + if (editconnection.idfield) { + if (editconnection.idfield.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidIdfield'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.idfield.focus(); + return false; + } + } + if (editconnection.contentfield) { + if (editconnection.contentfield.value == "") { + alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('LuceneConnector.PleaseSupplyValidContentfield'))"); + SelectTab("$Encoder.javascriptBodyEscape($ResourceBundle.getString('LuceneConnector.Parameters'))"); + editconnection.contentfield.focus(); + return false; + } + } + return true; +} +//--> +</script>
Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html Sat Jul 4 07:34:47 2015 @@ -0,0 +1,98 @@ +<!-- + 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. +--> + +#if($TABNAME == $ResourceBundle.getString('LuceneConnector.Parameters')) + +<table class="displaytable"> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Path')) + </td> + <td class="value"><input name="path" type="text" + value="$Encoder.attributeEscape($PATH)" size="48" /> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Charfilters')) + </td> + <td class="value"> + <textarea rows="10" cols="64" name="charfilters">$Encoder.bodyEscape($CHARFILTERS)</textarea> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Tokenizers')) + </td> + <td class="value"> + <textarea rows="10" cols="64" name="tokenizers">$Encoder.bodyEscape($TOKENIZERS)</textarea> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Filters')) + </td> + <td class="value"> + <textarea rows="10" cols="64" name="filters">$Encoder.bodyEscape($FILTERS)</textarea> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Analyzers')) + </td> + <td class="value"> + <textarea rows="10" cols="64" name="analyzers">$Encoder.bodyEscape($ANALYZERS)</textarea> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Fields')) + </td> + <td class="value"> + <textarea rows="10" cols="64" name="fields">$Encoder.bodyEscape($FIELDS)</textarea> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Idfield')) + </td> + <td class="value"><input name="idfield" type="text" + value="$Encoder.attributeEscape($IDFIELD)" size="48" /> + </td> + </tr> + <tr> + <td class="description"> + $Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Contentfield')) + </td> + <td class="value"><input name="contentfield" type="text" + value="$Encoder.attributeEscape($CONTENTFIELD)" size="48" /> + </td> + </tr> +</table> + +#else + +<input type="hidden" name="path" value="$Encoder.attributeEscape($PATH)" /> +<input type="hidden" name="charfilters" value="$Encoder.attributeEscape($CHARFILTERS)" /> +<input type="hidden" name="tokenizers" value="$Encoder.attributeEscape($TOKENIZERS)" /> +<input type="hidden" name="filters" value="$Encoder.attributeEscape($FILTERS)" /> +<input type="hidden" name="analyzers" value="$Encoder.attributeEscape($ANALYZERS)" /> +<input type="hidden" name="fields" value="$Encoder.attributeEscape($FIELDS)" /> +<input type="hidden" name="idfield" value="$Encoder.attributeEscape($IDFIELD)" /> +<input type="hidden" name="contentfield" value="$Encoder.attributeEscape($CONTENTFIELD)" /> + +#end Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/editConfiguration_Parameters.html ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html Sat Jul 4 07:34:47 2015 @@ -0,0 +1,51 @@ +<!-- + 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. +--> + +<table class="displaytable"> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Path'))</td> + <td class="value">$Encoder.bodyEscape($PATH)</td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Charfilters'))</td> + <td class="value"><nobr>$Encoder.bodyEscape($CHARFILTERS)</nobr></td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Tokenizers'))</td> + <td class="value"><nobr>$Encoder.bodyEscape($TOKENIZERS)</nobr></td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Filters'))</td> + <td class="value"><nobr>$Encoder.bodyEscape($FILTERS)</nobr></td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Analyzers'))</td> + <td class="value"><nobr>$Encoder.bodyEscape($ANALYZERS)</nobr></td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Fields'))</td> + <td class="value"><nobr>$Encoder.bodyEscape($FIELDS)</nobr></td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Idfield'))</td> + <td class="value">$Encoder.bodyEscape($IDFIELD)</td> + </tr> + <tr> + <td class="description">$Encoder.bodyEscape($ResourceBundle.getString('LuceneConnector.Contentfield'))</td> + <td class="value">$Encoder.bodyEscape($CONTENTFIELD)</td> + </tr> +</table> \ No newline at end of file Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/main/resources/org/apache/manifoldcf/agents/output/lucene/viewConfiguration.html ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java Sat Jul 4 07:34:47 2015 @@ -0,0 +1,42 @@ +/** +* 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. +*/ +package org.apache.manifoldcf.agents.output.lucene.tests; + +/** Tests that run the "agents daemon" should be derived from this */ +public class BaseUIHSQLDB extends org.apache.manifoldcf.crawler.tests.ConnectorBaseUIHSQLDB +{ + protected String[] getConnectorNames() + { + return new String[]{"Test Connector"}; + } + + protected String[] getConnectorClasses() + { + return new String[]{"org.apache.manifoldcf.crawler.tests.TestingRepositoryConnector"}; + } + + protected String[] getOutputNames() + { + return new String[]{"Lucene Output"}; + } + + protected String[] getOutputClasses() + { + return new String[]{"org.apache.manifoldcf.agents.output.lucene.LuceneConnector"}; + } + +} Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/BaseUIHSQLDB.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java Sat Jul 4 07:34:47 2015 @@ -0,0 +1,331 @@ +/** +* 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. +*/ +package org.apache.manifoldcf.agents.output.lucene.tests; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.lucene.document.Document; +import org.apache.lucene.index.Term; +import org.apache.lucene.index.Terms; +import org.apache.lucene.index.TermsEnum; +import org.apache.lucene.search.IndexSearcher; +import org.apache.lucene.search.MatchAllDocsQuery; +import org.apache.lucene.search.TermQuery; +import org.apache.lucene.search.TopDocs; +import org.apache.lucene.util.BytesRef; +import org.apache.manifoldcf.agents.interfaces.RepositoryDocument; +import org.apache.manifoldcf.agents.output.lucene.LuceneClient; +import org.apache.manifoldcf.agents.output.lucene.LuceneClientManager; +import org.apache.manifoldcf.agents.output.lucene.LuceneDocument; +import org.apache.manifoldcf.core.interfaces.ManifoldCFException; +import org.apache.manifoldcf.core.system.ManifoldCF; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.google.common.base.StandardSystemProperty; + +import static org.junit.Assert.*; +import static org.hamcrest.CoreMatchers.*; + +public class LuceneClientTest { + + private static final String sep = StandardSystemProperty.FILE_SEPARATOR.value(); + private File testDir; + + private static final String ID = LuceneClient.defaultIdField(); + private static final String CONTENT = LuceneClient.defaultContentField(); + + @Before + public void setUp() { + String root = getClass().getResource("/").getFile(); + testDir = new File(root, "testDir"); + testDir.mkdirs(); + } + + @After + public void tearDown() throws Exception { + removeDirectory(testDir); + } + + private void removeDirectory(File f) throws Exception { + File[] files = f.listFiles(); + if (files != null) { + int i = 0; + while (i < files.length) { + File subfile = files[i++]; + if (subfile.isDirectory()) + removeDirectory(subfile); + else + subfile.delete(); + } + } + f.delete(); + } + + @Test + public void testOpenClose() throws IOException { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"openclose-index"; + File f = new File(path); + assertThat(f.exists(), is(false)); + LuceneClient client = new LuceneClient(f.toPath()); + assertThat(f.exists(), is(true)); + assertThat(client.isOpen(), is(true)); + client.close(); + assertThat(client.isOpen(), is(false)); + } + + @Test + public void testInitIndexDir() throws IOException { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"initindexdir-index"; + LuceneClient client = new LuceneClient(new File(path).toPath()); + List<String> indexDirList = Arrays.asList(new File(path).list()); + assertThat(indexDirList.size(), is(2)); + assertThat(indexDirList.contains("write.lock"), is(true)); + assertThat(indexDirList.contains("segments_1"), is(true)); + + IndexSearcher searcher = client.newSearcher(); + assertThat(searcher.count(new MatchAllDocsQuery()), is(0)); + IndexSearcher realtimeSearcher = client.newRealtimeSearcher(); + assertThat(realtimeSearcher.count(new MatchAllDocsQuery()), is(0)); + client.close(); + } + + @Test + public void testGetClientFromManager() throws Exception { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"getclientfrommager-index"; + + LuceneClient client1 = + LuceneClientManager.getClient(path, LuceneClient.defaultCharfilters(), LuceneClient.defaultTokenizers(), LuceneClient.defaultFilters(), LuceneClient.defaultAnalyzers(), LuceneClient.defaultFields(), + LuceneClient.defaultIdField(), LuceneClient.defaultContentField()); + assertThat(client1.isOpen(), is(true)); + + LuceneClient client2 = + LuceneClientManager.getClient(path, LuceneClient.defaultCharfilters(), LuceneClient.defaultTokenizers(), LuceneClient.defaultFilters(), LuceneClient.defaultAnalyzers(), LuceneClient.defaultFields(), + "id", "content"); + assertThat(client2.isOpen(), is(true)); + + assertThat(client1, is(client2)); + + LuceneClient client3; + try { + client3 = + LuceneClientManager.getClient(path, LuceneClient.defaultCharfilters(), LuceneClient.defaultTokenizers(), LuceneClient.defaultFilters(), LuceneClient.defaultAnalyzers(), LuceneClient.defaultFields(), + "dummy_id", "dummy_content"); + fail("Should not get here"); + } catch (Exception e) { + assert e instanceof IllegalStateException; + } + + client1.close(); + assertThat(client1.isOpen(), is(false)); + assertThat(client2.isOpen(), is(false)); + + client3 = + LuceneClientManager.getClient(path, LuceneClient.defaultCharfilters(), LuceneClient.defaultTokenizers(), LuceneClient.defaultFilters(), LuceneClient.defaultAnalyzers(), LuceneClient.defaultFields(), + "dummy_id", "dummy_content"); + assertThat(client3.isOpen(), is(true)); + + assertThat(client3, not(client1)); + assertThat(client3, not(client2)); + } + + @Test + public void testAddOrReplace() throws IOException { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"addorreplace-index"; + try (LuceneClient client = new LuceneClient(new File(path).toPath())) { + // add + LuceneDocument doc1 = new LuceneDocument() + .addStringField(ID, "/repo/001", true) + .addTextField(CONTENT, "green", true); + client.addOrReplace("/repo/001", doc1); + + LuceneDocument doc2 = new LuceneDocument() + .addStringField(ID, "/repo/002", true) + .addTextField(CONTENT, "yellow", true); + client.addOrReplace("/repo/002", doc2); + + client.optimize(); + IndexSearcher searcher = client.newSearcher(); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "green"))), is(1)); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "yellow"))), is(1)); + + // update + LuceneDocument updateDoc = new LuceneDocument() + .addStringField(ID, "/repo/001", true) + .addTextField(CONTENT, "yellow", true); + client.addOrReplace("/repo/001", updateDoc); + + client.optimize(); + searcher = client.newSearcher(); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "green"))), is(0)); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "yellow"))), is(2)); + + // add + LuceneDocument addDoc = new LuceneDocument() + .addStringField(ID, "/repo/100", true) + .addTextField(CONTENT, "red", true); + client.addOrReplace("/repo/100", addDoc); + + client.optimize(); + searcher = client.newSearcher(); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "green"))), is(0)); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "yellow"))), is(2)); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "red"))), is(1)); + } + } + + @Test + public void testRemove() throws IOException { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"remove-index"; + try (LuceneClient client = new LuceneClient(new File(path).toPath())) { + + LuceneDocument doc1 = new LuceneDocument() + .addStringField(ID, "/repo/001", true) + .addTextField(CONTENT, "Apache", true); + client.addOrReplace("/repo/001", doc1); + + LuceneDocument doc2 = new LuceneDocument() + .addStringField(ID, "/repo/002", true) + .addTextField(CONTENT, "Apache", true); + client.addOrReplace("/repo/002", doc2); + + client.optimize(); + IndexSearcher searcher = client.newSearcher(); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "apache"))), is(2)); + + client.remove("/repo/001"); + + client.optimize(); + searcher = client.newSearcher(); + assertThat(searcher.count(new TermQuery(new Term(CONTENT, "apache"))), is(1)); + } + } + + @Test + public void testDefaultSettings() throws IOException, InterruptedException { + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"defaultsettings-index"; + try (LuceneClient client = new LuceneClient(new File(path).toPath())) { + + String content1 = "Apache ManifoldCF, Apache Lucene"; + LuceneDocument doc1 = new LuceneDocument() + .addStringField(ID, "/repo/001", true) + .addTextField(CONTENT, content1, true) + .addTextField("content_ws", content1, false) + .addTextField("content_ngram", content1, false); + client.addOrReplace("/repo/001", doc1); + + LuceneDocument doc2 = new LuceneDocument() + .addStringField(ID, "/repo/002", true) + .addTextField(CONTENT, "This is stop word. apache software.", true); + client.addOrReplace("/repo/002", doc2); + + LuceneDocument doc3 = new LuceneDocument() + .addStringField(ID, "/repo/003", true) + .addTextField(CONTENT, "Apache Solr", true); + client.addOrReplace("/repo/003", doc3); + + client.optimize(); + IndexSearcher searcher = client.newSearcher(); + assertThat(searcher.count(client.newQuery("*:*")), is(3)); + assertThat(searcher.count(client.newQuery("id:\\/repo\\/001")), is(1)); + assertThat(searcher.count(client.newQuery("content:lu")), is(0)); + assertThat(searcher.count(client.newQuery("content:lucene")), is(1)); + assertThat(searcher.count(client.newQuery("content_ws:lucene")), is(0)); + assertThat(searcher.count(client.newQuery("content_ws:Lucene")), is(1)); + assertThat(searcher.count(client.newQuery("content_ngram:l")), is(0)); + assertThat(searcher.count(client.newQuery("content_ngram:lu")), is(1)); + assertThat(searcher.count(client.newQuery("content:this")), is(0)); + assertThat(searcher.count(client.newQuery("content:is")), is(0)); + assertThat(searcher.count(client.newQuery("content:stop")), is(1)); + + TopDocs hits = searcher.search(client.newQuery("id:\\/repo\\/001"), 1); + int docID = hits.scoreDocs[0].doc; + Terms terms = client.reader().getTermVector(docID, CONTENT); + TermsEnum te = terms.iterator(); + BytesRef br; + while ((br = te.next()) != null) { + if (te.seekExact(new BytesRef("apache"))) { + assertThat(br.utf8ToString(), is("apache")); + assertThat(te.totalTermFreq(), is(2L)); + break; + } + } + assertThat(client.reader().docFreq(new Term(CONTENT, br)), is(3)); + + hits = searcher.search(client.newQuery(ID+":\\/repo\\/003"), 1); + Document storedDocument = searcher.doc(hits.scoreDocs[0].doc); + assertThat(storedDocument.getField(CONTENT).stringValue(), is("Apache Solr")); + + String rt = "realtime"; + LuceneDocument doc4 = new LuceneDocument() + .addStringField(ID, rt, true); + client.addOrReplace(rt, doc4); + ManifoldCF.sleep(2000L); + assertThat(searcher.count(client.newQuery(ID+":"+rt)), is(0)); + assertThat(client.newSearcher().count(client.newQuery(ID+":"+rt)), is(0)); + assertThat(client.newRealtimeSearcher().count(client.newQuery(ID+":"+rt)), is(1)); + } + } + + @Test + public void testIndexRepositoryDocument() throws IOException, ManifoldCFException { + String documentURI = "file://dummy/rd"; + RepositoryDocument rd = new RepositoryDocument(); + rd.addField("cat", "foo"); + rd.addField("author", new String[]{ "abe", "obama" }); + rd.addField(CONTENT, "Classification, categorization, and tagging using Lucene"); + + String path = testDir.getAbsolutePath()+sep+"tmp"+sep+"rd-index"; + try (LuceneClient client = new LuceneClient(new File(path).toPath())) { + + Map<String,Map<String,Object>> fieldsInfo = client.fieldsInfo(); + + LuceneDocument doc = new LuceneDocument(); + doc = LuceneDocument.addField(doc, client.idField(), documentURI, fieldsInfo); + + Iterator<String> it = rd.getFields(); + while (it.hasNext()) { + String rdField = it.next(); + if (fieldsInfo.containsKey(rdField)) { + String[] values = rd.getFieldAsStrings(rdField); + for (String value : values) { + doc = LuceneDocument.addField(doc, rdField, value, fieldsInfo); + } + } + } + + client.addOrReplace(documentURI, doc); + + client.optimize(); + IndexSearcher searcher = client.newSearcher(); + assertThat(searcher.count(client.newQuery("id:file\\:\\/\\/dummy\\/rd")), is(1)); + assertThat(searcher.count(client.newQuery("cat:foo")), is(1)); + assertThat(searcher.count(client.newQuery("author:abe")), is(1)); + assertThat(searcher.count(client.newQuery("author:obama")), is(1)); + assertThat(searcher.count(client.newQuery("content:categorization")), is(1)); + assertThat(searcher.count(client.newQuery("content:tagging")), is(1)); + assertThat(searcher.count(client.newQuery("content:(classification AND lucene)")), is(1)); + } + } + +} Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/LuceneClientTest.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java Sat Jul 4 07:34:47 2015 @@ -0,0 +1,199 @@ +/** +* 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. +*/ +package org.apache.manifoldcf.agents.output.lucene.tests; + +import java.util.*; +import org.junit.*; + +import org.apache.manifoldcf.core.tests.HTMLTester; + +/** Basic UI navigation tests */ +public class NavigationHSQLDBUI extends BaseUIHSQLDB +{ + + @Test + public void createConnectionsAndJob() + throws Exception + { + testerInstance.newTest(Locale.US); + + HTMLTester.Window window; + HTMLTester.Link link; + HTMLTester.Form form; + HTMLTester.Textarea textarea; + HTMLTester.Selectbox selectbox; + HTMLTester.Button button; + HTMLTester.Radiobutton radiobutton; + HTMLTester.Loop loop; + + window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp"); + + // Login + form = window.findForm(testerInstance.createStringDescription("loginform")); + textarea = form.findTextarea(testerInstance.createStringDescription("userID")); + textarea.setValue(testerInstance.createStringDescription("admin")); + textarea = form.findTextarea(testerInstance.createStringDescription("password")); + textarea.setValue(testerInstance.createStringDescription("admin")); + button = window.findButton(testerInstance.createStringDescription("Login")); + button.click(); + window = testerInstance.findWindow(null); + + // Define an output connection via the UI + link = window.findLink(testerInstance.createStringDescription("List output connections")); + link.click(); + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Add an output connection")); + link.click(); + // Fill in a name + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + textarea = form.findTextarea(testerInstance.createStringDescription("connname")); + textarea.setValue(testerInstance.createStringDescription("MyOutputConnection")); + link = window.findLink(testerInstance.createStringDescription("Type tab")); + link.click(); + // Select a type + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + selectbox = form.findSelectbox(testerInstance.createStringDescription("classname")); + selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.agents.output.lucene.LuceneConnector")); + button = window.findButton(testerInstance.createStringDescription("Continue to next page")); + button.click(); + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + // Visit the Throttling tab + link = window.findLink(testerInstance.createStringDescription("Throttling tab")); + link.click(); + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + // Visit the Lucene Settings tab + link = window.findLink(testerInstance.createStringDescription("Lucene Settings tab")); + link.click(); + + // Now save the connection. + window = testerInstance.findWindow(null); + button = window.findButton(testerInstance.createStringDescription("Save this output connection")); + button.click(); + + // Define a repository connection via the UI + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("List repository connections")); + link.click(); + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Add a connection")); + link.click(); + // Fill in a name + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + textarea = form.findTextarea(testerInstance.createStringDescription("connname")); + textarea.setValue(testerInstance.createStringDescription("MyRepositoryConnection")); + link = window.findLink(testerInstance.createStringDescription("Type tab")); + link.click(); + // Select a type + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editconnection")); + selectbox = form.findSelectbox(testerInstance.createStringDescription("classname")); + selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.tests.TestingRepositoryConnector")); + button = window.findButton(testerInstance.createStringDescription("Continue to next page")); + button.click(); + // Visit the Throttling tab + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Throttling tab")); + link.click(); + // Go back to the Name tab + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Name tab")); + link.click(); + // Now save the connection. + window = testerInstance.findWindow(null); + button = window.findButton(testerInstance.createStringDescription("Save this connection")); + button.click(); + + // Create a job + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("List jobs")); + link.click(); + // Add a job + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Add a job")); + link.click(); + // Fill in a name + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editjob")); + textarea = form.findTextarea(testerInstance.createStringDescription("description")); + textarea.setValue(testerInstance.createStringDescription("MyJob")); + link = window.findLink(testerInstance.createStringDescription("Connection tab")); + link.click(); + // Select the connections + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editjob")); + selectbox = form.findSelectbox(testerInstance.createStringDescription("output_connectionname")); + selectbox.selectValue(testerInstance.createStringDescription("MyOutputConnection")); + selectbox = form.findSelectbox(testerInstance.createStringDescription("output_precedent")); + selectbox.selectValue(testerInstance.createStringDescription("-1")); + button = window.findButton(testerInstance.createStringDescription("Add an output")); + button.click(); + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editjob")); + selectbox = form.findSelectbox(testerInstance.createStringDescription("connectionname")); + selectbox.selectValue(testerInstance.createStringDescription("MyRepositoryConnection")); + button = window.findButton(testerInstance.createStringDescription("Continue to next screen")); + button.click(); + window = testerInstance.findWindow(null); + form = window.findForm(testerInstance.createStringDescription("editjob")); + + // Save the job + button = window.findButton(testerInstance.createStringDescription("Save this job")); + button.click(); + + // Delete the job + window = testerInstance.findWindow(null); + HTMLTester.StringDescription jobID = window.findMatch(testerInstance.createStringDescription("<!--jobid=(.*?)-->"),0); + testerInstance.printValue(jobID); + link = window.findLink(testerInstance.createStringDescription("Delete this job")); + link.click(); + + // Wait for the job to go away + loop = testerInstance.beginLoop(120); + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Manage jobs")); + link.click(); + window = testerInstance.findWindow(null); + HTMLTester.StringDescription isJobNotPresent = window.isNotPresent(jobID); + testerInstance.printValue(isJobNotPresent); + loop.breakWhenTrue(isJobNotPresent); + loop.endLoop(); + + // Delete the repository connection + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("List repository connections")); + link.click(); + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Delete MyRepositoryConnection")); + link.click(); + + // Delete the output connection + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("List output connections")); + link.click(); + window = testerInstance.findWindow(null); + link = window.findLink(testerInstance.createStringDescription("Delete MyOutputConnection")); + link.click(); + + testerInstance.executeTest(); + } + +} Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/connector/src/test/java/org/apache/manifoldcf/agents/output/lucene/tests/NavigationHSQLDBUI.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Added: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/pom.xml URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/lucene/pom.xml?rev=1689113&view=auto ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/lucene/pom.xml (added) +++ manifoldcf/branches/CONNECTORS-1219/connectors/lucene/pom.xml Sat Jul 4 07:34:47 2015 @@ -0,0 +1,380 @@ +<?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"> + <parent> + <groupId>org.apache.manifoldcf</groupId> + <artifactId>mcf-connectors</artifactId> + <version>2.2-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <artifactId>mcf-lucene-connector</artifactId> + <name>ManifoldCF - Connectors - Lucene</name> + + <build> + <defaultGoal>integration-test</defaultGoal> + <sourceDirectory>${basedir}/connector/src/main/java</sourceDirectory> + <testSourceDirectory>${basedir}/connector/src/test/java</testSourceDirectory> + <resources> + <resource> + <directory>${basedir}/connector/src/main/native2ascii</directory> + <includes> + <include>**/*.properties</include> + </includes> + </resource> + <resource> + <directory>${basedir}/connector/src/main/resources</directory> + <includes> + <include>**/*.html</include> + <include>**/*.js</include> + </includes> + </resource> + </resources> + <testResources> + <testResource> + <directory>${basedir}/connector/src/test/resources</directory> + </testResource> + </testResources> + + <plugins> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>native2ascii-maven-plugin</artifactId> + <version>1.0-beta-1</version> + <configuration> + <workDir>target/classes</workDir> + </configuration> + <executions> + <execution> + <id>native2ascii-utf8</id> + <goals> + <goal>native2ascii</goal> + </goals> + <configuration> + <encoding>UTF8</encoding> + <includes> + <include>**/*.properties</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + + <!-- Test plugin configuration --> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-war</id> + <phase>generate-resources</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <outputDirectory>target/dependency</outputDirectory> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-api-service</artifactId> + <version>${project.version}</version> + <type>war</type> + <overWrite>false</overWrite> + <destFileName>mcf-api-service.war</destFileName> + </artifactItem> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-authority-service</artifactId> + <version>${project.version}</version> + <type>war</type> + <overWrite>false</overWrite> + <destFileName>mcf-authority-service.war</destFileName> + </artifactItem> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-crawler-ui</artifactId> + <version>${project.version}</version> + <type>war</type> + <overWrite>false</overWrite> + <destFileName>mcf-crawler-ui.war</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <excludes> + <exclude>**/*Postgresql*.java</exclude> + <exclude>**/*MySQL*.java</exclude> + </excludes> + <forkMode>always</forkMode> + <workingDirectory>target/test-output</workingDirectory> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.12.3</version> + <configuration> + <skipTests>${skipITs}</skipTests> + <systemPropertyVariables> + <crawlerWarPath>../dependency/mcf-crawler-ui.war</crawlerWarPath> + <authorityserviceWarPath>../dependency/mcf-authority-service.war</authorityserviceWarPath> + <apiWarPath>../dependency/mcf-api-service.war</apiWarPath> + </systemPropertyVariables> + <excludes> + <exclude>**/*Postgresql*.java</exclude> + <exclude>**/*MySQL*.java</exclude> + </excludes> + <forkMode>always</forkMode> + <workingDirectory>target/test-output</workingDirectory> + </configuration> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>integration-test</goal> + </goals> + </execution> + <execution> + <id>verify</id> + <goals> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-connector-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-agents</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-pull-agent</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-ui-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-core</artifactId> + <version>${lucene.version}</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-analyzers-common</artifactId> + <version>${lucene.version}</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-queryparser</artifactId> + <version>${lucene.version}</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-queries</artifactId> + <version>${lucene.version}</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-sandbox</artifactId> + <version>${lucene.version}</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>15.0</version> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.2.4</version> + </dependency> + + <!-- Testing dependencies --> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-agents</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-pull-agent</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>${postgresql.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>${hsqldb.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>${mysql.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-api-service</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-authority-service</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>mcf-crawler-ui</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-webapp</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-io</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-continuation</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-xml</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jsp-api-2.1-glassfish</artifactId> + <version>${glassfish.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jsp-2.1-glassfish</artifactId> + <version>${glassfish.version}</version> + <scope>test</scope> + </dependency> + + </dependencies> +</project> Propchange: manifoldcf/branches/CONNECTORS-1219/connectors/lucene/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: manifoldcf/branches/CONNECTORS-1219/connectors/pom.xml URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/connectors/pom.xml?rev=1689113&r1=1689112&r2=1689113&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/connectors/pom.xml (original) +++ manifoldcf/branches/CONNECTORS-1219/connectors/pom.xml Sat Jul 4 07:34:47 2015 @@ -65,6 +65,7 @@ <module>tika</module> <module>documentfilter</module> <module>searchblox</module> + <module>lucene</module> </modules> </project> Modified: manifoldcf/branches/CONNECTORS-1219/pom.xml URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1219/pom.xml?rev=1689113&r1=1689112&r2=1689113&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-1219/pom.xml (original) +++ manifoldcf/branches/CONNECTORS-1219/pom.xml Sat Jul 4 07:34:47 2015 @@ -87,6 +87,7 @@ <tika.version>1.7</tika.version> <jhighlight.version>1.0.2</jhighlight.version> <boilerpipe.version>1.1.0</boilerpipe.version> + <lucene.version>5.2.1</lucene.version> </properties> <modules>
