{"action":"created","issue":{"url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/37","labels_url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/37/comments","events_url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/37/events","html_url":"https://github.com/noamt/elasticsearch-grails-plugin/issues/37","id":35606561,"number":37,"title":"Support for indexing transient properties ?","user":{"login":"v1p","id":899109,"avatar_url":"https://avatars.githubusercontent.com/u/899109?v=3","gravatar_id":"","url":"https://api.github.com/users/v1p","html_url":"https://github.com/v1p","followers_url":"https://api.github.com/users/v1p/followers","following_url":"https://api.github.com/users/v1p/following{/other_user}","gists_url":"https://api.github.com/users/v1p/gists{/gist_id}","starred_url":"https://api.github.com/users/v1p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v1p/subscriptions","organizations_url":"https://api.github.com/users/v1p/orgs","repos_url":"https://api.github.com/users/v1p/repos","events_url":"https://api.github.com/users/v1p/events{/privacy}","received_events_url":"https://api.github.com/users/v1p/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-06-12T17:40:31Z","updated_at":"2015-07-14T09:55:45Z","closed_at":"2014-06-12T20:30:35Z","body":"Transient properties if supported, can help in reducing the mapping complexity and give a great handle on keeping the mapping of indices cleaner, without making all of the other domain classes searchable.\r\ne.g User has Rating, where Rating is transient & is fetched through a service, as rating is necessarily calculated as average of all available ratings.\r\nI tried the approach mentioned here :\r\nhttps://github.com/mstein/elasticsearch-grails-plugin/issues/17\r\n\r\nBut I have hit a roadblock, it seems a valid hibernateSession + service dependecy Injection is required inside the scope of plugin. \r\nAs soon as my transient property is reached, I get this error\r\n| Error 2014-06-12 22:52:08,238 [localhost-startStop-1] ERROR hibernate.AssertionFailure  - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)\r\nMessage: null id in User entry (don't flush the Session after an exception occurs)\r\n    Line | Method\r\n->>   70 | getRating                      in User\r\n\r\nAny help would be great."},"comment":{"url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/comments/121187392","html_url":"https://github.com/noamt/elasticsearch-grails-plugin/issues/37#issuecomment-121187392","issue_url":"https://api.github.com/repos/noamt/elasticsearch-grails-plugin/issues/37","id":121187392,"user":{"login":"nmfisher","id":7238578,"avatar_url":"https://avatars.githubusercontent.com/u/7238578?v=3","gravatar_id":"","url":"https://api.github.com/users/nmfisher","html_url":"https://github.com/nmfisher","followers_url":"https://api.github.com/users/nmfisher/followers","following_url":"https://api.github.com/users/nmfisher/following{/other_user}","gists_url":"https://api.github.com/users/nmfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/nmfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmfisher/subscriptions","organizations_url":"https://api.github.com/users/nmfisher/orgs","repos_url":"https://api.github.com/users/nmfisher/repos","events_url":"https://api.github.com/users/nmfisher/events{/privacy}","received_events_url":"https://api.github.com/users/nmfisher/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T09:55:45Z","updated_at":"2015-07-14T09:55:45Z","body":"If you want to be able to boost based on nested object fields, you could have transient boolean properties like isQuestion/isAnswer in your MemberData class (i.e. using a getter only like getIsQuestion()/getIsAnswer() etc), and then index/boost those."}}