Hibernate Search (Store and Index)

hibernate-search, java

Solution

store : describe whether or not the property is stored in the Lucene index. You can store the value Store.YES (consuming more space in the index but allowing projection, see Section 6.1.2.5, “Projection” for more information), store it in a compressed way Store.COMPRESS (this does consume more CPU), or avoid any storage Store.NO (this is the default value). When a property is stored, you can retrieve it from the Lucene Document (note that this is not related to whether the element is indexed or not).

index: describe how the element is indexed (i.e. the process used to index the property and the type of information store). The different values are Index.NO (no indexing, i.e. cannot be found by a query), Index.TOKENIZED (use an analyzer to process the property), Index.UN_TOKENISED (no analyzer pre-processing), Index.NO_NORM (do not store the normalization data). The default value is TOKENIZED.

According: http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.2/html/Hibernate_Search_Reference_Guide/Hibernate_Search-Mapping.html

Problem

What is the intension of index = Index.YES and store = Store.YES on @Field. At the end (when a search is executed) would this data be loaded from the database (search over the index and load results from database)? Why should I store the data in index too? Or is my understanding wrong?

Original source