Glide
Glide

Reputation: 21255

Using Luke to analyze my Hibernate Search query DSL

How do I use Luke to analyze my Hibernate Search query DSL?

I have the following Hibernate Search query DSL:

QueryBuilder qb = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(User.class).get();
  qb.bool().should(qb.keyword().onField("name").matching(searchQuery).createQuery())
     .should(qb.keyword().fuzzy().withPrefixLength(1).onField("description").matching(searchQuery).createQuery());

What's the easiest way to transform this into Lucene query so I can analyze the query using Luke:

enter image description here

I also have other more complex Hibernate queries that I would want to analyze using Luke.

Upvotes: 0

Views: 245

Answers (1)

Hardy
Hardy

Reputation: 19129

Have you tried calling toString on the created Lucene query? This should give you are pretty good starting point for the query you need to generate in Luke.

Upvotes: 2

Related Questions