Last active
June 9, 2019 23:25
-
-
Save codedmart/3e3e40d3bfe96cb805ab600cbf98f3dd to your computer and use it in GitHub Desktop.
ElasticSearch `[FieldName]` for the models we use them for. We don't technically use them for `Coupon` and `User` since those use a query string search rather then a multi match search.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
couponFields :: [FieldName] | |
couponFields = | |
[ FieldName "type" | |
, FieldName "code" | |
, FieldName "status" | |
, FieldName "createdBy.fullName" | |
, FieldName "createdBy.email" | |
, FieldName "createdBy.username" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orderFields :: [FieldName] | |
orderFields = | |
[ FieldName "shippingAddress.fullName" | |
, FieldName "status" | |
, FieldName "fulfillmentStatus" | |
, FieldName "orderNumber" | |
, FieldName "user.fullName" | |
, FieldName "user.email" | |
, FieldName "user.username" | |
, FieldName "billingAddress.fullName" | |
, FieldName "discountCode.code" | |
, FieldName "orderItems.orderedBuild.product.slug" | |
, FieldName "orderItems.orderedBuild.product.keywords" | |
, FieldName "orderItems.orderedBuild.shipsFrom.name" | |
, FieldName "orderItems.orderedBuild.shipsFrom.vendorId" | |
, FieldName "orderItems.orderedBuild.product.shipsFrom.name" | |
, FieldName "orderItems.orderedBuild.product.shipsFrom.vendorId" | |
, FieldName "orderItems.orderedBuild.product.productGroup.shipsFrom.name" | |
, FieldName "orderItems.orderedBuild.product.productGroup.shipsFrom.vendorId" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orderItemFields :: [FieldName] | |
orderItemFields = | |
[ FieldName "orderedBuild.shipsFrom.name" | |
, FieldName "orderedBuild.shipsFrom.vendorId" | |
, FieldName "orderedBuild.product.title" | |
, FieldName "orderedBuild.product.slug" | |
, FieldName "orderedBuild.product.keywords" | |
, FieldName "orderedBuild.product.productGroup.title" | |
, FieldName "orderedBuild.product.productGroup.slug" | |
, FieldName "orderedBuild.product.productGroup.keywords" | |
, FieldName "orderedBuild.product.shipsFrom.name" | |
, FieldName "orderedBuild.product.shipsFrom.vendorId" | |
, FieldName "orderedBuild.product.productGroup.shipsFrom.name" | |
, FieldName "orderedBuild.product.productGroup.shipsFrom.vendorId" | |
, FieldName "order.orderNumber" | |
, FieldName "user.fullName" | |
, FieldName "user.email" | |
, FieldName "user.username" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packagingRequestFields :: [FieldName] | |
packagingRequestFields = | |
[ FieldName "user.fullName" | |
, FieldName "user.email" | |
, FieldName "user.username" | |
, FieldName "name" | |
, FieldName "email" | |
, FieldName "additionalSpecs" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
productGroupFields :: [FieldName] | |
productGroupFields = | |
[ FieldName "title" | |
, FieldName "description" | |
, FieldName "slug" | |
, FieldName "status" | |
, FieldName "keywords" | |
, FieldName "shipsFrom.name" | |
, FieldName "shipsFrom.vendorId" | |
, FieldName "shipsFrom.addresses.streetOne" | |
, FieldName "shipsFrom.addresses.city" | |
, FieldName "shipsFrom.addresses.state" | |
, FieldName "shipsFrom.addresses.postalCode" | |
, FieldName "shipsFrom.addresses.country" | |
, FieldName "shipsFrom.contacts.name" | |
, FieldName "shipsFrom.contacts.email" | |
, FieldName "shipsFrom.contacts.phone" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shipmentFields :: [FieldName] | |
shipmentFields = | |
[ FieldName "shipmentNumber" | |
, FieldName "trackingNumbers" | |
, FieldName "deliveryStatuses.status" | |
, FieldName "carrier.name" | |
, FieldName "createdBy.firstName" | |
, FieldName "createdBy.lastName" | |
, FieldName "createdBy.fullName" | |
, FieldName "createdBy.email" | |
, FieldName "destinationAddress.name" | |
, FieldName "destinationAddress.street1" | |
, FieldName "destinationAddress.street2" | |
, FieldName "destinationAddress.city" | |
, FieldName "destinationAddress.state" | |
, FieldName "destinationAddress.zip" | |
, FieldName "destinationAddress.country" | |
, FieldName "destinationAddress.email" | |
, FieldName "destinationAddress.phone" | |
, FieldName "originAddress.name" | |
, FieldName "originAddress.street1" | |
, FieldName "originAddress.street2" | |
, FieldName "originAddress.city" | |
, FieldName "originAddress.state" | |
, FieldName "originAddress.zip" | |
, FieldName "originAddress.country" | |
, FieldName "originAddress.email" | |
, FieldName "originAddress.phone" | |
, FieldName "orders.orderNumber" | |
, FieldName "orders.orderItems.orderedBuild.product.slug" | |
, FieldName "orders.orderItems.orderedBuild.product.keywords" | |
, FieldName "orders.orderItems.orderedBuild.shipsFrom.name" | |
, FieldName "orders.orderItems.orderedBuild.shipsFrom.vendorId" | |
, FieldName "orders.orderItems.orderedBuild.product.shipsFrom.name" | |
, FieldName "orders.orderItems.orderedBuild.product.shipsFrom.vendorId" | |
, FieldName "orders.orderItems.orderedBuild.product.productGroup.shipsFrom.name" | |
, FieldName "orders.orderItems.orderedBuild.product.productGroup.shipsFrom.vendorId" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
userFields :: [FieldName] | |
userFields = | |
[ FieldName "email" | |
, FieldName "fullName" | |
, FieldName "username" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendorFields :: [FieldName] | |
vendorFields = | |
[ FieldName "name" | |
, FieldName "vendorId" | |
, FieldName "addresses.streetOne" | |
, FieldName "addresses.city" | |
, FieldName "addresses.state" | |
, FieldName "addresses.postalCode" | |
, FieldName "addresses.country" | |
, FieldName "contacts.name" | |
, FieldName "contacts.email" | |
, FieldName "contacts.phone" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment