[Groonga-commit] groonga/gcs [master] Remove gcs-import-examples-http #123

Back to archive index

Yoji SHIDARA null+****@clear*****
Wed Oct 24 19:10:47 JST 2012


Yoji SHIDARA	2012-10-24 19:10:47 +0900 (Wed, 24 Oct 2012)

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

  Log:
    Remove gcs-import-examples-http #123

  Removed files:
    bin/gcs-import-examples-http
  Modified files:
    package.json

  Deleted: bin/gcs-import-examples-http (+0 -132) 100755
===================================================================
--- bin/gcs-import-examples-http    2012-10-24 19:08:16 +0900 (3924d55)
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-
-GREEN="\033[0;32;1m"
-RED="\033[0;31;1m"
-YELLOW="\033[1;33;1m"
-RESET="\033[m"
-
-cat <<EOT
-Groonga CloudSearch example data importer
------------------------------------------
-
-This script setup an example domain and import data into the domain.
-
-EOT
-
-echo "Checking prerequisites..."
-echo
-
-printf "* gcs running..."
-curl --silent "http://localhost:7575" > /dev/null
-if [ $? -eq 0 ]
-then
-  echo " "$GREEN"OK"$RESET
-else
-  echo " "$RED"not running"$RESET
-  printf $YELLOW
-cat <<"EOT"
-
-You need to run gcs on port 7575. Just run gcs command without any options on another terminal.
-
-  $ gcs
-
-EOT
-  printf $RESET
-fi
-
-cat <<EOT
-
-NOTICE:
-
-If you have data in the domain whose name is 'example', it will be updated.
-
-
-Hit enter to continue. Ctrl-C to break.
-EOT
-read enter
-
-
-path_prefixes="`dirname $0`/.."
-if [ -L "$0" ]; then
-  real_dirname="`dirname $0`/`readlink $0`"
-  path_prefixes="$path_prefixes `dirname $real_dirname`/.."
-fi
-path_prefixes="$path_prefixes `npm root`/gcs `npm -g root`/gcs"
-base_path=
-bin_path=
-examples_path=
-for path_prefix in $path_prefixes
-do
-  base_path="$path_prefix"
-
-  if [ -z "$bin_path" ]; then
-    bin_path="$base_path/bin"
-    if [ ! -d "$bin_path" ]; then
-      bin_path=
-    fi
-  fi
-
-  if [ -z "$examples_path" ]; then
-    examples_path="$base_path/examples"
-    if [ ! -d "$examples_path" ]; then
-      examples_path=
-    fi
-  fi
-done
-
-
-echo "==== Deleting 'example' domain (if exists)"
-curl -s "http://localhost:7575/?DomainName=example&Action=DeleteDomain&Version=2011-02-01" > /dev/null
-echo
-
-echo "==== Creating 'example' domain"
-
-create_domain_result=`curl -s "http://localhost:7575/?DomainName=example&Action=CreateDomain&Version=2011-02-01"`
-echo $create_domain_result
-echo
-echo
-
-case $(uname) in
-  Darwin|*BSD)
-    sed="sed -E"
-    ;;
-  *)
-    sed="sed -r"
-    ;;
-esac
-
-documents_endpoint=`echo "$create_domain_result" | $sed -e "s/.+<DocService><Endpoint>//" | $sed -e "s/<.+//"`
-search_endpoint=`echo "$create_domain_result" | $sed -e "s/.+<SearchService><Endpoint>//" | $sed -e "s/<.+//"`
-
-echo "==== Adding index fields"
-echo "== Creating 'name' field"
-curl -s "http://localhost:7575/?Action=DefineIndexField&DomainName=example&IndexField.IndexFieldName=name&IndexField.IndexFieldType=text&IndexField.TextOptions.ResultEnabled=true&IndexField.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&IndexField.TextOptions.ResultEnabled=true&IndexField.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&IndexField.TextOptions.ResultEnabled=true&IndexField.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&IndexField.LiteralOptions.SearchEnabled=true&IndexField.LiteralOptions.ResultEnabled=true&IndexField.LiteralOptions.FacetEnabled=true&Version=2011-02-01"
-echo
-
-echo
-echo "==== Indexing data"
-curl -X POST --upload-file $examples_path/example.sdf.json --header "Content-Type: application/json" http://$documents_endpoint/2011-02-01/documents/batch
-echo
-
-echo
-echo "Done."
-
-cat <<EOT
-
-Now you can try searching by
-
-$ curl "http://$search_endpoint/2011-02-01/search?q=Tokyo"
-
-or, open
-http://localhost:7575
-for web dashboard.
-EOT

  Modified: package.json (+1 -2)
===================================================================
--- package.json    2012-10-24 19:08:16 +0900 (ba292fa)
+++ package.json    2012-10-24 19:10:47 +0900 (2e6eafa)
@@ -45,8 +45,7 @@
     "gcs-index-documents": "./bin/gcs-index-documents",
     "gcs-import-examples": "./bin/gcs-import-examples",
     "gcs-configure-default-search-field": "./bin/gcs-configure-default-search-field",
-    "gcs-post-sdf": "./bin/gcs-post-sdf",
-    "gcs-import-examples-http": "./bin/gcs-import-examples-http"
+    "gcs-post-sdf": "./bin/gcs-post-sdf"
   },
   "main": "./lib/server",
   "engines": {
-------------- next part --------------
HTML����������������������������...
下载 



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