Ticket #87 (closed defect: released)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: mdt Owned by: olly
Priority: normal Milestone:
Component: Omega Version: 0.9.6
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking:

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

omega-terms-with-dots-fix.patch (2.1 kB) - added by olly 2 years ago.
Patch

Change History

Changed 2 years ago by olly

  • status changed from new to assigned

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.

Changed 2 years ago by olly

Patch

Changed 2 years ago by mdt

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

Changed 2 years ago by olly

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}">}

Changed 2 years ago by mdt

  • status changed from assigned to closed
  • resolution set to fixed

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

Changed 2 years ago by olly

  • resolution changed from fixed to verified

Thanks for testing - fix committed.

Changed 2 years ago by olly

  • resolution changed from verified to released

Changed 2 years ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.