Hi,
it is hard to say what the problem is without knowing the concrete data. The code you pasted looks ok. Have you inspected you index with Luke -
http://code.google.com/p/luke/ ? You can run your queries in Luke and see what happens. This cuts out Hibernate Search and might help narrow down your problem. When experimenting with Luke I often set
store=Store.YES to get even more information in Luke.
What analyzer are you using for indexing ? I cannot see any analyzer configuration code in your post and unless you set a default analyzer in the Hibernate properties file the
StandardAnalyzer is used. Is this what you want?
Last but not least? What are you searching for? In your code you have
parser.parse(keywords+"*");. Is keywords a single word or multiple? Appending the '*' will only create a wildcard query for the last word (in case they are multiple).
Hope this helps.
--Hardy