incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason McIntosh <j...@jmac.org>
Subject Re: [lucy-user] Searching for blank fields
Date Tue, 10 Jan 2012 19:00:39 GMT
On Jan 9, 2012, at 3:37 PM, Marvin Humphrey wrote:

> Lucy doesn't support empty term queries.  You will have to achieve this using
> an actual string, either by storing a sentinel value like "EMPTY" in the
> 'title' field itself, or by e.g. storing a "1" or "0" value in an auxilliary
> field such as 'has_title'.


For the sake of simplicity, I ultimately adopted the sentinel-value solution, storing a project-namespacey
value that's unlikely to ever appear within real data. I adapted Peter's suggested regex to
detect and respond to requests for "NULL" appropriately. Works just fine, and generates no
false positives.

-- 
Jason McIntosh

http://jmac.org • jmac@jmac.org • @JmacDotOrg


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message