Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6203433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:54:58+00:00 2026-05-24T04:54:58+00:00

I am using the joda time library in my grails project. I’ve installed the

  • 0

I am using the joda time library in my grails project.
I’ve installed the searchable plugin.
I have a few domains but the most important now :

import org.joda.time.DateTime

class Entry {

     static searchable = {
     except = ['id', 'version']
     spellCheck "include"
     tags component: true

     title boost: 2.0
        dateCreated boost: 2.0
     }

 String title
 String content
 DateTime dateCreated
 DateTime lastUpdated

}

But on initialization I encounter the following error:

Unable to map [Entry.dateCreated]. It does not appear to a suitable
‘searchable property’ (normally simple
types like Strings, Dates, Numbers,
etc), ‘searchable reference’ (normally
another domain class) or ‘searchable
component’ (normally another domain
class defined as a component, using
the ’embedded’ declaration). Is it a
derived property (a getter method with
no equivalent field) defined with
‘def’? Try defining it with a more
specific return type

My question:
Is it possible to make the dateCreated and/or lastUpdated properties searchable in grails?
If possible, how can this be done?

Thanks.


EDIT

If I was to define a custom converter in my config.groovy like so:

Map compassSettings = [
‘compass.converter. funkyConverter.type’:’com.acme.compass.converter.FunkyConverter’]

What is then defined in the FunkyConverter class?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:54:59+00:00Added an answer on May 24, 2026 at 4:54 am

    The version of compass that came with version 0.6 of Searchable (any maybe earlier versions) had some special case code in it (in class org.compass.core.converter.DefaultConverterLookup) for the org.joda.time.DateTime class. I can’t speak directly to whether it works or not, but it looked like it would try to automatically make use of org.compass.core.converter.extended.DataTimeConverter included in Compass for the joda DateTime class.

    However, for joda LocalDate and LocalTime classes, there was no built-in support. A recent bug fix to Searchable version 0.6.1 ( http://jira.grails.org/browse/GPSEARCHABLE-28 ) along with the use of the registerClass configuration in Searchable.groovy shown below has fixed my “It does not appear to a suitable ‘searchable property’…” problem that was occurring at application startup while domain objects were being instantiated in Bootstrap.groovy.

    compassSettings = [
        "compass.converter.jodatime.type": "net.streamrecorder.web.converter.LocalTimeConverter",
        "compass.converter.jodatime.registerClass": "org.joda.time.LocalTime"
    ]
    

    Note that net.streamrecorder.web.converter.LocalTimeConverter is my own creation. I modeled it after org.compass.core.converter.extended.DataTimeConverter. There is also a converter for LocalDate in this diff referenced from the GPSEARCHABLE-28 ticket: ( http://jira.grails.org/secure/attachment/15729/0001-Nasty-fixes-and-workarounds-for-adding-custom-compas.patch ) And of course, you still need to specify your converter for your domain member variable in your domain class as described here: ( http://grails.org/Searchable+Plugin+-+Converters )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the joda-time grails plugin in my grails app to deal with
I am using the Joda-Time library in Java, and have a date and time
I am using Joda-Time library to convert my String dates to a real date,
I'm using the Joda-Time library with Java. I'm having some difficulty trying to turn
I try to calculate a List with times. But using LocalTime from Joda Time
I saw the light and install the joda-time plugin for grails. However, when I
I'm using Hibernate & Joda Time, with support from the UserType library. I'm able
I am using Joda library to get time period passed since a given timestamp:
In my application I am using Joda-Time 2.0 but in my WebLogic path there
I have the following problem using Joda-Time for parsing and producing date and time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.