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[email protected] • @JmacDotOrg

Reply via email to