[Groonga-commit] groonga/gcs [master] Add "products" field for example

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Aug 23 12:12:27 JST 2012


YUKI Hiroshi	2012-08-23 12:12:27 +0900 (Thu, 23 Aug 2012)

  New Revision: b1cc694cd4a7bc0609325d2073590bfbf7a950aa
  https://github.com/groonga/gcs/commit/b1cc694cd4a7bc0609325d2073590bfbf7a950aa

  Log:
    Add "products" field for example

  Modified files:
    bin/gcs-import-examples
    examples/example.sdf.json

  Modified: bin/gcs-import-examples (+6 -3)
===================================================================
--- bin/gcs-import-examples    2012-08-22 20:11:40 +0900 (88f7440)
+++ bin/gcs-import-examples    2012-08-23 12:12:27 +0900 (64b79bb)
@@ -63,13 +63,16 @@ search_endpoint=`echo "$create_domain_result" | sed -r -e "s/.+<SearchService><E
 
 echo "==== Adding index fields"
 echo "== Creating 'name' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=name&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=name&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
 echo
 echo "== Creating 'address' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
 echo
 echo "== Creating 'email_address' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=email_address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&Version=2011-02-01"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=email_address&IndexField.IndexFieldType=text&TextOptions.ResultEnabled=true&TextOption.FacetEnabled=true&Version=2011-02-01"
+echo
+echo "== Creating 'products' field"
+curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=products&IndexField.IndexFieldType=literal&LiteralOptions.SearchEnabled=true&LiteralOptions.ResultEnabled=true&LiteralOptions.FacetEnabled=true&Version=2011-02-01"
 echo
 
 echo

  Modified: examples/example.sdf.json (+47 -10)
===================================================================
--- examples/example.sdf.json    2012-08-22 20:11:40 +0900 (46c8756)
+++ examples/example.sdf.json    2012-08-23 12:12:27 +0900 (2a1e73f)
@@ -7,7 +7,12 @@
     "fields": {
       "name": "Brazil",
       "address": "Shibuya, Tokyo, Japan",
-      "email_address": "info �� razil.jp"
+      "email_address": "info �� razil.jp",
+      "products": [
+        "Moritapo",
+        "Groonga",
+        "Senna"
+      ]
     }
   },
   {
@@ -18,7 +23,10 @@
     "fields": {
       "name": "Enishi Tech Inc.",
       "address": "Sapporo, Hokkaido, Japan",
-      "email_address": "info �� enishi-tech.com"
+      "email_address": "info �� enishi-tech.com",
+      "products": [
+        "soupcurry.info"
+      ]
     }
   },
   {
@@ -29,7 +37,12 @@
     "fields": {
       "name": "ClearCode Inc.",
       "address": "Hongo, Tokyo, Japan",
-      "email_address": "info �� clear-code.com"
+      "email_address": "info �� clear-code.com",
+      "products": [
+        "Cutter",
+        "UxU",
+        "milter manager"
+      ]
     }
   },
   {
@@ -39,7 +52,11 @@
     "lang": "en",
     "fields": {
       "name": "Anaheim Electronics",
-      "address": "Granada, Moon"
+      "address": "Granada, Moon",
+      "products": [
+        "MSZ-006 Zeta Gundam",
+        "RGZ-95 ReZEL"
+      ]
     }
   },
   {
@@ -49,7 +66,10 @@
     "lang": "en",
     "fields": {
       "name": "Shinsei Industry",
-      "address": "Earth"
+      "address": "Earth",
+      "products": [
+        "VF-19 Excalibur"
+      ]
     }
   },
   {
@@ -59,7 +79,11 @@
     "lang": "en",
     "fields": {
       "name": "Omni Consumer Products",
-      "address": "Detroit and Delta City, Michigan, United States"
+      "address": "Detroit and Delta City, Michigan, United States",
+      "products": [
+        "Robocop",
+        "Robocop 2"
+      ]
     }
   },
   {
@@ -69,7 +93,10 @@
     "lang": "en",
     "fields": {
       "name": "Capsule Corporation",
-      "address": "West City"
+      "address": "West City",
+      "products": [
+        "Time Machine"
+      ]
     }
   },
   {
@@ -79,7 +106,10 @@
     "lang": "en",
     "fields": {
       "name": "Stark Industries",
-      "address": "United States"
+      "address": "United States",
+      "products": [
+        "Iron Man"
+      ]
     }
   },
   {
@@ -89,7 +119,10 @@
     "lang": "en",
     "fields": {
       "name": "Umbrella Corporation",
-      "address": "Tokyo, Japan"
+      "address": "Tokyo, Japan",
+      "products": [
+        "Tyrant"
+      ]
     }
   },
   {
@@ -99,7 +132,11 @@
     "lang": "en",
     "fields": {
       "name": "U.S. Robots and Mechanical Men",
-      "address": "New York, United States"
+      "address": "New York, United States",
+      "products": [
+        "NDR-113",
+        "NDR-114"
+      ]
     }
   }
 ]
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index