Discussion:
Webboard: Cached results when using UserOrder and QCache=yes?
g***@mnogosearch.org
2012-01-18 13:35:22 UTC
Permalink
Author: Alexander Barkov
Email: ***@mnogosearch.org
Message:
Hi Amar,
Hi everyone,
I have configured multiple "UserOrder" commands (with different names of course) in the index configuration. I have implemented a combobox in my search results page to select a different order of the search results by the "UserOrder" commands. When I set "QCache=yes" in my DBAddr string, the result for the next UserOrder is a cached one. When I disable caching, the "UserOrder" commands work perfectly.
Do I have to clear the search result cache (as described here: http://www.mnogosearch.org/doc33/msearch-srcache.html) everytime I change the order of the results?
best wishes, Amar
Looks like a bug.



The "su" value is not taken into account when constructing

a cached query ID.



There are two options to fix this quickly:



1. Add this command into your search template:



ReplaceVar QueryCacheID "${q}.${pqid}.${SearchMode}.${orig_m}.${fl}.${wm}.${o}.${t}.${cat}.${ul}.${wf}.${g}.${tmplt}.${GroupBySite}.${site}.${type}.${sp}.${sy}.${dt}.${dp}.${dx}.${dm}.${dy}.${db}.${de}.${s}.${ss}.${us}.${sl.*}.${su}"







2. Or fix the sources:

Find these lines in qcache.c :



const char QCACHEID[]=

"${q}.${pqid}.${SearchMode}.${orig_m}.${fl}.${wm}.${o}.${t}."

"${cat}.${ul}.${wf}.${g}.${tmplt}.${GroupBySite}.${site}."

"${type}.${sp}.${sy}.${dt}.${dp}.${dx}.${dm}.${dy}.${db}.${de}.${s}"

"${ss}.${us}.${sl.*}";





And add ${su} in the end, like this:



const char QCACHEID[]=

"${q}.${pqid}.${SearchMode}.${orig_m}.${fl}.${wm}.${o}.${t}."

"${cat}.${ul}.${wf}.${g}.${tmplt}.${GroupBySite}.${site}."

"${type}.${sp}.${sy}.${dt}.${dp}.${dx}.${dm}.${dy}.${db}.${de}.${s}"

"${ss}.${us}.${sl.*}.${su}";



then rebuild and reinstall mnoGoSearch.





This bug will be fixed in 3.3.13.

Thanks for reporting.



Reply: <http://www.mnogosearch.org/board/message.php?id=21385>

Loading...