[Groonga-commit] groonga/gcs [master] Add utility properties to Domain and IndexField

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 9日 (木) 17:47:45 JST


SHIMODA Hiroshi	2012-08-09 17:47:45 +0900 (Thu, 09 Aug 2012)

  New Revision: 4b02ad703592630193b9956256985a0550b51c82
  https://github.com/groonga/gcs/commit/4b02ad703592630193b9956256985a0550b51c82

  Log:
    Add utility properties to Domain and IndexField

  Modified files:
    lib/database/domain.js
    lib/database/index-field.js

  Modified: lib/database/domain.js (+3 -0)
===================================================================
--- lib/database/domain.js    2012-08-09 17:33:08 +0900 (c016048)
+++ lib/database/domain.js    2012-08-09 17:47:45 +0900 (7bda632)
@@ -205,6 +205,9 @@ Domain.prototype = {
   get searchPartitionCount() {
     return 0;
   },
+  get searchInstanceType() {
+    return null;
+  },
 
   getDocumentsEndpoint: function(hostname) {
     if (hostname[0] != '.')

  Modified: lib/database/index-field.js (+9 -1)
===================================================================
--- lib/database/index-field.js    2012-08-09 17:33:08 +0900 (6179b0d)
+++ lib/database/index-field.js    2012-08-09 17:47:45 +0900 (8e13779)
@@ -151,8 +151,16 @@ IndexField.prototype = {
     return true;
   },
 
+  get options() {
+    var options = [];
+    if (this.searchEnabled) options.push('Search');
+    if (this.facetEnabled) options.push('Facet');
+    if (this.resultEnabled) options.push('Result');
+    return options.join(' ');
+  },
+
   get state() {
-    return 'RequiresIndexDocuments';
+    return 'Active';
   },
 
   createSync: function() {
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index