[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix index_options on root field

2016-09-15 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix index_options on root field
..


Fix index_options on root field

This problem was introduced in I49739a9 and breaks index_options
for root fields.

Change-Id: I1b42ea4d51b5d3bd80f8fbb8693c3f00800ad7da
---
M includes/Search/TextIndexField.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Search/TextIndexField.php 
b/includes/Search/TextIndexField.php
index 2b81529..2f307e3 100644
--- a/includes/Search/TextIndexField.php
+++ b/includes/Search/TextIndexField.php
@@ -175,7 +175,7 @@
protected function configureHighlighting( array &$field, array 
$subFields, $rootField = true ) {
if ( $this->mappingFlags & 
MappingConfigBuilder::OPTIMIZE_FOR_EXPERIMENTAL_HIGHLIGHTER ) {
if ( $this->checkFlag( self::SPEED_UP_HIGHLIGHTING ) ) {
-   if ( !$rootField ) {
+   if ( $rootField ) {
$field[ 'index_options' ] = 'offsets';
}
foreach ( $subFields as $fieldName ) {
@@ -186,7 +186,7 @@
}
} else {
// We use the FVH on all fields so turn on term vectors
-   if ( !$rootField ) {
+   if ( $rootField ) {
$field[ 'term_vector' ] = 
'with_positions_offsets';
}
foreach ( $subFields as $fieldName ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/310840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b42ea4d51b5d3bd80f8fbb8693c3f00800ad7da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fix index_options on root field

2016-09-15 Thread DCausse (Code Review)
DCausse has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310840

Change subject: Fix index_options on root field
..

Fix index_options on root field

This problem was introduced in I49739a9 and breaks index_options
for root fields.

Change-Id: I1b42ea4d51b5d3bd80f8fbb8693c3f00800ad7da
---
M includes/Search/TextIndexField.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/40/310840/1

diff --git a/includes/Search/TextIndexField.php 
b/includes/Search/TextIndexField.php
index 2b81529..2f307e3 100644
--- a/includes/Search/TextIndexField.php
+++ b/includes/Search/TextIndexField.php
@@ -175,7 +175,7 @@
protected function configureHighlighting( array &$field, array 
$subFields, $rootField = true ) {
if ( $this->mappingFlags & 
MappingConfigBuilder::OPTIMIZE_FOR_EXPERIMENTAL_HIGHLIGHTER ) {
if ( $this->checkFlag( self::SPEED_UP_HIGHLIGHTING ) ) {
-   if ( !$rootField ) {
+   if ( $rootField ) {
$field[ 'index_options' ] = 'offsets';
}
foreach ( $subFields as $fieldName ) {
@@ -186,7 +186,7 @@
}
} else {
// We use the FVH on all fields so turn on term vectors
-   if ( !$rootField ) {
+   if ( $rootField ) {
$field[ 'term_vector' ] = 
'with_positions_offsets';
}
foreach ( $subFields as $fieldName ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/310840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b42ea4d51b5d3bd80f8fbb8693c3f00800ad7da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits