cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1426475 - /cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
Date Fri, 28 Dec 2012 12:21:56 GMT
Author: sergeyb
Date: Fri Dec 28 12:21:56 2012
New Revision: 1426475

URL: http://svn.apache.org/viewvc?rev=1426475&view=rev
Log:
Optionally using all the query component as the search expression

Modified:
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java?rev=1426475&r1=1426474&r2=1426475&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
Fri Dec 28 12:21:56 2012
@@ -42,6 +42,7 @@ public class SearchContextImpl implement
     public static final String SEARCH_QUERY = "_search";
     public static final String SHORT_SEARCH_QUERY = "_s";
     private static final String USE_PLAIN_QUERY_PARAMETERS = "search.use.plain.queries";
+    private static final String USE_ALL_QUERY_COMPONENT = "search.use.all.query.component";
     private static final Logger LOG = LogUtils.getL7dLogger(SearchContextImpl.class);
     private Message message;
     
@@ -103,6 +104,9 @@ public class SearchContextImpl implement
         
         String queryStr = (String)message.get(Message.QUERY_STRING);
         if (queryStr != null) { 
+            if (MessageUtils.isTrue(message.getContextualProperty(USE_ALL_QUERY_COMPONENT)))
{
+                return queryStr;
+            }
             MultivaluedMap<String, String> params = 
                 JAXRSUtils.getStructuredParams(queryStr, "&", true, false);
             if (queryStr.contains(SHORT_SEARCH_QUERY) || queryStr.contains(SEARCH_QUERY))
{



Mime
View raw message