KITAITI Makoto
null+****@clear*****
Mon Nov 16 02:18:47 JST 2015
KITAITI Makoto 2015-11-16 02:18:47 +0900 (Mon, 16 Nov 2015) New Revision: 8b2523dc6e8000899a1a51082f3a1f65504e66ca https://github.com/droonga/droonga.org/commit/8b2523dc6e8000899a1a51082f3a1f65504e66ca Merged 83212a0: Merge pull request #20 from KitaitiMakoto/typos Message: Highlight syntax of JSON Modified files: tutorial/1.1.2/basic/index.md Modified: tutorial/1.1.2/basic/index.md (+86 -84) =================================================================== --- tutorial/1.1.2/basic/index.md 2015-11-16 01:35:14 +0900 (5a540e6) +++ tutorial/1.1.2/basic/index.md 2015-11-16 02:18:47 +0900 (7350ce6) @@ -108,101 +108,103 @@ Then, put (overwrite) a configuration file `catalog.json` like following, into t catalog.json: - { - "version": 2, - "effectiveDate": "2013-09-01T00:00:00Z", - "datasets": { - "Default": { - "nWorkers": 4, - "plugins": ["groonga", "crud", "search", "dump", "system"], - "schema": { - "Store": { - "type": "Hash", - "keyType": "ShortText", - "columns": { - "location": { - "type": "Scalar", - "valueType": "WGS84GeoPoint" - } +~~~json +{ + "version": 2, + "effectiveDate": "2013-09-01T00:00:00Z", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "crud", "search", "dump", "system"], + "schema": { + "Store": { + "type": "Hash", + "keyType": "ShortText", + "columns": { + "location": { + "type": "Scalar", + "valueType": "WGS84GeoPoint" + } + } + }, + "Location": { + "type": "PatriciaTrie", + "keyType": "WGS84GeoPoint", + "columns": { + "store": { + "type": "Index", + "valueType": "Store", + "indexOptions": { + "sources": ["location"] + } + } + } + }, + "Term": { + "type": "PatriciaTrie", + "keyType": "ShortText", + "normalizer": "NormalizerAuto", + "tokenizer": "TokenBigram", + "columns": { + "stores__key": { + "type": "Index", + "valueType": "Store", + "indexOptions": { + "position": true, + "sources": ["_key"] + } + } + } + } + }, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { + "volume": { + "address": "192.168.100.50:10031/droonga.000" } }, - "Location": { - "type": "PatriciaTrie", - "keyType": "WGS84GeoPoint", - "columns": { - "store": { - "type": "Index", - "valueType": "Store", - "indexOptions": { - "sources": ["location"] - } - } + { + "volume": { + "address": "192.168.100.50:10031/droonga.001" } }, - "Term": { - "type": "PatriciaTrie", - "keyType": "ShortText", - "normalizer": "NormalizerAuto", - "tokenizer": "TokenBigram", - "columns": { - "stores__key": { - "type": "Index", - "valueType": "Store", - "indexOptions": { - "position": true, - "sources": ["_key"] - } - } + { + "volume": { + "address": "192.168.100.50:10031/droonga.002" } } - }, - "replicas": [ + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ { - "dimension": "_key", - "slicer": "hash", - "slices": [ - { - "volume": { - "address": "192.168.100.50:10031/droonga.000" - } - }, - { - "volume": { - "address": "192.168.100.50:10031/droonga.001" - } - }, - { - "volume": { - "address": "192.168.100.50:10031/droonga.002" - } - } - ] + "volume": { + "address": "192.168.100.50:10031/droonga.010" + } + }, + { + "volume": { + "address": "192.168.100.50:10031/droonga.011" + } }, { - "dimension": "_key", - "slicer": "hash", - "slices": [ - { - "volume": { - "address": "192.168.100.50:10031/droonga.010" - } - }, - { - "volume": { - "address": "192.168.100.50:10031/droonga.011" - } - }, - { - "volume": { - "address": "192.168.100.50:10031/droonga.012" - } - } - ] + "volume": { + "address": "192.168.100.50:10031/droonga.012" + } } ] } - } + ] } + } +} +~~~ This `catalog.json` defines a dataset `Default` as: @@ -242,7 +244,7 @@ Prepare `stores.jsons` including location data of stores. stores.jsons: -~~~ +~~~json { "dataset": "Default", "type": "add", @@ -724,7 +726,7 @@ Check if it is working. Create a query as a JSON file as follows. search-all-stores.json: -~~~ +~~~json { "dataset": "Default", "type": "search", -------------- next part -------------- HTML����������������������������... Télécharger