excluded categories & missing search results
We are having a problem with an entry not showing up in the low_search:results when excluding categories.
When using only collection and query parameters, we get this result:
https://www.gillettechildrens.org/aja...
However, as soon as we add one the following parameters to exp:low_search:results, we get no results returned:
category="not 376"
category="not 376|377"
category="not 376&377"
None of the entries have a category assigned. All collections had lexicon and index rebuilt from the control panel after upgrading low_search
ee 5.1.3
low_search 6.2.0
Any ideas of where to look to correct this?
Replies
Low 20 Mar 2019 07:30
What does your opening Results tag look like? Also, can you enable template debugging and share all the items that mention Low Search here?
Paul Larson 20 Mar 2019 16:24
The opening result tag is as follows:
{exp:low_search:results
query='{segment_3}'
collection='static_page'
category="not 376|377|378"
}
With debugging on, I get the following references to low_search in the queries tab:
0.0001s
40KB
SELECT 'settings'
FROM ('exp_extensions')
WHERE 'class' = 'Low_search_ext'
LIMIT 1
#system/user/addons/low_search/libraries/Low_search_params.php L:148 Low_search_settings::get()
0.0003s
125KB
SELECT DISTINCT 'entry_id'
FROM ('exp_category_posts')
WHERE 'cat_id' NOT IN ('376', '377', '378')
#system/user/addons/low_search/libraries/Low_search_filters.php L:153 Low_search_filter_categories::filter()
0.0001s
49KB
SELECT *
FROM ('exp_low_search_collections')
ORDER BY 'collection_label' asc
#system/user/addons/low_search/models/low_search_collection_model.php L:87 Low_search_model::get_all()
0.0028s
57KB
SELECT exp_low_search_indexes.entry_id, exp_low_search_indexes.collection_id, MATCH(exp_low_search_indexes.index_text) AGAINST('safety quality') AS 'score'
FROM ('exp_low_search_indexes')
WHERE 'collection_id' IN (7)
AND 'exp_low_search_indexes'.'site_id' IN (1, 0)
AND 'exp_low_search_indexes'.'entry_id' IN (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 73, 74, 76, 77, 78, 79, 81, 82, 83, 84, 86, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 109, 110, 112, 114, 115, 117, 118, 119, 120, 121, 122, 123, 126, 129, 130, 133, 134, 135, 136, 138, 146, 149, 150, 153, 156, 157, 158, 160, 162, 163, 164, 165, 166, 174, 175, 178, 180, 181, 182, 183, 184, 187, 188, 189, 191, 192, 194, 195, 196, 198, 199, 200, 201, 202, 203, 205, 206, 207, 208, 209, 210, 212, 213, 215, 216, 217, 221, 222, 223, 225, 228, 229, 231, 233, 236, 237, 238, 239, 240, 241, 242, 245, 247, 248, 249, 250, 252, 253, 254, 255, 257, 258, 261, 263, 264, 265, 266, 267, 269, 270, 271, 273, 274, 275, 276, 278, 279, 282, 284, 287, 288, 289, 291, 293, 294, 296, 297, 298, 299, 300, 301, 302, 303, 305, 306, 307, 308, 310, 311, 313, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 617, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 633, 634, 635, 636, 637, 638, 640, 641, 642, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 657, 658, 660, 662, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 683, 684, 685, 686, 688, 690, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 708, 709, 710, 711, 712, 713, 714, 715, 716, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 744, 745, 746, 747, 751, 755, 756, 757, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 887, 888, 889, 890, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1044, 1114, 1115, 1116, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1206, 1210, 1248, 1250, 1251, 1252, 1257, 1258, 1259, 1260, 1269, 1270, 1271, 1272, 1273, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1395, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1482, 1484, 1485, 1486, 1487, 1523, 1534, 1535, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1721, 1722, 1724, 1725, 1726, 1728, 1732, 1739, 1742, 1746, 1748, 1750, 1752, 1753, 1754, 1755, 1757, 1759, 1765, 1769, 1770, 1773, 1778, 1782, 1798, 1802, 1803, 1806, 1814, 1815, 1823, 1827, 1828, 1834, 1835, 1836, 1841, 1842, 1843, 1853, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1874, 1881, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1924, 1925, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2030, 2031, 2033, 2035, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2074, 2075, 2076, 2077, 2079, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2149, 2152, 2153, 2156, 2157, 2159, 2160, 2162, 2164, 2165, 2166, 2168, 2169, 2171, 2172, 2173, 2175, 2178, 2179, 2181, 2182, 2185, 2187, 2188, 2189, 2191, 2193, 2194, 2197, 2200, 2201, 2202, 2204, 2205, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2216, 2217, 2220, 2225, 2226, 2227, 2228, 2230, 2231, 2234, 2235, 2236, 2238, 2239, 2241, 2243, 2244, 2246, 2248, 2249, 2252, 2253, 2255, 2256, 2259, 2260, 2263, 2265, 2266, 2267, 2271, 2272, 2275, 2279, 2280, 2282, 2284, 2285, 2286, 2288, 2290, 2293, 2294, 2296, 2297, 2299, 2303, 2304, 2308, 2309, 2310, 2312, 2313, 2314, 2316, 2318, 2319, 2329, 2336, 2341, 2342, 2344, 2345, 2347, 2348, 2351, 2352, 2355, 2362, 2366, 2367, 2368, 2369, 2370, 2372, 2373, 2374, 2375, 2377, 2378, 2392, 2393, 2394, 2395, 2396, 2403, 2404, 2405, 2406, 2424, 2426, 2428, 2429, 2432, 2433, 2461, 2463, 2464, 2465, 2466, 2470, 2476, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486)
AND MATCH(index_text) AGAINST('+safety +quality' IN BOOLEAN MODE)
#system/user/addons/low_search/libraries/Low_search_filters.php L:153 Low_search_filter_keywords::filter()
In the template tab of the debugging output, here is the tag processing section:
0.009537 / 3.5MB - Beginning Tag Processing -
0.009548 / 3.5MB Detecting Tags in Template
0.009591 / 3.5MB No Closing Tag
0.009644 / 3.5MB Running Tags
0.011532 / 3.8MB Calling Tag: {exp:low_search:keywords query='eyJyZXN1bHRfcGFnZSI6Ilwvc2VhcmNoIiwia2V5d29yZHMiOiJTYWZldHkgQW5kIFF1YWxpdHkifQ'}
0.015188 / 4.3MB -> Data Returned
0.015366 / 4.3MB Calling Tag: {exp:low_search:results query='eyJyZXN1bHRfcGFnZSI6Ilwvc2VhcmNoIiwia2V5d29yZHMiOiJTYWZldHkgQW5kIFF1YWxpdHkifQ' collection='static_page' ZZkeywords:loose='right' ZZkeywords:inflect='yes' ZZkeywords:stem='yes' ZZkeywords:lang='en' ZZkeywords:mode='all' category="not 376|377|378" ZZshow_future_entries='yes' }
0.019080 / 4.7MB Low Search: Applying Low_search_filter_categories
0.020170 / 4.9MB Low Search: Applying Low_search_filter_keywords
0.021142 / 4.8MB Low Search: Keywords: safety quality
0.021310 / 4.8MB Low Search: Starting search (fulltext)
0.024231 / 4.9MB Low Search: Searched but found nothing
0.024248 / 4.8MB Low Search: Filters found no matches, returning no results
0.024262 / 4.8MB Returning No Results Content
0.024281 / 4.8MB -> Data Returned
0.024321 / 4.7MB - End Tag Processing -
Low 21 Mar 2019 07:15
Okay, couple of things to try here.
First of all, if you're not using dynamic or "advanced" category filtering (like using Low Search's catgory grouping option), disable the Categories filter in the Low Search settings. This will make the Results tag fall back to native category filtering, after all LS filters have fired. This might help this in this use case.
Otherwise, if you're on the latest version of LS (v6.2.0 atm), try adding the disable parameter to the Results tag:
This will have the same effect as above, but just for that instance of the Results tag.
Does either of that help?
Paul Larson 21 Mar 2019 17:06
Yes! That absolutely did help. Thank you.