Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top