Recherche: combinaison de mots

More
10 years 10 months ago #44366 by seabird
Bonjour,

j'ai la version 2.1.2 r1806 beta de flexi et je viens de remarquer un petit souci pour la recherche de texte dans les articles d'une catégorie.
En effet pour la combinaison, j'ai sélectionné phrase exacte.
Si je tape par exemple: documents en ligne .
La recherche me sort tous les articles qui contiennent le mot: documents et tous les articles qui contiennent le mot: ligne. Donc ce n'est pas ce que je veux. J'ai testé toutes les possibilités, je n'arrive pas à obtenir seulement les articles qui contiennent exactement: documents en ligne.

Est ce que le souci vient de moi où y a t-il un problème ?

NB: je viens juste de remarquer qu'en mettant la requète entre guillemets, cela fonctionne.

Merci,

Eric

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44411 by ggppdk
Hello

i think i remember noticing this

next time we update this part of FLEXIcontent,
will see what we can do about it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44461 by seabird
Hello,

Ok for update:
I quickly changed the file: \com_flexicontent\models\category.php line 849.
Code:
case 'exact': $text = '"'.$text.'"'; $text = trim( $text ); $quoted_text = FLEXI_J16GE ? $db->escape($text, true) : $db->getEscaped($text, true); $quoted_text = $db->Quote( $quoted_text, false ); $_text_match = ' MATCH (ie.search_index) AGAINST ('.$quoted_text.' IN BOOLEAN MODE) '; break;

Now it's work

Eric

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44478 by ggppdk
Hello

i see now,
thanks for feedback and issue report + fix

i thought you were talking about
auto-complete of the TEXT form field
(by quickly reading translation of your original message)


-- what you did will give correct results but it will be slow in big sites


to improve performance try/test this:
replace:
Code:
case 'exact': $_text_match = ' MATCH (ie.search_index) AGAINST ('.$quoted_text.' IN BOOLEAN MODE) '; break;
with:
Code:
case 'exact': $like_text = $db->Quote( '%'. (FLEXI_J16GE ? $db->escape($text, true) : $db->getEscaped($text, true)) .'%', false ); $_text_match = ' MATCH (search_index) AGAINST ('.$quoted_text.' IN BOOLEAN MODE) AND search_index LIKE '.$like_text; break;


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44482 by seabird
Hello,

It's work fine.
Code:
$like_text = $db->Quote( '%'. (FLEXI_J16GE ? $db->escape($text, true) : $db->getEscaped($text, true)) .'%', false ); $_text_match = ' MATCH (search_index) AGAINST ('.$quoted_text.' IN BOOLEAN MODE) AND search_index LIKE '.$like_text;

Thanks,

Eric

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.385 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline