Advertisement
Guest User

elastic search

a guest
Apr 10th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.33 KB | None | 0 0
  1. <?php
  2.  
  3. return array(
  4.     'search' => array(
  5.         'elasticsearch' => array(
  6.             'mapping' => array(
  7.                 'campaigns'   => array(
  8.                     '_source'    => array(
  9.                         'enabled' => true,
  10.                     ),
  11.                     'properties' => array(
  12.                         'id'         => array(
  13.                             'type' => 'string',
  14.                         ),
  15.                         'user_id'    => array(
  16.                             'type'  => 'string',
  17.                             'index' => 'not_analyzed',
  18.                         ),
  19.                         'created_at' => array(
  20.                             'type'   => 'date',
  21.                             'format' => 'dateOptionalTime',
  22.                             'index'  => 'not_analyzed',
  23.                         ),
  24.                     ),
  25.                 ),
  26.                 'products'    => array(
  27.                     '_source'    => array(
  28.                         'enabled' => true,
  29.                     ),
  30.                     'properties' => array(
  31.                         'address'             => array(
  32.                             'type' => 'string',
  33.                         ),
  34.                         'advertised_price'    => array(
  35.                             'type' => 'double',
  36.                         ),
  37.                         'created_at'          => array(
  38.                             'type'   => 'date',
  39.                             'format' => 'dateTimeNoMillis',
  40.                         ),
  41.                         'created_at_sortable' => array(
  42.                             'type'   => 'date',
  43.                             'format' => 'dateTimeNoMillis',
  44.                             'index'  => 'not_analyzed',
  45.                         ),
  46.                         'end_date'            => array(
  47.                             'type'   => 'date',
  48.                             'format' => 'dateOptionalTime',
  49.                         ),
  50.                         'id'                  => array(
  51.                             'type' => 'string',
  52.                         ),
  53.                         'is_active'           => array(
  54.                             'type' => 'boolean',
  55.                         ),
  56.                         'name'                => array(
  57.                             'type' => 'string',
  58.                         ),
  59.                         'sortable_name'       => array(
  60.                             'type'  => 'string',
  61.                             'index' => 'not_analyzed',
  62.                         ),
  63.                         'start_date'          => array(
  64.                             'type'   => 'date',
  65.                             'format' => 'dateOptionalTime',
  66.                         ),
  67.                         'tags'                => array(
  68.                             'type' => 'string',
  69.                         ),
  70.                         'user_id'             => array(
  71.                             'type'  => 'string',
  72.                             'index' => 'not_analyzed',
  73.                         ),
  74.                         'is_blocked'          => array(
  75.                             'type' => 'boolean',
  76.                         ),
  77.                         'is_blocked_by_admin' => array(
  78.                             'type' => 'boolean',
  79.                         ),
  80.                         'is_approved'         => array(
  81.                             'type' => 'boolean',
  82.                         ),
  83.                         'category'            => array(
  84.                             'type' => 'string',
  85.                         ),
  86.                         'category_code'       => array(
  87.                             'type'  => 'string',
  88.                             'index' => 'not_analyzed',
  89.                         ),
  90.                     ),
  91.                 ),
  92.                 'orders'      => array(
  93.                     '_source'    => array(
  94.                         'enabled' => true,
  95.                     ),
  96.                     'properties' => array(
  97.                         'created_at'         => array(
  98.                             'type'   => 'date',
  99.                             'format' => 'dateOptionalTime',
  100.                         ),
  101.                         'discount_amount'    => array(
  102.                             'type' => 'double',
  103.                         ),
  104.                         'id'                 => array(
  105.                             'type' => 'string',
  106.                         ),
  107.                         'items_count'        => array(
  108.                             'type' => 'integer',
  109.                         ),
  110.                         'subtotal_amount'    => array(
  111.                             'type' => 'double'
  112.                         ),
  113.                         'total_amount'       => array(
  114.                             'type' => 'double',
  115.                         ),
  116.                         'transaction_amount' => array(
  117.                             'type' => 'double',
  118.                         ),
  119.                         'updated_at'         => array(
  120.                             'type'   => 'date',
  121.                             'format' => 'dateOptionalTime',
  122.                         ),
  123.                         'user_id'            => array(
  124.                             'type'  => 'string',
  125.                             'index' => 'not_analyzed',
  126.                         ),
  127.                     ),
  128.                 ),
  129.                 'order_items' => array(
  130.                     '_source'    => array(
  131.                         'enabled' => true,
  132.                     ),
  133.                     'properties' => array(
  134.                         'id'                  => array(
  135.                             'type' => 'string'
  136.                         ),
  137.                         'transaction_number'  => array(
  138.                             'type' => 'string',
  139.                         ),
  140.                         'is_refund_requested' => array(
  141.                             'type' => 'boolean',
  142.                         ),
  143.                     ),
  144.                 ),
  145.                 'users'       => array(
  146.                     '_source'    => array(
  147.                         'enabled' => true,
  148.                     ),
  149.                     'properties' => array(
  150.                         'id'                  => array(
  151.                             'type' => 'string'
  152.                         ),
  153.                         'email'               => array(
  154.                             'type' => 'string',
  155.                         ),
  156.                         'first_name'          => array(
  157.                             'type' => 'string',
  158.                         ),
  159.                         'last_name'           => array(
  160.                             'type' => 'string',
  161.                         ),
  162.                         'created_at_sortable' => array(
  163.                             'type'   => 'date',
  164.                             'format' => 'dateOptionalTime',
  165.                             'index'  => 'not_analyzed',
  166.                         ),
  167.                     ),
  168.                 ),
  169.                 'payouts'     => array(
  170.                     '_source'    => array(
  171.                         'enabled' => true,
  172.                     ),
  173.                     'properties' => array(
  174.                         'amount'              => array(
  175.                             'type' => 'double'
  176.                         ),
  177.                         'balance_after'       => array(
  178.                             'type' => 'double',
  179.                         ),
  180.                         'balance_before'      => array(
  181.                             'type' => 'double'
  182.                         ),
  183.                         'created_at'          => array(
  184.                             'type'   => 'date',
  185.                             'format' => 'dateTimeNoMillis',
  186.                         ),
  187.                         'created_at_sortable' => array(
  188.                             'type'   => 'date',
  189.                             'format' => 'dateTimeNoMillis',
  190.                             'index'  => 'not_analyzed',
  191.                         ),
  192.                         'id'                  => array(
  193.                             'type' => 'string'
  194.                         ),
  195.                         'status'              => array(
  196.                             'type' => 'string'
  197.                         ),
  198.                         'status_label'        => array(
  199.                             'type' => 'string'
  200.                         ),
  201.                         'transaction_number'  => array(
  202.                             'type' => 'string',
  203.                         ),
  204.                         'user_id'             => array(
  205.                             'type'  => 'string',
  206.                             'index' => 'not_analyzed',
  207.                         ),
  208.                     ),
  209.                 ),
  210.                 'pages'       => array(
  211.                     '_source'    => array(
  212.                         'enabled' => true,
  213.                     ),
  214.                     'properties' => array(
  215.                         'code'              => array(
  216.                             'type' => 'string',
  217.                         ),
  218.                         'created_at'        => array(
  219.                             'type'   => 'date',
  220.                             'format' => 'dateTimeNoMillis',
  221.                         ),
  222.                         'id'                => array(
  223.                             'type' => 'string',
  224.                         ),
  225.                         'is_active'         => array(
  226.                             'type' => 'boolean',
  227.                         ),
  228.                         'name'              => array(
  229.                             'type' => 'string',
  230.                         ),
  231.                         'updated_at'        => array(
  232.                             'type'   => 'date',
  233.                             'format' => 'dateTimeNoMillis',
  234.                         ),
  235.                         'updated_at_filter' => array(
  236.                             'type'   => 'date',
  237.                             'format' => 'dateOptionalTime',
  238.                         ),
  239.                     ),
  240.                 ),
  241.                 'reviews'     => array(
  242.                     '_source'    => array(
  243.                         'enabled' => true,
  244.                     ),
  245.                     'properties' => array(
  246.                         'id'         => array(
  247.                             'type' => 'string'
  248.                         ),
  249.                         'created_at' => array(
  250.                             'type'   => 'date',
  251.                             'format' => 'dateOptionalTime',
  252.                             'index'  => 'not_analyzed',
  253.                         ),
  254.                     ),
  255.                 ),
  256.                 'coupons'     => array(
  257.                     '_source'    => array(
  258.                         'enabled' => true,
  259.                     ),
  260.                     'properties' => array(
  261.                         'id'         => array(
  262.                             'type' => 'string'
  263.                         ),
  264.                         'created_at' => array(
  265.                             'type'   => 'date',
  266.                             'format' => 'dateOptionalTime',
  267.                             'index'  => 'not_analyzed',
  268.                         ),
  269.                     ),
  270.                 ),
  271.             ),
  272.         ),
  273.     ),
  274. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement