From: Patrick Schmitz Date: Sat, 3 Dec 2011 00:29:30 +0000 (+0000) Subject: CSPACE-4302 Add support for booleans (AND, OR, NOT) and phrase search (latter waiting... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=63baa5cc4709694b15be165b597a2a3200b425c0;p=tmp%2Fjakarta-migration.git CSPACE-4302 Add support for booleans (AND, OR, NOT) and phrase search (latter waiting for update from nuxeo). --- diff --git a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java index 242f715b3..151f745fb 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java @@ -29,6 +29,7 @@ package org.collectionspace.services.common.query.nuxeo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.regex.Matcher; import java.util.regex.Pattern; import org.nuxeo.ecm.core.api.DocumentModel; @@ -61,10 +62,10 @@ public class QueryManagerNuxeoImpl implements IQueryManager { // words private static Pattern nonWordChars = Pattern .compile("[^\\p{L}\\p{M}\\p{N}_']"); + private static Pattern kwdTokenizer = Pattern.compile("(?:(['\"])(.*?)(?\\\\\\\\)*\\1|([^ ]+))"); private static Pattern unescapedDblQuotes = Pattern.compile("(?