質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top