cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: CXF-5923: Create sample to demonstrate usage of search extension with Lucene and Tika. Added multiple fields into search criteria
Date Wed, 24 Sep 2014 15:15:39 GMT
Repository: cxf
Updated Branches:
  refs/heads/master d552e8c14 -> e4befc709


CXF-5923: Create sample to demonstrate usage of search extension with Lucene and Tika. Added
multiple fields into search criteria


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/698cd048
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/698cd048
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/698cd048

Branch: refs/heads/master
Commit: 698cd0483b99f9638ce05557e1137ffce86d4185
Parents: 22a6eba
Author: reta <drreta@gmail.com>
Authored: Wed Sep 24 11:13:40 2014 -0400
Committer: reta <drreta@gmail.com>
Committed: Wed Sep 24 11:13:40 2014 -0400

----------------------------------------------------------------------
 .../search/src/main/java/demo/jaxrs/search/client/Client.java  | 2 ++
 .../jax_rs/search/src/main/resources/browser/index.html        | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/698cd048/distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java
b/distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java
index e277132..c126630 100644
--- a/distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java
+++ b/distribution/src/main/release/samples/jax_rs/search/src/main/java/demo/jaxrs/search/client/Client.java
@@ -51,6 +51,8 @@ public final class Client {
         search(url, httpClient, "ct==Java");        
         search(url, httpClient, "ct==WebSockets");
         
+        search(url, httpClient, "ct==jaxrs,source==*jaxrs*");
+        
         delete(url, httpClient);
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/698cd048/distribution/src/main/release/samples/jax_rs/search/src/main/resources/browser/index.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/search/src/main/resources/browser/index.html
b/distribution/src/main/release/samples/jax_rs/search/src/main/resources/browser/index.html
index 3537747..dc1c2d7 100644
--- a/distribution/src/main/release/samples/jax_rs/search/src/main/resources/browser/index.html
+++ b/distribution/src/main/release/samples/jax_rs/search/src/main/resources/browser/index.html
@@ -86,8 +86,12 @@
     		$( "#results" ).html("");
     		
     		if( query !== "" ) {
+    			var encodedQuery = encodeURIComponent( query );
+    			var encodedWildcardsQuery = encodeURIComponent( "*" + query + "*" );
+    			var filter = "ct==" + encodedQuery + ",source==" + encodedWildcardsQuery; 
+
 	    		$.ajax({
-	    			url: $(this).attr("action") + "?$filter=ct=="  + encodeURIComponent( query ),
+	    			url: $(this).attr("action") + "?$filter=" + filter,
 	    			type: 'GET',
 	    			async: false,
 	    			success: function (data) {


Mime
View raw message