]> git.mxchange.org Git - friendica.git/commitdiff
See issue 3157: Fulltext is now disabled
authorMichael <heluecht@pirati.ca>
Tue, 21 Feb 2017 05:23:37 +0000 (05:23 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 21 Feb 2017 05:23:37 +0000 (05:23 +0000)
mod/network.php
mod/search.php
view/templates/admin_site.tpl

index ad0347ba0c1ca99956f2bd1cd16a38734a9db693..23cf098b65b25913ad3bc95bd0ec2f3ac6d3411d 100644 (file)
@@ -574,9 +574,10 @@ function network_content(App $a, $update = 0) {
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
                } else {
-                       if (get_config('system','use_fulltext_engine'))
-                               $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
-                       else
+                       // Disabled until final decision what to do with this
+                       //if (get_config('system','use_fulltext_engine'))
+                       //      $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
+                       //else
                                $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
                        $sql_order = "`item`.`id`";
                        $order_mode = "id";
index df604e367c7724a46118dec997da42e1183b5fce..7d588aa4d15693c12b16dad0bf61006d697223fb 100644 (file)
@@ -203,11 +203,12 @@ function search_content(App $a) {
        } else {
                logger("Start fulltext search for '".$search."'", LOGGER_DEBUG);
 
-               if (get_config('system','use_fulltext_engine')) {
-                       $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
-               } else {
+               // Disabled until finally is decided how to proceed with this
+               //if (get_config('system','use_fulltext_engine')) {
+               //      $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
+               //} else {
                        $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
-               }
+               //}
 
                $r = q("SELECT %s
                        FROM `item` %s
index 531614932f640e181bee76fbb0b341710e6c05ef..2edfddb885f277bbae863ea9cf1b0b2ea04c494f 100644 (file)
        <div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
 
        <h3>{{$performance}}</h3>
-       {{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
+       <!-- {{include file="field_checkbox.tpl" field=$use_fulltext_engine}} -->
        {{include file="field_checkbox.tpl" field=$only_tag_search}}
        {{include file="field_input.tpl" field=$itemcache}}
        {{include file="field_input.tpl" field=$itemcache_duration}}