TAO Logo

GitHub GitHub release GitHub commit activity

Extension required to advanced search integration with TAO platform oat-sa/extension-tao-advanced-search

Installation instructions

TBD.

Create an Indexer

1) Create a new Migration Indexing Task

Here we need to specify 3 required classes and create them:

  • Normalizer: Convert search result support format of AdvancedSearch.
  • Result Searcher: Execute the search for a paginated index execution.
  • Result Filter Factory: The filter used to segregate the index within many workers.
<?php
namespace oat\taoAdvancedSearch\model\DeliveryResult\Service;

use oat\taoAdvancedSearch\model\DeliveryResult\Factory\DeliveryResultFilterFactory;
use oat\taoAdvancedSearch\model\DeliveryResult\Normalizer\DeliveryResultNormalizer;
use oat\taoAdvancedSearch\model\Index\Service\AbstractIndexMigrationTask;

class DeliveryResultMigrationTask extends AbstractIndexMigrationTask
{
    protected function getConfig(): array
    {
        return [
            self::OPTION_NORMALIZER => DeliveryResultNormalizer::class,
            self::OPTION_RESULT_SEARCHER => DeliveryResultSearcher::class,
            self::OPTION_RESULT_FILTER_FACTORY => DeliveryResultFilterFactory::class,
        ];
    }
}

2) Run the indexation

Execute the migration pointing to the migration task you just created. Example:

```shell script php index.php "\oat\tao\scripts\tools\MigrationAction" -c 1 -cp "start=0" -t "oat\taoAdvancedSearch\model\DeliveryResult\Service\DeliveryResultMigrationTask" -rp

or
```shell
php index.php "\oat\tao\scripts\tools\MigrationAction" -c 1 -cp "start=0" -t "oat\taoAdvancedSearch\model\Metadata\Task\MetadataResultMigrationTask" -rp

Populating indexes

To populate ALL indexes, execute:

```shell script ./taoAdvancedSearch/scripts/tools/IndexPopulator.sh --help


### To populate only resources indexes (Items, tests, etc), execute:{#to-populate-only-resources-indexes-items-tests-etc-execute}

```shell script
./taoAdvancedSearch/scripts/tools/IndexResources.sh --help

To populate only class metadata indexes, execute:

```shell script ./taoAdvancedSearch/scripts/tools/IndexClassMetatada.sh --help


### To populate only delivery results, execute:{#to-populate-only-delivery-results-execute}

```shell script
./taoAdvancedSearch/scripts/tools/IndexDeliveryResults.sh --help