EngineInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogSearch\Model\ResourceModel;
  7. /**
  8. * CatalogSearch Index Engine Interface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface EngineInterface
  14. {
  15. const FIELD_PREFIX = 'attr_';
  16. /**
  17. * Scope identifier
  18. *
  19. * @deprecated since using engine resolver
  20. * @see \Magento\Framework\Search\EngineResolverInterface
  21. */
  22. const SCOPE_IDENTIFIER = 'scope';
  23. /**
  24. * Configuration path by which current indexer handler stored
  25. *
  26. * @deprecated since using engine resolver
  27. * @see \Magento\Framework\Search\EngineResolverInterface
  28. */
  29. const CONFIG_ENGINE_PATH = 'catalog/search/engine';
  30. /**
  31. * Retrieve allowed visibility values for current engine
  32. *
  33. * @return array
  34. */
  35. public function getAllowedVisibility();
  36. /**
  37. * Define if current search engine supports advanced index
  38. *
  39. * @return bool
  40. */
  41. public function allowAdvancedIndex();
  42. /**
  43. * Prepare attribute value to store in index
  44. *
  45. * @param \Magento\Eav\Model\Entity\Attribute $attribute
  46. * @param mixed $value
  47. * @return mixed
  48. */
  49. public function processAttributeValue($attribute, $value);
  50. /**
  51. * Prepare index array as a string glued by separator
  52. *
  53. * @param array $index
  54. * @param string $separator
  55. * @return array
  56. */
  57. public function prepareEntityIndex($index, $separator = ' ');
  58. }