Reputation: 21255
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:
I also have other more complex Hibernate queries that I would want to analyze using Luke.
Upvotes: 0
Views: 245
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