Stuck with version 4.10.1
-
I can’t upgrade to any higher (free) version than 4.10.1. Whenever I upgrade (v4.11, 4.12 or 4.13), search just fails. It returns unfiltered results as if the search string was a wild card ( * ) for non-admin users, but results are correct for Admin users.
I upgrade my plug-ins and upgrade of WP version once every quarter but since search won’t work, I end up reverting Relevanssi to v4.10.1.I have tried some basic troubleshooting like deactivating/reactivating, removing/re-installing, building index, but no luck.
What I noticed when I compared the query being generated in v4.10.1 and v4.13.3.1 is the following:
***In v4.13.3.1 —
[date_query] => [request] => SELECT sc_posts.ID FROM sc_posts WHERE 1=1 AND (( (sc_posts.post_title LIKE \'{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}keurig{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}\' ) OR ( sc_posts.post_excerpt LIKE \'{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}keurig{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}\' ) OR ( sc_posts.post_content LIKE \'{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}keurig{f13bc637abc8a3cbb0b3619e42b5ca7d6119aade852e376be488898992f0e587}\' )———————————————
***In v4.10.1 —[date_query] => [request] => SELECT sc_posts.ID FROM sc_posts WHERE 1=1 AND (( sc_posts.post_type = \'post\' AND ( 1=1 AND ( (sc_posts.post_status IN ( \'publish\',\'acf-disabled\')) OR (( sc_posts.post_author = 285) AND sc_posts.post_status IN (\'private\'))Thanks in advance for your time
Lynell
-
That
requestquery has nothing to do with Relevanssi; it’s the default WordPress query Relevanssi disables.Could you please compare the Relevanssi MySQL query between the versions? That’s more helpful. It’s easiest to check with Query Monitor (see instructions here).
Are you using any custom code that could affect the search somehow?
No, I don’t have any custom code but I have custom search using Search & Filter plug-in… (if that even matters??)
I tried to UNcheck the “Enable” checkbox for Relevanssi in the Miscellaneous Settings of Search & Filter and the Relevanssi v4.13.3.1 search works well. However, this option is checked (Enabled) when I’m in Relevanssi v4.10.1 and it works just fine.
For v4.13.3.1–
SELECT COUNT(DISTINCT(relevanssi.doc)) FROM sc_relevanssi AS relevanssi WHERE relevanssi.term = relevanssi.term AND relevanssi.doc IN (8092,14046,2710,5631,14690,6284,16043,11726,4561,3287,3253,8401,3283,3316,3291,3301,5357,3244,3322,3249,3999,3242,4262,2726,3235,7541,3188,4957,1619,581,8476,3340,3326) AND ( relevanssi.doc IN ( SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_type IN ('post') ) ) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_status IN ('publish'))) OR (doc = -1))——————————————
For v4.10.1 —SELECT COUNT(DISTINCT(relevanssi.doc)) FROM sc_relevanssi AS relevanssi WHERE relevanssi.term = 'sharpie' AND ( relevanssi.doc IN ( SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_type IN ('post') ) ) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_status IN ('publish'))) OR (doc = -1))Sorry, here are the queries generated using the same user login (which has admin rights).
From v4.10.1:
SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 0.75 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM sc_relevanssi AS relevanssi WHERE relevanssi.term = 'keurig' AND ( relevanssi.doc IN ( SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_type IN ('post') ) ) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_status IN ('publish'))) OR (doc = -1)) ORDER BY tf DESC LIMIT 500————————————
From v4.13.3.1 :SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 0.75 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM sc_relevanssi AS relevanssi WHERE relevanssi.term = 'keurig' AND relevanssi.doc IN (1,104,108,125,359,553,558,1022,1024,1126,1145,1166,1198,1201,1422,1477,1480,1594,1596,1598,1600,1674,1710,1826,1892,1910,1997,2516,2758,2813,2946,3186,3338,3507,3520,3655,3994,4167,4170,4278,4296,4525,4532,4181,4578,4630,4631,1623,4693,4700,4719,4721,4728,4737,4738,4756,4776,4883,4884,4885,4886,4890,4910,4912,4913,4914,4915,4917,2368,4956,5005,3659,5077,545,5097,5165,1420,5214,5280,5282,5283,4708,5331,5332,5333,5334,5335,5336,5337,5338,5339,5340,5343,5344,5348,5349,5350,5351,5352,5353,5354,5355,5386,5425,5431,5447,5481,5521,5535,5536,5537,5538,5539,5604,5606,5608,5615,5616,5617,5620,5621,5622,5624,5626,5628,5629,5671,5672,5675,1569,1565,5783,5790,5799,5800,5836,5837,5791,5891,5931,5947,5955,5963,5973,5974,5994,5997,6007,6010,6011,6020,6022,6024,6029,6034,6035,6043,6044,6052,6055,6056,6059,6062,6063,475,6077,6079,6081,6082,6085,6095,908,6205,6206,6207,6208,6209,6210,5890,5940,6025,127,129,5377,1815,1811,4880,4887,6231,6233,6282,6283,6288,6327,6358,1494,904,901,6743,6800,6820,6821,6822,6828,6829,6835,6844,6845,6846,6864,2186,7176,7194,7222,7240,7245,1574,7315,7316,7384,7389,7391,7399,7441,7456,1548,1554,1556,1550,1552,7541,7435,7563,7570,2616,6084,5656,3322,7614,7615,7627,7628,7629,7630,5393,3253,3287,3291,7701,7703,7705,7707,7708,7710,7711,7713,7715,3316,3312,3326,7618,7933,7944,7947,7949,7951,7953,7954,7956,3346,882,3330,7957,5184,5078,1428,8019,8057,8060,8093,550,609,8217,8218,8222,8232,8233,8234,8238,8239,8243,4073,938,1720,1704,1676,8367,8401,8472,8473,8474,8475,459,6064,6050,8597,7493,755,8651,8654,8658,8660,8674,8681,8682,8699,8709,8710,1189,8717,8729,8745,1991,8802,2210,8829,8893,8928,8954,8971,8973,2322,1559,1132,9010,1580,9020,9021,9022,9032,9034,9039,2256,1592,9071,9072,1542,9137,9190,9220,9301,9302,9319,9326,9334,9345,9352,9313,884,924,6027,542,623,7934,568,5448,3537,6677,922,4597,5006,1726,634,615,587,5441,8152,9571,9604,9645,1696,1706,1713,1724,3852,1701,1680,4043,1496,1498,1500,1504,1506,1522,1526,1528,1484,1514,1508,1524,1486,1510,1502,1490,644,5032,8073,5128,8180,7371,606,604,598,592,5988,6060,6032,5969,655,6057,942,1715,6053,6076,8537,6008,6018,619,5956,4517,4533,4538,4551,6030,8082,7400,617,566,636,646,660,4549,638,5975,5995,649,8491,8476,632,600,552,540,570,577,572,7383,562,556,6045,6091,6089,612,1455,3759,5098,1460,1463,1465,1469,6093,6036,579,627,1482,5110,6115,1475,1442,1430,5069,1619,1451,6607,910,912,918,920,9668,3383,3366,934,946,3755,878,880,6683,899,874,949,906,914,3440,876,893,3361,3432,3447,886,897,4544,4581,7412,7870,585,4558,1381,3182,5387,5408,1385,3969,3340,1378,5618,5368,5651,1678,1711,1672,4077,3249,9694,9744,9745,944,9763,9765,9766,9777,9782,9795,9802,9807,4643,9827,9828,9849,9851,9910,9911,4877,9926,9933,9949,9950,9952,9953,9954,9955,9960,9963,9966,3574,9970,9973,9981,9982,9985,9987,9991,9702,10004,10013,10014,10028,10034,1117,10102,3354,10117,10116,10121,10129,10149,10151,10190,10191,10192,10193,10195,10198,10202,10213,5673,5661,5703,4087,10251,10305,9632,9572,4450,10325,10338,10353,10364,10377,10384,10390,10450,10130,10125,3042,10467,10482,10486,10488,5998,731,9243,10613,6806,4262,10692,2574,452,842,461,2369,2463,2941,2749,2929,3047,2413,2396,3493,2436,2458,457,450,1140,10715,663,10747,10759,10761,10762,10795,10854,10856,10860,10894,10933,4957,10983,10984,10989,10993,837,11004,11005,3009,2787,2790,11007,11016,11023,7952,11104,11105,11107,9673,872,7939,11160,11163,11164,1813,11170,10226,11179,11184,11199,11251,11253,10231,11301,11278,11309,11365,11377,11388,10474,10763,11216,11189,1518,1520,10286,1004,834,11436,11437,11440,11441,11442,1014,11097,11093,8092,11370,11481,2802,11487,1572,11544,11545,11546,11549,11551,7201,11576,7916,11598,11599,11606,11623,10214,11646,10905,11656,11657,9767,11567,11700,11703,11717,11737,11749,11756,11757,11766,11785,11812,11818,11832,11843,11845,11846,11852,11853,11854,11868,11869,11870,11899,3306,11947,11962,11964,11967,11988,12011,12015,12017,12021,12022,12025,12027,12034,12035,12070,12077,12082,12087,1625,12140,12145,12141,12146,12163,12159,12136,5118,3526,12191,12170,3567,12192,2581,12222,12223,3022,12235,2120,12239,12251,1375,8661,12262,12263,12267,12268,12281,1578,589,12327,12335,12315,12328,12355,12434,12435,12337,12469,12537,12557,3931,12629,12632,2171,2426,762,6284,6280,2306,2182,2755,2973,2994,2745,2765,2762,2317,3014,757,12634,12635,6328,5240,12643,12654,3235,3983,7852,3242,12674,12690,12711,3184,12738,12763,12744,12770,12782,6823,2806,625,12817,12843,12065,12873,12891,1473,3188,12923,12749,12793,12599,11200,11254,11218,11625,12623,9839,9844,11180,12708,13016,3301,7440,13071,13072,13085,4727,1567,13004,13107,13134,12909,13125,13153,13154,13155,13156,12028,13171,847,13139,13187,13193,13213,13214,13223,13234,13305,13324,13351,1563,13364,13371,13375,13381,13396,13408,13410,13397,13428,1436,11871,1434,13445,13449,13424,13455,13470,3283,13473,13474,13486,13495,13496,12147,4070,7392,7356,1467,13587,13593,13594,13595,13598,13609,13618,13663,13685,4925,13701,13712,13713,8659,13734,13736,13738,13739,10103,12204,13776,13777,13790,13791,13793,1586,2983,13841,13844,13845,13846,13619,1546,13897,2583,2597,2535,2601,2621,13898,12441,10748,1590,13864,13961,2579,1147,13962,14013,13995,926,14052,14082,3403,10053,14102,2519,14103,1576,895,14129,14145,14149,14150,14151,14152,14165,8846,14170,3999,14211,14212,940,14208,698,1994,861,13022,1149,1134,12919,1038,705,724,14283,2628,1836,1817,1728,1182,10362,2629,1965,1747,734,2795,787,681,1180,2643,355,2199,2724,1686,14322,14323,2606,14392,2768,14410,6801,1908,1912,14426,14124,14427,14428,14437,14438,14456,14500,14440,13342,2247,14510,14517,14518,14520,5964,14525,3244,14531,13189,14534,14535,14536,581,14324,14567,14579,14587,14602,14620,14621,1516,14647,1471,12370,14688,14687,14689,11902,12092,14550,12892,14608,12193,12616,12897,12924,13300,13355,13188,13429,13535,11185,14429,1194,1833,13767,12875,14729,14755,14785,14786,14794,14629,1400,13095,9228,482,14829,1862,14843,14845,12350,595,14867,5631,14832,14882,14875,1584,14901,10333,2529,14871,12412,14925,14926,14937,14938,14927,547,12644,14966,10153,11663,14909,15030,15031,15035,5357,15093,15051,15097,15041,15045,15123,15036,13671,13221,12436,11725,11726,11910,15166,15167,15168,15169,15170,15171,15172,15173,15175,15174,14326,15184,15185,15186,9400,13281,15188,15189,10351,1896,15207,15208,14761,15209,14046,1588,15215,2506,15219,15224,1154,1151,15229,4561,14690,15113,15260,1383,15272,15277,10134,15284,15236,9971,15289,15294,15306,15325,15326,15328,15307,15339,15138,785,15343,15352,15261,15421,15428,15429,15358,15047,15474,928,564,15360,15472,14731,15301,15344,936,6815,13722,2371,2003,448,473,446,440,442,518,444,15533,2049,2456,2468,2710,2722,2726,4572,14261,15535,15384,15592,15593,15594,15595,15596,15597,15598,15599,15601,15605,15606,15660,15663,15666,15667,15691,15698,15708,15714,15715,15716,15717,15719,15723,15734,15735,15740,15748,15749,15750,15753,15764,15768,15769,15770,15772,15773,15776,15779,15783,15781,15788,15793,15805,15807,15808,15809,15810,15815,15785,15824,15825,15826,15827,15828,15829,15834,15835,15836,15837,15838,15842,15850,15851,15852,15853,15856,15857,15858,15859,15860,15861,15864,15865,15866,15868,15883,15907,15962,15963,15884,15969,15982,15983,15985,15986,15997,15998,15999,16002,16004,16007,16010,16014,3462,16018,16021,16022,16028,16035,16042,16043,16050,16080,16090,16097,16118,16129,16137,16139,16144,16145,16190,16234,16235,16231,16237,16265,16268,16269,16270,16274,16275,16191,16293,16294,16295,16297,16298,16299,16300,16301,16315,16316,15789,16318,16319,16320,16334,16335,16348,16349,16350,16351,16352,16353,16354,16355,16360,16362,16363,16364,16307,16368,16369,16370,16379,16380,16399,16400,16409,16410) AND ( relevanssi.doc IN ( SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_type IN ('post') ) ) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM sc_posts AS posts WHERE posts.post_status IN ('publish'))) OR (doc = -1)) ORDER BY tf DESC LIMIT 500In the 4.13.3 query, there’s no search term involved, but there’s a big list of posts that restrict the search – the results will be returned from that group of posts. With the admin login, there’s a search term, but also a long list of posts not present in the 4.10.1 query.
I’m actually pretty sure Search & Filter is a key part of this. Since 4.10.1 is the last working version, there was a change in how Relevanssi was invoked in 4.10.2 and if Search & Filter is now relying on that, that might explain some of this… But on the other hand, if it were that, it’d probably be 4.10.1 that doesn’t work. So who knows, not me because I don’t have access to Search & Filter Pro, so I’m not sure what it does actually.
Does 4.13.3.1 work correctly if you use the Relevanssi admin search (Dashboard > Admin search) or if you deactivate Search & Filter? That would help rule out whether the problem is caused by Search & Filter or not.
Relevanssi Admin Search does work, with or without the ‘Relevanssi Enabled’ setting in Search&Filter.
And again, Admin users can search the site just fine. The non-Admin users search is my only issue. If I disable the Relevanssi setting in Search&Filter, then non-Admin users search works.Thank you
Well, if everything works when you disable the Relevanssi setting in Search & Filter, isn’t that the solution, then?
I need Relevanssi enabled in Search&Filter too.. Disabling it only partially solves my issue.
What problems remain if you disable Relevanssi in Search & Filter settings?
Have you asked about this from Search & Filter support? They might be able to help you. My support here is limited, because this problem is tied to Search & Filter Pro, and I don’t currently have any access to that plugin, so I can’t really tell what it is doing.
The topic ‘Stuck with version 4.10.1’ is closed to new replies.