Search Index Update Error

Running search-server/updater/updateindex.sh is throwing the exception below. This is from search-server commit bbac445. Any ideas on how to get the search index to update?

Wed Jan 25 10:18:58 EST 2017    FINE    Reindexing recording #3539363
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
    at org.musicbrainz.search.index.RecordingIndex.loadReleaseArtists(RecordingIndex.java:442)
    at org.musicbrainz.search.index.RecordingIndex.indexData(RecordingIndex.java:743)
    at org.musicbrainz.search.update.LiveDataFeedIndexUpdater.updateDatabaseIndex(LiveDataFeedIndexUpdater.java:272)
    at org.musicbrainz.search.update.LiveDataFeedIndexUpdater.update(LiveDataFeedIndexUpdater.java:211)
    at org.musicbrainz.search.update.LiveDataFeedIndexUpdater.main(LiveDataFeedIndexUpdater.java:331)

The offending query is:

2017-01-25 10:18:58 EST [13663-1] musicbrainz@musicbrainz ERROR:  syntax error at or near ")" at character 314
2017-01-25 10:18:58 EST [13663-2] musicbrainz@musicbrainz STATEMENT:  SELECT r.id as releaseKey,   a.artist_credit,   a.pos,   a.joinphrase,   a.artistId,    a.comment,   a.artistName,   a.artistCreditName,   a.artistSortName  FROM release AS r   INNER JOIN tmp_artistcredit a ON r.artist_credit=a.artist_credit  WHERE a.artistId!='89ad4ac3-39f7-470e-963a-56509c546377' AND r.id in ()

Thanks.

Michael

The updater is old code that has been abandoned. (The search server itself is, too, but it’s being dragged along until the new SOLR-based search server is ready.) The supported way is to run a full reindexing periodically.

I looked high and low and could only find documentation on running the updater periodically. Could you point me towards the documentation for a periodic full index?

Some of the things that I’d like to know to be able to implement it are:

  • How often to run the index?
  • Does Tomcat need to be stopped during the index?
  • If Tomcat doesn’t need to be stopped, does Tomcat need to be notified of changes?

I’d try to make some guesses from the search server README, but there are some contradictions in there.

Thanks again.

Michael