incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [06/50] [abbrv] git commit: Added a regex utility to pull the families out of a query
Date Sat, 31 May 2014 14:21:39 GMT
Added a regex utility to pull the families out of a query


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/e6061e1b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/e6061e1b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/e6061e1b

Branch: refs/heads/apache-blur-0.2
Commit: e6061e1b9d927d1de1c724d7790a947582228655
Parents: f96b0b6
Author: Chris Rohr <crohr@nearinfinity.com>
Authored: Wed Apr 16 16:20:04 2014 -0400
Committer: Chris Rohr <crohr@nearinfinity.com>
Committed: Wed Apr 16 16:20:04 2014 -0400

----------------------------------------------------------------------
 contrib/blur-console/ui/app/scripts/blurconsole.utils.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e6061e1b/contrib/blur-console/ui/app/scripts/blurconsole.utils.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/ui/app/scripts/blurconsole.utils.js b/contrib/blur-console/ui/app/scripts/blurconsole.utils.js
index 028fc36..f2aab55 100644
--- a/contrib/blur-console/ui/app/scripts/blurconsole.utils.js
+++ b/contrib/blur-console/ui/app/scripts/blurconsole.utils.js
@@ -57,6 +57,12 @@ blurconsole.utils = (function(){
 
 	findFamilies = function(query) {
 		// Determine regex to find column families in lucene query
+		var matches = query.match(/[^ \(\)\+\-]+(\w+)\.\w+:/g);
+		var families = [];
+		$.each(matches, function(idx, match) {
+			families.push(match.split('.')[0]);
+		});
+		return families;
 	};
 
 	return {


Mime
View raw message