Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/352082 )

Change subject: BSExtendedSearch: Fixed autocomplete query
......................................................................

BSExtendedSearch: Fixed autocomplete query

This change addresses ERM5838 and ERM5326.

Explanation: We now provide two search terms to the service

1) Preprocessed and wildcarded term e.g. "*Dok*"
2) Only preprocessed term e.g. "Dok"

This may lead to strange querys like

    title:( Dok* OR Dok* ) OR titleEdge:( Dok* OR Dok* )

in case a user provides some functional characters, but this seems
not to be problem. Manual tests look good so far.

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I7cf56b388554954855702e1c6e7fa1186224b86a
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/82/352082/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 6d50f2c..47c15fc 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -194,8 +194,9 @@
                );
 
                $aOptions = array();
-               $sWildcardedSearchString = $sSolrSearchString; 
//SearchService::wildcardSearchstring( $sSolrSearchString );
-               $aOptions['searchString'] = 
'titleEdge:('.$sWildcardedSearchString.') OR 
title:('.$sWildcardedSearchString.')';
+               $sWildcardedSearchString = SearchService::wildcardSearchstring( 
$sSolrSearchString );
+               $aOptions['searchString'] = 
'titleEdge:('.$sWildcardedSearchString.' OR '.$sSolrSearchString.')'
+                                       . ' OR 
title:('.$sWildcardedSearchString.' OR '.$sSolrSearchString.')';
                $aOptions['searchLimit'] = BsConfig::get( 
'MW::ExtendedSearch::AcEntries' );
 
                $aQuery = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cf56b388554954855702e1c6e7fa1186224b86a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <gla...@hallowelt.biz>
Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz>

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

Reply via email to