1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Weird functioning search

Discussion in 'Community' started by ferino, Jul 9, 2019.

  1. ferino

    ferino New Member

    Level: Community
    I have standard field element - input type: Text
    Its contains values as:
    032/002/2019/1017
    032/003/2019/00330-OR

    When I search text: 002, it will display all records that do not contain this text.
    but when I search text 1017, then he finds it correctly.

    I don't understand it.

    In advanced search its working OK.

    Thanks for answer and sorry for my English...
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    What kind of search? Simple element filters?

    -- hugh
     
  3. ferino

    ferino New Member

    Level: Community
    Simple search box, try:
    Code (Text):
    http://www.fnspza.sk/zm2019/objednavky
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    You are searching with "Search all", i.e. it's searching in multiple fields.
    Searching for 002 is showing all records with .../002 + some additional ones.

    Which elements did you add for searching?

    Can you enable "fabrikDebug" (in Fabrik Options/Debugging). Then you'll get the generated query if you add
    ?fabrikdebug=1
    to your URL
     
  5. ferino

    ferino New Member

    Level: Community
    I add two fields for searching, but string '002' is only in 'Cislo objednavky' field.

    What I don't understand at all is that, When I search text: 002, it will display all records - also an empty record that the search string does not contain definitely.

    I try add ?fabrikdebug=1 to my URL, but I didn't detected anything. I don't see a WHERE condition ...

    list GetData:Zoznam objedn√°vok
    SELECT SQL_CALC_FOUND_ROWS DISTINCT `fnsp_objednavky`.`date_time` AS `fnsp_objednavky___date_time`,
    `fnsp_objednavky`.`date_time` AS `fnsp_objednavky___date_time_raw`,
    `fnsp_objednavky`.`id` AS `fnsp_objednavky___id`,
    `fnsp_objednavky`.`id` AS `fnsp_objednavky___id_raw`,
    `fnsp_objednavky`.`cislo` AS `fnsp_objednavky___cislo`,
    `fnsp_objednavky`.`cislo` AS `fnsp_objednavky___cislo_raw`,
    `fnsp_objednavky`.`predmet` AS `fnsp_objednavky___predmet`,
    `fnsp_objednavky`.`predmet` AS `fnsp_objednavky___predmet_raw`,
    `fnsp_objednavky`.`suma` AS `fnsp_objednavky___suma`,
    `fnsp_objednavky`.`suma` AS `fnsp_objednavky___suma_raw`,
    `fnsp_objednavky`.`datum` AS `fnsp_objednavky___datum`,
    `fnsp_objednavky`.`datum` AS `fnsp_objednavky___datum_raw`,
    `fnsp_objednavky`.`kategoria` AS `fnsp_objednavky___kategoria`,
    `fnsp_objednavky`.`kategoria` AS `fnsp_objednavky___kategoria_raw`,
    `fnsp_objednavky`.`poc_os_ponuk` AS `fnsp_objednavky___poc_os_ponuk`,
    `fnsp_objednavky`.`poc_os_ponuk` AS `fnsp_objednavky___poc_os_ponuk_raw`,
    `fnsp_objednavky`.`poc_pr_ponuk` AS `fnsp_objednavky___poc_pr_ponuk`,
    `fnsp_objednavky`.`poc_pr_ponuk` AS `fnsp_objednavky___poc_pr_ponuk_raw`,
    `fnsp_objednavky`.`dod_nazov` AS `fnsp_objednavky___dod_nazov`,
    `fnsp_objednavky`.`dod_nazov` AS `fnsp_objednavky___dod_nazov_raw`,
    `fnsp_objednavky`.`dod_ico` AS `fnsp_objednavky___dod_ico`,
    `fnsp_objednavky`.`dod_ico` AS `fnsp_objednavky___dod_ico_raw`,
    `fnsp_objednavky`.`dod_ulica` AS `fnsp_objednavky___dod_ulica`,
    `fnsp_objednavky`.`dod_ulica` AS `fnsp_objednavky___dod_ulica_raw`,
    `fnsp_objednavky`.`dod_psc` AS `fnsp_objednavky___dod_psc`,
    `fnsp_objednavky`.`dod_psc` AS `fnsp_objednavky___dod_psc_raw`,
    `fnsp_objednavky`.`dod_mesto` AS `fnsp_objednavky___dod_mesto`,
    `fnsp_objednavky`.`dod_mesto` AS `fnsp_objednavky___dod_mesto_raw`,
    `fnsp_objednavky`.`dod_stat` AS `fnsp_objednavky___dod_stat`,
    `fnsp_objednavky`.`dod_stat` AS `fnsp_objednavky___dod_stat_raw`,
    `fnsp_objednavky`.`fosoba` AS `fnsp_objednavky___fosoba`,
    `fnsp_objednavky`.`fosoba` AS `fnsp_objednavky___fosoba_raw`,
    `fnsp_objednavky`.`fosoba_funkcia` AS `fnsp_objednavky___fosoba_funkcia`,
    `fnsp_objednavky`.`fosoba_funkcia` AS `fnsp_objednavky___fosoba_funkcia_raw`,
    `fnsp_objednavky`.`dovod` AS `fnsp_objednavky___dovod`,
    `fnsp_objednavky`.`dovod` AS `fnsp_objednavky___dovod_raw`,
    `fnsp_objednavky`.`creator` AS `fnsp_objednavky___creator_raw`,
    `gkh75_users`.`username` AS `fnsp_objednavky___creator`,
    `fnsp_objednavky`.`id` AS slug
    , `fnsp_objednavky`.`id` AS `__pk_val`

    FROM `fnsp_objednavky`
    LEFT JOIN `#__users` AS `gkh75_users` ON `gkh75_users`.`id` = `fnsp_objednavky`.`creator`

    Array
    (
    [fabrik_list_filter_all_1_com_fabrik_1] => 002
    [search-mode-advanced] => any
    [limit1] => 10
    [limitstart1] => 0
    [option] => com_fabrik
    [orderdir] =>
    [orderby] =>
    [view] => list
    [listid] => 1
    [listref] => 1_com_fabrik_1
    [Itemid] => 114
    [fabrik_referrer] => /zm2019/objednavky?fabrikdebug=1
    [88c8dc1117bc29199509cadcaabffa0d] => 1
    [format] => html
    [packageId] => 0
    [task] => list.filter
    [fabrik_listplugin_name] =>
    [fabrik_listplugin_renderOrder] =>
    [fabrik_listplugin_options] =>
    [incfilters] => 1
    )

    BUT!
    when I search string 1017, I see WHERE condition!

    SELECT SQL_CALC_FOUND_ROWS DISTINCT `fnsp_objednavky`.`date_time` AS `fnsp_objednavky___date_time`,
    `fnsp_objednavky`.`date_time` AS `fnsp_objednavky___date_time_raw`,
    `fnsp_objednavky`.`id` AS `fnsp_objednavky___id`,
    `fnsp_objednavky`.`id` AS `fnsp_objednavky___id_raw`,
    `fnsp_objednavky`.`cislo` AS `fnsp_objednavky___cislo`,
    `fnsp_objednavky`.`cislo` AS `fnsp_objednavky___cislo_raw`,
    `fnsp_objednavky`.`predmet` AS `fnsp_objednavky___predmet`,
    `fnsp_objednavky`.`predmet` AS `fnsp_objednavky___predmet_raw`,
    `fnsp_objednavky`.`suma` AS `fnsp_objednavky___suma`,
    `fnsp_objednavky`.`suma` AS `fnsp_objednavky___suma_raw`,
    `fnsp_objednavky`.`datum` AS `fnsp_objednavky___datum`,
    `fnsp_objednavky`.`datum` AS `fnsp_objednavky___datum_raw`,
    `fnsp_objednavky`.`kategoria` AS `fnsp_objednavky___kategoria`,
    `fnsp_objednavky`.`kategoria` AS `fnsp_objednavky___kategoria_raw`,
    `fnsp_objednavky`.`poc_os_ponuk` AS `fnsp_objednavky___poc_os_ponuk`,
    `fnsp_objednavky`.`poc_os_ponuk` AS `fnsp_objednavky___poc_os_ponuk_raw`,
    `fnsp_objednavky`.`poc_pr_ponuk` AS `fnsp_objednavky___poc_pr_ponuk`,
    `fnsp_objednavky`.`poc_pr_ponuk` AS `fnsp_objednavky___poc_pr_ponuk_raw`,
    `fnsp_objednavky`.`dod_nazov` AS `fnsp_objednavky___dod_nazov`,
    `fnsp_objednavky`.`dod_nazov` AS `fnsp_objednavky___dod_nazov_raw`,
    `fnsp_objednavky`.`dod_ico` AS `fnsp_objednavky___dod_ico`,
    `fnsp_objednavky`.`dod_ico` AS `fnsp_objednavky___dod_ico_raw`,
    `fnsp_objednavky`.`dod_ulica` AS `fnsp_objednavky___dod_ulica`,
    `fnsp_objednavky`.`dod_ulica` AS `fnsp_objednavky___dod_ulica_raw`,
    `fnsp_objednavky`.`dod_psc` AS `fnsp_objednavky___dod_psc`,
    `fnsp_objednavky`.`dod_psc` AS `fnsp_objednavky___dod_psc_raw`,
    `fnsp_objednavky`.`dod_mesto` AS `fnsp_objednavky___dod_mesto`,
    `fnsp_objednavky`.`dod_mesto` AS `fnsp_objednavky___dod_mesto_raw`,
    `fnsp_objednavky`.`dod_stat` AS `fnsp_objednavky___dod_stat`,
    `fnsp_objednavky`.`dod_stat` AS `fnsp_objednavky___dod_stat_raw`,
    `fnsp_objednavky`.`fosoba` AS `fnsp_objednavky___fosoba`,
    `fnsp_objednavky`.`fosoba` AS `fnsp_objednavky___fosoba_raw`,
    `fnsp_objednavky`.`fosoba_funkcia` AS `fnsp_objednavky___fosoba_funkcia`,
    `fnsp_objednavky`.`fosoba_funkcia` AS `fnsp_objednavky___fosoba_funkcia_raw`,
    `fnsp_objednavky`.`dovod` AS `fnsp_objednavky___dovod`,
    `fnsp_objednavky`.`dovod` AS `fnsp_objednavky___dovod_raw`,
    `fnsp_objednavky`.`creator` AS `fnsp_objednavky___creator_raw`,
    `gkh75_users`.`username` AS `fnsp_objednavky___creator`,
    `fnsp_objednavky`.`id` AS slug
    , `fnsp_objednavky`.`id` AS `__pk_val`

    FROM `fnsp_objednavky`
    LEFT JOIN `#__users` AS `gkh75_users` ON `gkh75_users`.`id` = `fnsp_objednavky`.`creator`
    WHERE ( (MATCH(`fnsp_objednavky`.`cislo`) AGAINST ('1015*' IN BOOLEAN MODE) OR MATCH( `fnsp_objednavky`.`predmet`) AGAINST ('1015*' IN BOOLEAN MODE)) )
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    Ahh
    I think the extended search_all needs at least 4 characters. It seems 3 characters are ignored.
    (You'll find a055 but not a05)
    Additionally there seem to be issues with special characters like /, - ...

    Use search_all with "Extended"=no.
     
  7. ferino

    ferino New Member

    Level: Community
    Thank you, 'search_all with "Extended"=no' works with numbers and special characters, but now does not work search words with accents.

    E.g. I have the word "n√°ustok" in one record
    When I search by string 'naustok':
    settings: search_all with "Extended"=yes -> finds this record
    settings: search_all with "Extended"=no -> does not find this record

    why?
     

Share This Page