Page MenuHomePhabricator

Criteria for searchContainedSyntax=true in includes/Searcher.php
Closed, DuplicatePublic

Description

Hi,

I have installed Cirrussearch for our private Wiki.

We found a problem for creating new articles which title contains "OR" within some words.

We solve that issue by modifying the file includes/Searcher.php as follows :

// if ( preg_match( '/(?:(?<!\\\\)[?*+~"!|-])|AND|OR|NOT/', $queryStringQueryString ) ) {
if ( preg_match( '/(?:(?<!\\\\)[?*+~"!|-])| AND | OR | NOT |NOT /', $queryStringQueryString ) ) {
               $this->searchContainedSyntax = true;
               // We're unlikey to make good suggestions for query string with special syntax in them....
               $showSuggestion = false;
       }

It solves a major issue for us. The red link was hidden for some new articles.

The red link is displayed even for new article containing OR or AND or NOT (in uppercase) within some words.

Regards,
Laurent

Event Timeline

Lcossin created this task.Jan 25 2015, 2:08 PM
Lcossin raised the priority of this task from to Needs Triage.
Lcossin updated the task description. (Show Details)
Lcossin added a project: CirrusSearch.
Lcossin added a subscriber: Lcossin.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 25 2015, 2:08 PM
Lcossin renamed this task from Criteria for searchContainedSyntaxe in includes/Searcher.php to Criteria for searchContainedSyntax=true in includes/Searcher.php.Jan 25 2015, 2:14 PM
Lcossin updated the task description. (Show Details)
Lcossin set Security to None.
Restricted Application added a project: Discovery-Search. · View Herald TranscriptSep 24 2018, 7:22 AM