search - How do I query for empty MultiValueField results in Django Haystack -


using Django 1.4.2, Haystack 2.0beta, and ElasticSearch 0.19, how do I query for the results that are empty set Do [] for a MultiValueField?

I num_ & lt; Field & gt; and the query against it.

In this example, the 'Email' is multilife, so we will create 'num_emails':

  Class Person Index (indexed search index, index.index and cable): text = index . CRField (Document = True, Use UN_Template = True) Name = Index. CHRfield (Model_AtTro = 'name') Email = IndexMultiWillfield (empty = TrueNew)   

Now, in your searches you can use

  Can  
  findcase () Filters (num_emails = 0)    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -