Skip to content

Commit

Permalink
fixed getIndexedProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrignon committed May 26, 2018
1 parent 3694f54 commit 591be4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class HibernateSearchApi {
private final HibernateSearchConfig pluginConfig

private final FullTextSession fullTextSession
private final Class clazz
private final GrailsClass grailsDomainClass
private final Class clazz
private final instance
private final staticContext

Expand All @@ -79,6 +80,7 @@ class HibernateSearchApi {
private Component currentNode

HibernateSearchApi(GrailsClass domainClass, instance, Session session, HibernateSearchConfig pluginConfig) {
this.grailsDomainClass = domainClass
this.clazz = domainClass.clazz
this.fullTextSession = Search.getFullTextSession(session)
this.instance = instance
Expand Down Expand Up @@ -348,7 +350,9 @@ class HibernateSearchApi {
}

Map<String, PropertyDescriptor> getIndexedProperties() {
this.pluginConfig.getIndexedPropertiesByEntity()[clazz.getName()]
def indexedPropertiesByEntity = this.pluginConfig.getIndexedPropertiesByEntity();
log.debug "HibernateSearchApi.getIndexedProperties indexedProperties entities=${indexedPropertiesByEntity?.keySet()} entity=${grailsDomainClass.getName()}"
return indexedPropertiesByEntity[grailsDomainClass.getName()]
}

private FullTextQuery createFullTextQuery() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class HibernateSearchConfig {
HibernateSearchConfig(Session session, Map<String, Map<String, PropertyDescriptor>> indexedPropertiesByEntity) {
this.fullTextSession = Search.getFullTextSession(session)
this.indexedPropertiesByEntity = indexedPropertiesByEntity

log.trace "build HibernateSearchConfig indexedPropertiesByEntity=${indexedPropertiesByEntity}"
}

/**
Expand Down

0 comments on commit 591be4b

Please sign in to comment.