public function testIsExemptedProperty()
 {
     $instance = new SearchTable($this->store);
     $instance->setPropertyExemptionList(array('_TEXT'));
     $property = $this->dataItemFactory->newDIProperty('_TEXT');
     $this->assertTrue($instance->isExemptedProperty($property));
     $property = $this->dataItemFactory->newDIProperty('Foo');
     $property->setPropertyTypeId('_uri');
     $this->assertFalse($instance->isExemptedProperty($property));
 }
 /**
  * @since 2.5
  *
  * @param ValueDescription $description
  *
  * @return boolean
  */
 public function canApplyFulltextSearchMatchCondition(ValueDescription $description)
 {
     if (!$this->isEnabled() || $description->getProperty() === null) {
         return false;
     }
     if ($this->searchTable->isExemptedProperty($description->getProperty())) {
         return false;
     }
     $matchableText = $this->getMatchableTextFromDescription($description);
     $comparator = $description->getComparator();
     if ($matchableText && ($comparator === SMW_CMP_LIKE || $comparator === SMW_CMP_NLKE)) {
         return $this->hasMinTokenLength(str_replace('*', '', $matchableText));
     }
     return false;
 }
 /**
  * @since 2.5
  *
  * @param ValueDescription $description
  *
  * @return boolean
  */
 public function canApplyFulltextSearchMatchCondition(ValueDescription $description)
 {
     if (!$this->isEnabled() || $description->getProperty() === null) {
         return false;
     }
     if ($this->searchTable->isExemptedProperty($description->getProperty())) {
         return false;
     }
     $matchableText = $this->getMatchableTextFromDescription($description);
     $comparator = $description->getComparator();
     if ($matchableText && ($comparator === SMW_CMP_LIKE || $comparator === SMW_CMP_NLKE)) {
         // http://dev.mysql.com/doc/refman/5.7/en/fulltext-boolean.html
         // innodb_ft_min_token_size and innodb_ft_max_token_size are used
         // for InnoDB search indexes. ft_min_word_len and ft_max_word_len
         // are used for MyISAM search indexes
         // Don't count any wildcard
         return $this->hasMinTokenLength(str_replace('*', '', $matchableText));
     }
     return false;
 }