0

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.

Glide
  • 20,235
  • 26
  • 86
  • 135

1 Answers1

2

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.

Hardy
  • 18,659
  • 3
  • 49
  • 65