Apache Solr Custom TextDataType for Drupal

I have created this file

web/modules/contrib/search_api_solr/src/Plugin/search_api/data_type/MyCustomTextDataType.php:

web/modules/contrib/search_api_solr/src/Plugin/search_api/data_type/MyCustomTextDataType.php

<?php

namespace Drupal\search_api_solr\Plugin\search_api\data_type;

use Drupal\search_api\Plugin\search_api\data_type\TextDataType;

/**
 * Provides a custom full text data type.
 *
 * @SearchApiDataType(
 *   id = "solr_text_yit",
 *   label = @Translation("MyCustom Fulltext"),
 *   description = @Translation("Full text field MyCustom."),
 *   fallback_type = "text_mycustom_syn",
 *   prefix = "ty"
 * )
 */
class MyCustomTextDataType extends TextDataType {}

 

My Apache Solr config file:

<analyzer>
  <charFilter class="solr.PatternReplaceCharFilterFactory" pattern='^([0-9]+([,.][0-9]+)?)(")$' replacement="$1 $3" />
  <tokenizer ...>

Solution?

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare