Extra Prerequisites
Requires: "fortune-agco": "~0.2.9", "fortune-mongodb-agco": "~0.2.4",
But they aren't direct dependencies, so they aren't listed in package.json; however you're required to be using at least those versions of those packages for compatibility with this module.
We currently also require that you use mongodb as your datastore.
Usage
Hash of properties to related mongo collections
var collectionNameLookup = "brand": "brand" "product_type": "product_type" "contract_type": "contract_type" "region": "region" "country": "country" "address_country": "country" "address_state_province": "state_province" "current_contracts": "contract" "phone_numbers": "phone_number" "business_hours": "business_hours" "current_offerings": "offering" "dealer_misc": "dealers_misc"
var Elastic_Search_URL = processenvBONSAI_URL || "http://127.0.0.1:9200";var Elastic_Search_Index = "dealer-api";var type = "dealers";
Create elastic search endpoint
var dealerSearch = fortune_app Elastic_Search_URLElastic_Search_Index type collectionNameLookup;fortune_approuter;
Required to make the elastic search endpoint work properly
fortune_app;
Create dealer :after endpoint & sync elastic search.
Note - only 1 "after" callback is allowed per endpoint, so if you enable autosync, you're giving it up to elastic-fortune.
dealerSearch;
Alternative way to create dealer :after endpoint & sync elastic search. This approach gives you access to do more in the after callback.
thisfortune_app;
If you just want to expand an object's links:
dealerSearch;
If you just want to send an object to elastic search without expanding it's links:
dealerSearch;