Uploaded image for project: 'ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)'
  1. ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  2. LEP-2181

Setting lucene.store.type=jdbc does not work for MySQL or HSQL (Lucene JDBC, MySQLDIalect, HSQLDialect)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2.1, 4.3.1
    • Fix Version/s: 4.3.2, 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Calling the .tableExists() method in LuceneUtil throws an UnsupportedOperationException for MySQL and HSQL

      if (directory.tableExists()) {
      directory.delete();
      }

      It throws an error because MySQL and HSQL cannot detect whether or not a table exists.

      The workaround is to not use this method and to manually create or delete the table.

      See below for more information:

      org.apache.lucene.store.jdbc.dialect.Dialect from compass.jar:

      /**

      • If the dialect support a special query to check if a table exists, the actual
      • sql that is used to perform it. Defaults to throw an Unsupported excetion (see
      • {@link #supportsTableExists()}

        .
        */
        public String sqlTableExists(String catalog, String schemaName)

        { throw new UnsupportedOperationException("Not sql provided to define if a table exists"); }

        Attachments

          Activity

            People

            Assignee:
            edward.shin Edward Shin (Inactive)
            Reporter:
            edward.shin Edward Shin (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                4.3.2
                4.4.0