Opened 12 years ago

Closed 12 years ago

#1179 closed defect (fixed)

StringIndexOutOfBounds exception in LuceneQueryBuilder#addLocaleTerm when requestedLanguageOnly value is 'false'

Reported by: simonp Owned by: geonetwork-devel@…
Priority: blocker Milestone: v2.10.0 RC0
Component: General Version: v2.8.0RC2
Keywords: Cc:

Description

Reported by brian.ohare@…:

I'm getting StringIndexOutOfBounds exception in LuceneQueryBuilder#addLocaleTerm when requestedLanguageOnly value is 'false'. Not sure if I've configured the database settings correctly as code seems to check for prefix 'only_' or 'prefer'. Exception occurs in 'prefer' check, so perhaps should be more stringent checking there? This breaks search for me on 2.8.x RC2.

Change History (7)

comment:1 by simonp, 12 years ago

Brian,

Is this on the latest build of RC2? I committed a patch that changed some of this logic yesterday (Dec 11). I'll check it out in the latest build shortly.

Simon

comment:2 by simonp, 12 years ago

....and so there is no confusion here - the author of the patch was Jesse Eichar (I backported it to 2.8.x RC2) - so feel free to step in Jesse....

comment:3 by simonp, 12 years ago

Can't reproduce it in the latest RC2 built - checked all the options and they seem to work as I would expect (at least I can see the locale query and language detection stuff doing what I would expect for each option).

comment:4 by bjohare, 12 years ago

Hi Simon,

Yes its the latest build of RC2. It's not against a clean install of the database though which may be the issue. Is there some sql I can to run to update the multilingual settings?

cheers,

Brian.

comment:5 by jesseeichar, 12 years ago

The migration scripts should contain the sql you need. Take a look at them.

The migration task only runs if the previous version is 2.6 or earlier so they probably didn't run automatically for you. Take a look at them and manually execute the needed sql.

comment:6 by bjohare, 12 years ago

Thanks Jesse will try that.

comment:7 by simonp, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.