how add wildcard query when using hibernate search. I am using Hibernate Search 3.1.1GA jar and unable to upgrade my jar to upper version. In upper version of hibernate we can use wildcard method using Query Builder.
I am stuck please help me out.
how add wildcard query when using hibernate search. I am using Hibernate Search 3.1.1GA jar and unable to upgrade my jar to upper version. In upper version of hibernate we can use wildcard method using Query Builder.
I am stuck please help me out.
I assume you are referring to the Hibernate Search query DSL. Something like this:
This DSL is indeed not part Search 3.1.1 and was added later. In this version you need to build your queries by using native Lucene queries. Really all the Search DSL does is under the hood building these native queries for you. In your case you want to look at
org.apache.lucene.search.WildcardQuery
or you could use theorg.apache.lucene.queryParser.QueryParser
to use the Lucene query syntax which also allows wildcards.