lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Humberto Rocha <humro...@gmail.com>
Subject Migrate BooleanQuery Lucene 4.9.0 to Lucene 6.0.3
Date Thu, 10 Nov 2016 01:31:34 GMT
Hi,

In Lucene 4.9.0 i have:


                QueryParser parser = new QueryParser("contents",analisador);
                Query query = parser.parse(parametro);

BooleanQuery constrainedQuery = new BooleanQuery();
BooleanQuery inner = new BooleanQuery();
inner.add(ownerQueryX, Occur.SHOULD);
inner.add(groupQueryY, Occur.SHOULD);
constrainedQuery.add(inner, Occur.MUST);
constrainedQuery.add(query, Occur.MUST);


How migrate this to Lucene 6.0.3?

I saw BooleanQuery.Builder
<https://lucene.apache.org/core/6_3_0/core/org/apache/lucene/search/BooleanQuery.Builder.html>
but
i have problems to use.

Could someone help me please?

-- 
Humberto Rocha

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