Navigation Menu

Skip to content

Commit

Permalink
Add "products" field for example
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 23, 2012
1 parent c9d3a35 commit b1cc694
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 13 deletions.
9 changes: 6 additions & 3 deletions bin/gcs-import-examples
Expand Up @@ -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
Expand Down
57 changes: 47 additions & 10 deletions examples/example.sdf.json
Expand Up @@ -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"
]
}
},
{
Expand All @@ -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"
]
}
},
{
Expand All @@ -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"
]
}
},
{
Expand All @@ -39,7 +52,11 @@
"lang": "en",
"fields": {
"name": "Anaheim Electronics",
"address": "Granada, Moon"
"address": "Granada, Moon",
"products": [
"MSZ-006 Zeta Gundam",
"RGZ-95 ReZEL"
]
}
},
{
Expand All @@ -49,7 +66,10 @@
"lang": "en",
"fields": {
"name": "Shinsei Industry",
"address": "Earth"
"address": "Earth",
"products": [
"VF-19 Excalibur"
]
}
},
{
Expand All @@ -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"
]
}
},
{
Expand All @@ -69,7 +93,10 @@
"lang": "en",
"fields": {
"name": "Capsule Corporation",
"address": "West City"
"address": "West City",
"products": [
"Time Machine"
]
}
},
{
Expand All @@ -79,7 +106,10 @@
"lang": "en",
"fields": {
"name": "Stark Industries",
"address": "United States"
"address": "United States",
"products": [
"Iron Man"
]
}
},
{
Expand All @@ -89,7 +119,10 @@
"lang": "en",
"fields": {
"name": "Umbrella Corporation",
"address": "Tokyo, Japan"
"address": "Tokyo, Japan",
"products": [
"Tyrant"
]
}
},
{
Expand All @@ -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"
]
}
}
]

0 comments on commit b1cc694

Please sign in to comment.