cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1426476 - in /cxf/branches/2.6.x-fixes: ./ rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
Date Fri, 28 Dec 2012 12:27:28 GMT
Author: sergeyb
Date: Fri Dec 28 12:27:28 2012
New Revision: 1426476

URL: http://svn.apache.org/viewvc?rev=1426476&view=rev
Log:
Merged revisions 1426475 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1426475 | sergeyb | 2012-12-28 12:21:56 +0000 (Fri, 28 Dec 2012) | 1 line
  
  Optionally using all the query component as the search expression
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1426475

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java?rev=1426476&r1=1426475&r2=1426476&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
Fri Dec 28 12:27:28 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