Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#87 closed defect (released)

query.cc:set_probabilistic returns NEW_QUERY when the query hasn't changed

Reported by: Mike Trinkala Owned by: Olly Betts
Priority: normal Milestone:
Component: Omega Version: 0.9.6
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

query.cc:set_probabilistic returns NEW_QUERY when the query hasn't changed. This occurs when a prefix term contains a period such as mime:application/vnd.ms-excel

Using $setmap{boolprefix,mime,T} the previous query value becomes: xP=Tapplication/vnd.ms-excel.

The previous query string is parsed on '.' producing two terms. The short-cut code returns NEW_QUERY preventing the user from being able to browse more then the first page of results

short-cut: if the new query has fewer terms, it must be a new one

Attachments (1)

omega-terms-with-dots-fix.patch (2.1 KB ) - added by Olly Betts 18 years ago.
Patch

Download all attachments as: .zip

Change History (7)

comment:1 by Olly Betts, 18 years ago

Status: newassigned

Even without the short-cut, the term will get split at the dot and not match. We need to use a different separator I guess. I've produced a patch which compiles but I've not tested otherwise as I have a large backlog from being away. If you could try it out, that'd be great.

by Olly Betts, 18 years ago

Patch

comment:2 by Mike Trinkala, 18 years ago

The xP query string is still constructed with periods, the behavior is unchanged.

comment:3 by Olly Betts, 18 years ago

Oh sorry - you also need to change the query template where xP is produced to:

$if{$queryterms,<INPUT TYPE=hidden NAME=xP VALUE="$html{$queryterms}">}

comment:4 by Mike Trinkala, 18 years ago

Resolution: fixed
Status: assignedclosed

That works much better :) New and old save queries appear to be working fine.

comment:5 by Olly Betts, 18 years ago

Resolution: fixedverified

Thanks for testing - fix committed.

comment:6 by Olly Betts, 18 years ago

Operating System: All
Resolution: verifiedreleased
Note: See TracTickets for help on using tickets.