0

I am developping a java/jee application in which i am using spring boot and hibernate as frameworks i used hibernate search for full text searching but unfortunately i always got an empty list as result.I am using hibernate version 5.1 and hibernate search orm version 5.5.3.Final.Here is my code :

1 Answer 1

2

There are multiple kinds of full-text queries.

The keyword() query will only match exactly the same keyword, so if you pass matching("di*") it will only find instances of the Application entity which have a literal field

 reference = "di*";

Which I'm guessing is not what you meant to do.

It looks like you want a wildcard query instead?

builder.keyword().wildcard().onField( "reference" ).matching( "di*" ).createQuery()

Have a look also at the new SimpleQuery DSL: builder.simpleQueryString(), another great way to create wildcard queries.

See also:

Sign up to request clarification or add additional context in comments.

1 Comment

thank you for your responce but i have also tried that and it is still not working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.