[Xapian-tickets] [Xapian] #720: range vs filter prefixes

Xapian nobody at xapian.org
Fri Aug 9 05:39:05 BST 2019


#720: range vs filter prefixes
-------------------------+--------------------------
 Reporter:  olly         |             Owner:  olly
     Type:  defect       |            Status:  new
 Priority:  normal       |         Milestone:  1.4.x
Component:  QueryParser  |           Version:  1.3.5
 Severity:  normal       |        Resolution:
 Keywords:               |        Blocked By:
 Blocking:               |  Operating System:  All
-------------------------+--------------------------

Comment (by olly):

 To allow a smooth transition, I suggest we change the code to add `:` for
 a filter but only if the prefix ends in an alphanumeric (or maybe a word
 character, or some rule along these lines).  That way `date` -> `date:`,
 `date:` continues to work, and cases such as `@`, `#`, etc can be
 supported.  It doesn't seem useful to try to support parsing something
 such as: `date2019-08-09`

 This isn't the incompatible change it seems since the way the
 `QueryParser` currently parses filter prefixes means that specifying a
 mapping from `date:`, `@` or `#` is currently effectively ignored (because
 the prefix is parsed as a series of word characters followed by a `:`).
 So that would be suitable for 1.4.x too, provided the code changes for
 handling prefixes such as `@` and `#` aren't too invasive.  If they are,
 we could easily just allow `date:` to mean the same as `date` at least,
 and leave cases such as `@` and `#` for git master, or even for the
 future.

--
Ticket URL: <https://trac.xapian.org/ticket/720#comment:1>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list