I have a project in which I'm planning to use querydsl with hibernate search.
However I have a constraint which blocks and I'm not sure how to implement.
I have a `oneToMany` relationship between 2 classes shown here below (I'm omitting all the non pertienent fields) :

Contact class

```
public class Contact{

    @OneToMany(mappedBy = "contact")
    @OrderBy("startDate DESC")
    @IndexedEmbedded
    private List<AddressTemporal> addressHistory;
}

```

AddressTemporal class

```
public class AddressTemporal{

    @NotNull
    @ManyToOne
    @ContainedIn
    private Contact contact;

    @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, indexNullAs = Constants.LUCENE_NULL)
    @DateBridge(resolution = Resolution.DAY)
    private Date endDate;

}

```

I've configured lucene to index null fields using a String constant ("**NULL**") so that I can query on empty fields using that value.

My problem is that I need to do a query that will search in the `addressHistory` collection but filtering only those whose where `endDate` field is null.
Now

```
 FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(entityManager);
 fullTextEntityManager.createIndexer().startAndWait();
 QContact c = new QContact("contact");

 SearchQuery<Contact> query = new SearchQuery<> fullTextEntityManager.unwrap(FullTextSession.class), c)
 query.where(c.addressHistory.any().endDate.isNotNull());

```

But this doesn't work since the isNotNull() and isNull() operators are not supported for search queries in QueryDSL.

and I cannot do something like :

```
query.where(c.addressHistory.any().endDate.eq(Constants.LUCENE_NULL));

```

because of type safety constraints.

Finally my question is : Is there a way to perform "isNotNull" queries using QueryDSL and hibernate search on non `String` fields? or do I have to resort to Lucene query syntax?

Thanks 

Ulises