[BUG] Filter for filetype (image, video, etc.) displays empty results
Describe the bug I have been using fsearch for a couple of years and it always worked great. Recently my installation started to fail to filter results. When choosing a filter the results list stays empty. Only the filters "All" and "Folders" work as expected. I did not change anything in the config.
To Reproduce Steps to reproduce the behavior:
- Search for something
- Filter for a specific filetype
Expected behavior See the filtered filetype results
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Arch / AUR / fsearch
Did another test. I deleted the fsearch database folders in /home/user/.config/fsearch/database and reindexed the database. Sadly still giving me the same result. Filtering for "All" and "Folders" works, filtering for specific Filetypes gives an empty search result.
Hi, can you paste the content of your config file? (~/.config/fsearch/fsearch.conf)
You can omit the database section if you don't want to expose the folders you've indexed.
Sure:
` [Interface] single_click_open=false launch_desktop_files=true highlight_search_terms=true restore_column_configuration=true restore_sort_order=true double_click_path=true enable_list_tooltips=true enable_dark_theme=false show_menubar=true show_statusbar=true show_filter=true show_search_button=true show_base_2_units=false action_after_file_open=0 action_after_file_open_keyboard=false action_after_file_open_mouse=false exit_on_escape=true show_indexing_status=true restore_window_size=true window_width=1920 window_height=987 show_listview_icons=true show_path_column=true show_type_column=true show_extension_column=true show_size_column=true show_modified_column=true sort_ascending=true sort_by=Name name_column_width=624 path_column_width=687 extension_column_width=100 type_column_width=100 size_column_width=75 modified_column_width=398 name_column_pos=0 path_column_pos=1 type_column_pos=2 size_column_pos=3 modified_column_pos=4
[Dialogs] show_dialog_failed_opening=true
[Search] search_as_you_type=true auto_search_in_path=true auto_match_case=true search_in_path=false enable_regex=false match_case=false hide_results_on_empty_search=true
[Filters] filter_1_name=Alles filter_1_macro= filter_1_query= filter_1_match_case=false filter_1_search_in_path=false filter_1_enable_regex=false filter_2_name=Ordner filter_2_macro= filter_2_query=folder: filter_2_match_case=false filter_2_search_in_path=false filter_2_enable_regex=false filter_3_name=Dateien filter_3_macro= filter_3_query=file: filter_3_match_case=false filter_3_search_in_path=false filter_3_enable_regex=false filter_4_name=Applications filter_4_macro=app filter_4_query=file:regex:"\\.(desktop|DESKTOP)$" filter_4_match_case=true filter_4_search_in_path=false filter_4_enable_regex=false filter_5_name=Archive filter_5_macro=archive filter_5_query=file:regex:"\\.(7z|ace|arj|bz2|cab|gz|gzip|jar|r00|r01|r02|r03|r04|r05|r06|r07|r08|r09|r10|r11|r12|r13|r14|r15|r16|r17|r18|r19|r20|r21|r22|r23|r24|r25|r26|r27|r28|r29|rar|tar|tgz|z|zip|7Z|ACE|ARJ|BZ2|CAB|GZ|GZIP|JAR|R00|R01|R02|R03|R04|R05|R06|R07|R08|R09|R10|R11|R12|R13|R14|R15|R16|R17|R18|R19|R20|R21|R22|R23|R24|R25|R26|R27|R28|R29|RAR|TAR|TGZ|Z|ZIP)$" filter_5_match_case=true filter_5_search_in_path=false filter_5_enable_regex=false filter_6_name=Audio filter_6_macro=audio filter_6_query=file:regex:"\\.(aac|ac3|aif|aifc|aiff|au|cda|dts|fla|flac|it|m1a|m2a|m3u|m4a|mid|midi|mka|mod|mp2|mp3|mpa|ogg|opus|ra|rmi|spc|rmi|snd|umx|voc|wav|wma|xm|AAC|AC3|AIF|AIFC|AIFF|AU|CDA|DTS|FLA|FLAC|IT|M1A|M2A|M3U|M4A|MID|MIDI|MKA|MOD|MP2|MP3|MPA|OGG|OPUS|RA|RMI|SPC|RMI|SND|UMX|VOC|WAV|WMA|XM)$" filter_6_match_case=true filter_6_search_in_path=false filter_6_enable_regex=false filter_7_name=Dokumente filter_7_macro=doc filter_7_query=file:regex:"\\.(c|chm|cpp|csv|cxx|doc|docm|docx|dot|dotm|dotx|h|hpp|htm|html|hxx|ini|java|lua|mht|mhtml|ods|odt|odp|pdf|potx|potm|ppam|ppsm|ppsx|pps|ppt|pptm|pptx|rtf|sldm|sldx|thmx|txt|vsd|wpd|wps|wri|xlam|xls|xlsb|xlsm|xlsx|xltm|xltx|xml|C|CHM|CPP|CSV|CXX|DOC|DOCM|DOCX|DOT|DOTM|DOTX|H|HPP|HTM|HTML|HXX|INI|JAVA|LUA|MHT|MHTML|ODS|ODT|ODP|PDF|POTX|POTM|PPAM|PPSM|PPSX|PPS|PPT|PPTM|PPTX|RTF|SLDM|SLDX|THMX|TXT|VSD|WPD|WPS|WRI|XLAM|XLS|XLSB|XLSM|XLSX|XLTM|XLTX|XML)$" filter_7_match_case=true filter_7_search_in_path=false filter_7_enable_regex=false filter_8_name=Bilder filter_8_macro=pic filter_8_query=file:regex:"\\.(ani|bmp|gif|ico|jpe|jpeg|jpg|pcx|png|psd|tga|tif|tiff|webp|wmf|ANI|BMP|GIF|ICO|JPE|JPEG|JPG|PCX|PNG|PSD|TGA|TIF|TIFF|WEBP|WMF)$" filter_8_match_case=true filter_8_search_in_path=false filter_8_enable_regex=false filter_9_name=Videos filter_9_macro=video filter_9_query=file:regex:"\\.(3g2|3gp|3gp2|3gpp|amr|amv|asf|avi|bdmv|bik|d2v|divx|drc|dsa|dsm|dss|dsv|evo|f4v|flc|fli|flic|flv|hdmov|ifo|ivf|m1v|m2p|m2t|m2ts|m2v|m4b|m4p|m4v|mkv|mp2v|mp4|mp4v|mpe|mpeg|mpg|mpls|mpv2|mpv4|mov|mts|ogm|ogv|pss|pva|qt|ram|ratdvd|rm|rmm|rmvb|roq|rpm|smil|smk|swf|tp|tpr|ts|vob|vp6|webm|wm|wmp|wmv|3G2|3GP|3GP2|3GPP|AMR|AMV|ASF|AVI|BDMV|BIK|D2V|DIVX|DRC|DSA|DSM|DSS|DSV|EVO|F4V|FLC|FLI|FLIC|FLV|HDMOV|IFO|IVF|M1V|M2P|M2T|M2TS|M2V|M4B|M4P|M4V|MKV|MP2V|MP4|MP4V|MPE|MPEG|MPG|MPLS|MPV2|MPV4|MOV|MTS|OGM|OGV|PSS|PVA|QT|RAM|RATDVD|RM|RMM|RMVB|ROQ|RPM|SMIL|SMK|SWF|TP|TPR|TS|VOB|VP6|WEBM|WM|WMP|WMV)$" filter_9_match_case=true filter_9_search_in_path=false filter_9_enable_regex=false
`
Okay that explains the issue. You've likely been using the development version of FSearch at some point, because your config is still using an outdated query format which was used during the development of the query language. You can fix this easily by replacing the [Filters] sections with the following (while FSearch isn't runnig):
[Filters]
filter_1_name=Everything
filter_1_macro=
filter_1_query=
filter_1_match_case=false
filter_1_search_in_path=false
filter_1_enable_regex=false
filter_2_name=Folders
filter_2_macro=
filter_2_query=folder:
filter_2_match_case=false
filter_2_search_in_path=false
filter_2_enable_regex=false
filter_3_name=Files
filter_3_macro=
filter_3_query=file:
filter_3_match_case=false
filter_3_search_in_path=false
filter_3_enable_regex=false
filter_4_name=Applications
filter_4_macro=app
filter_4_query=ext:desktop;DESKTOP
filter_4_match_case=true
filter_4_search_in_path=false
filter_4_enable_regex=false
filter_5_name=Archives
filter_5_macro=archive
filter_5_query=ext:7z;ace;arj;bz2;cab;gz;gzip;jar;r00;r01;r02;r03;r04;r05;r06;r07;r08;r09;r10;r11;r12;r13;r14;r15;r16;r17;r18;r19;r20;r21;r22;r23;r24;r25;r26;r27;r28;r29;rar;tar;tgz;z;zip;7Z;ACE;ARJ;BZ2;CAB;GZ;GZIP;JAR;R00;R01;R02;R03;R04;R05;R06;R07;R08;R09;R10;R11;R12;R13;R14;R15;R16;R17;R18;R19;R20;R21;R22;R23;R24;R25;R26;R27;R28;R29;RAR;TAR;TGZ;Z;ZIP
filter_5_match_case=true
filter_5_search_in_path=false
filter_5_enable_regex=false
filter_6_name=Audio
filter_6_macro=audio
filter_6_query=ext:aac;ac3;aif;aifc;aiff;au;cda;dts;fla;flac;it;m1a;m2a;m3u;m4a;mid;midi;mka;mod;mp2;mp3;mpa;ogg;opus;ra;rmi;spc;rmi;snd;umx;voc;wav;wma;xm;AAC;AC3;AIF;AIFC;AIFF;AU;CDA;DTS;FLA;FLAC;IT;M1A;M2A;M3U;M4A;MID;MIDI;MKA;MOD;MP2;MP3;MPA;OGG;OPUS;RA;RMI;SPC;RMI;SND;UMX;VOC;WAV;WMA;XM
filter_6_match_case=true
filter_6_search_in_path=false
filter_6_enable_regex=false
filter_7_name=Documents
filter_7_macro=doc
filter_7_query=ext:c;chm;cpp;csv;cxx;doc;docm;docx;dot;dotm;dotx;h;hpp;htm;html;hxx;ini;java;lua;mht;mhtml;ods;odt;odp;pdf;potx;potm;ppam;ppsm;ppsx;pps;ppt;pptm;pptx;rtf;sldm;sldx;thmx;txt;vsd;wpd;wps;wri;xlam;xls;xlsb;xlsm;xlsx;xltm;xltx;xml;C;CHM;CPP;CSV;CXX;DOC;DOCM;DOCX;DOT;DOTM;DOTX;H;HPP;HTM;HTML;HXX;INI;JAVA;LUA;MHT;MHTML;ODS;ODT;ODP;PDF;POTX;POTM;PPAM;PPSM;PPSX;PPS;PPT;PPTM;PPTX;RTF;SLDM;SLDX;THMX;TXT;VSD;WPD;WPS;WRI;XLAM;XLS;XLSB;XLSM;XLSX;XLTM;XLTX;XML
filter_7_match_case=true
filter_7_search_in_path=false
filter_7_enable_regex=false
filter_8_name=Pictures
filter_8_macro=pic
filter_8_query=ext:ani;bmp;gif;ico;jpe;jpeg;jpg;pcx;png;psd;tga;tif;tiff;webp;wmf;ANI;BMP;GIF;ICO;JPE;JPEG;JPG;PCX;PNG;PSD;TGA;TIF;TIFF;WEBP;WMF
filter_8_match_case=true
filter_8_search_in_path=false
filter_8_enable_regex=false
filter_9_name=Videos
filter_9_macro=video
filter_9_query=ext:3g2;3gp;3gp2;3gpp;amr;amv;asf;avi;bdmv;bik;d2v;divx;drc;dsa;dsm;dss;dsv;evo;f4v;flc;fli;flic;flv;hdmov;ifo;ivf;m1v;m2p;m2t;m2ts;m2v;m4b;m4p;m4v;mkv;mp2v;mp4;mp4v;mpe;mpeg;mpg;mpls;mpv2;mpv4;mov;mts;ogm;ogv;pss;pva;qt;ram;ratdvd;rm;rmm;rmvb;roq;rpm;smil;smk;swf;tp;tpr;ts;vob;vp6;webm;wm;wmp;wmv;3G2;3GP;3GP2;3GPP;AMR;AMV;ASF;AVI;BDMV;BIK;D2V;DIVX;DRC;DSA;DSM;DSS;DSV;EVO;F4V;FLC;FLI;FLIC;FLV;HDMOV;IFO;IVF;M1V;M2P;M2T;M2TS;M2V;M4B;M4P;M4V;MKV;MP2V;MP4;MP4V;MPE;MPEG;MPG;MPLS;MPV2;MPV4;MOV;MTS;OGM;OGV;PSS;PVA;QT;RAM;RATDVD;RM;RMM;RMVB;ROQ;RPM;SMIL;SMK;SWF;TP;TPR;TS;VOB;VP6;WEBM;WM;WMP;WMV
filter_9_match_case=true
filter_9_search_in_path=false
filter_9_enable_regex=false
This worked. Thank you very much!
Nice, no problem