protected Query eq(String field, String[] terms, boolean ignoreCase) {
        if (terms.length > 1) {
            PhraseQuery pq = new PhraseQuery();
            for (String s : terms) {
                pq.add(new Term(field, s));
            }
            return pq;
        }
        return new TermQuery(new Term(field, terms[0]));
    }
If the query is a BooleanQuery and it contains a single Occur.MUST_NOT
clause it will be returned as is. Otherwise it will be wrapped in a
BooleanClause with the given Occur.
querydsl-lucene5/src/main/java/com/querydsl/lucene5/LuceneSerializer.java