Version 3

    This page is out of date: content has moved there.



    FullTextQuery does not return any results, even though ... - what do I do?

    This is a common problem for beginners and luckily there are a few simple steps which have helped to resolve many problems of this kind.

    • Do you have the minimal required configuration in your hibernate settings file? For initial testing we recommend using a file based Lucene index. Hence you should have something like this in your configuration file:
    # the default directory provider =
    # the default base directory for the indecies = /var/lucene/indexes  


    If you don't specify the indexBase property the index file get created in the directory your application starts from. It is probably better to set this property explicitly since this way you know where to look for the index files. Given you have these two properties in your configuration and you have at least one entity annotated with @Entity Hibernate Search will create at startup the Lucene index files in indexBase.

    • Once you confirmed that you have an index directory and index files you can download Luke ( or even start it directly via Java Web Start. Open the *.gen file in the index directory. Luke will show you the content of your index. If there are no documents in the index have another look at your indexing code.

    The JVM appears to hang when my application should terminate; what's wrong?

    See the Hibernate Search FAQ about shutting down Search properly. There is also a lengthy discussion about this on the Search Forum.