Member
Member
frankm   2010-06-16, 07:29
#1

hi,

i have found that the pagination functions printPrevPageLink and printNextPageLink don't return the correct link when used in the search environment.

when i do a search between quotes for an exact match i get a certain number of matching results. however the link i get from printNextPageLink doesn't take the exact match into account, instead it takes everything inside the quotes and makes an OR of that. so from, let say, 20 results for the exact match, when i click on the "Next" link i end up with much more.

for instance with search like 'new york' the next page link is page/search/new+york/2 which basically gives the results of the new OR york search.

i don't know if my problem makes sense or not. i tried to look where the problem is but i haven't it yet. if you have any idea... thanks for your help.

Member
Member
frankm   2010-06-16, 08:44
#2

additional information

if we perform the search like ('new york') then everything is ok. the searchpagepath is %28+NEW+YORK+%29
but if we omit the parens then the quotes are dropped and we end up with a searchpagepath like NEW+YORK which translates as a simple OR

Member
Member
frankm   2010-06-16, 09:22
#3

a temp solution that i have found to work is to add the space character in the $opChars array in the codifySearchString function in the class-search.php file. this way if there is a space in a $singlesearchstring it will be put between quotes. this way it preserves intact any search string that is put between quotes.

yet this solution might not be the best one and you might have a better idea of what to do.

by the way i am still using the 1.2.9 version of zenphoto. maybe this issue is irrelevant for the latest 1.3.0 version.

Administrator
Administrator
acrylian   2010-06-16, 09:30
#4

Well, then please try 1.3 first.

Member
Member
sbillard   2010-06-16, 17:27
#5

Indeed at least with the 1.3 nightly the space will be an opchar if one of the space handling options is set.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.