Skip to content

Commit

Permalink
Merge branch 'feature/lucence-range-index' of https://github.com/wolf…
Browse files Browse the repository at this point in the history
…gangmm/exist into feature/lucence-range-index
  • Loading branch information
wolfgangmm committed Aug 19, 2013
2 parents d91a1ac + 4a6db96 commit 7e1858c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 40 deletions.
Expand Up @@ -926,7 +926,7 @@ public void collect(int doc) {
* *
* @return List of QName objects on which indexes are defined * @return List of QName objects on which indexes are defined
*/ */
protected List<QName> getDefinedIndexes(List<QName> qnames) { public List<QName> getDefinedIndexes(List<QName> qnames) {
List<QName> indexes = new ArrayList<QName>(20); List<QName> indexes = new ArrayList<QName>(20);
if (qnames != null && !qnames.isEmpty()) { if (qnames != null && !qnames.isEmpty()) {
for (QName qname : qnames) { for (QName qname : qnames) {
Expand Down
@@ -1,3 +1,24 @@
/*
* eXist Open Source Native XML Database
* Copyright (C) 2013 The eXist Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* $Id$
*/
package org.exist.indexing.lucene; package org.exist.indexing.lucene;


import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
Expand Down
@@ -1,3 +1,24 @@
/*
* eXist Open Source Native XML Database
* Copyright (C) 2013 The eXist Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* $Id$
*/
package org.exist.indexing.lucene; package org.exist.indexing.lucene;


import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
Expand Down
@@ -1,6 +1,6 @@
/* /*
* eXist Open Source Native XML Database * eXist Open Source Native XML Database
* Copyright (C) 2001-07 The eXist Project * Copyright (C) 2013 The eXist Project
* http://exist-db.org * http://exist-db.org
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
Expand All @@ -17,7 +17,7 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
* $Id: LuceneMatchListenerTest.java 12494 2010-08-21 12:40:10Z shabanovd $ * $Id$
*/ */
package org.exist.indexing.lucene; package org.exist.indexing.lucene;


Expand All @@ -32,15 +32,11 @@
import org.exist.dom.NodeProxy; import org.exist.dom.NodeProxy;
import org.exist.dom.NodeSet; import org.exist.dom.NodeSet;
import org.exist.dom.QName; import org.exist.dom.QName;
import org.exist.security.xacml.AccessContext;
import org.exist.storage.DBBroker; import org.exist.storage.DBBroker;
import org.exist.storage.serializers.EXistOutputKeys; import org.exist.storage.serializers.EXistOutputKeys;
import org.exist.storage.serializers.Serializer; import org.exist.storage.serializers.Serializer;
import org.exist.xquery.XPathException; import org.exist.xquery.XPathException;
import org.exist.xquery.XQuery;
import org.exist.xquery.value.Item;
import org.exist.xquery.value.NodeValue; import org.exist.xquery.value.NodeValue;
import org.exist.xquery.value.Sequence;
import static org.junit.Assert.*; import static org.junit.Assert.*;


import org.junit.Test; import org.junit.Test;
Expand Down Expand Up @@ -70,15 +66,6 @@ public class FacetMatchListenerTest extends FacetAbstractTest {
" <p>Paragraphs with <s>mix</s><s>ed</s> content are <s>danger</s>ous.</p>" + " <p>Paragraphs with <s>mix</s><s>ed</s> content are <s>danger</s>ous.</p>" +
"</article>"; "</article>";


private static String CONF1 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <text qname=\"para\"/>" +
" </index>" +
"</collection>";

private static String CONF2 = private static String CONF2 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" + "<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" + " <index>" +
Expand All @@ -89,30 +76,6 @@ public class FacetMatchListenerTest extends FacetAbstractTest {
" </index>" + " </index>" +
"</collection>"; "</collection>";


private static String CONF3 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index>" +
" <fulltext default=\"none\">" +
" </fulltext>" +
" <text qname=\"hi\"/>" +
" </index>" +
"</collection>";

private static String CONF4 =
"<collection xmlns=\"http://exist-db.org/collection-config/1.0\">" +
" <index xmlns:tei=\"http://www.tei-c.org/ns/1.0\">" +
" <fulltext default=\"none\" attributes=\"no\">" +
" </fulltext>" +
" <lucene>" +
" <text qname=\"p\">" +
" <ignore qname=\"note\"/>" +
" </text>" +
" <text qname=\"head\"/>" +
" <inline qname=\"s\"/>" +
" </lucene>" +
" </index>" +
"</collection>";

private static String MATCH_START = "<exist:match xmlns:exist=\"http://exist.sourceforge.net/NS/exist\">"; private static String MATCH_START = "<exist:match xmlns:exist=\"http://exist.sourceforge.net/NS/exist\">";
private static String MATCH_END = "</exist:match>"; private static String MATCH_END = "</exist:match>";


Expand Down

0 comments on commit 7e1858c

Please sign in to comment.