Yank our nomenclature into consistency -- indices, not indexes; fields(), not fieldNames(), as per Ray's suggestion.
This commit is contained in:
@@ -209,7 +209,7 @@ public class DepotMarshaller<T extends PersistentRecord>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if there are FTS indexes in the Table, map those out here for future use
|
// if there are FTS indexes in the Table, map those out here for future use
|
||||||
for (FullTextIndex fti : entity.fullTextIndexes()) {
|
for (FullTextIndex fti : entity.fullTextIndices()) {
|
||||||
if (_fullTextIndexes.containsKey(fti.name())) {
|
if (_fullTextIndexes.containsKey(fti.name())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class MySQLBuilder
|
|||||||
_builder.append("match(");
|
_builder.append("match(");
|
||||||
Class<? extends PersistentRecord> pClass = match.getPersistentRecord();
|
Class<? extends PersistentRecord> pClass = match.getPersistentRecord();
|
||||||
String[] fields =
|
String[] fields =
|
||||||
_types.getMarshaller(pClass).getFullTextIndex(match.getName()).fieldNames();
|
_types.getMarshaller(pClass).getFullTextIndex(match.getName()).fields();
|
||||||
for (int ii = 0; ii < fields.length; ii ++) {
|
for (int ii = 0; ii < fields.length; ii ++) {
|
||||||
if (ii > 0) {
|
if (ii > 0) {
|
||||||
_builder.append(", ");
|
_builder.append(", ");
|
||||||
@@ -150,7 +150,7 @@ public class MySQLBuilder
|
|||||||
StringBuilder update = new StringBuilder("ALTER TABLE ").
|
StringBuilder update = new StringBuilder("ALTER TABLE ").
|
||||||
append(marshaller.getTableName()).append(" ADD FULLTEXT INDEX ftsIx_").
|
append(marshaller.getTableName()).append(" ADD FULLTEXT INDEX ftsIx_").
|
||||||
append(fts.name()).append(" (");
|
append(fts.name()).append(" (");
|
||||||
String[] fields = fts.fieldNames();
|
String[] fields = fts.fields();
|
||||||
for (int ii = 0; ii < fields.length; ii ++) {
|
for (int ii = 0; ii < fields.length; ii ++) {
|
||||||
if (ii > 0) {
|
if (ii > 0) {
|
||||||
update.append(", ");
|
update.append(", ");
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class PostgreSQLBuilder
|
|||||||
Class<T> pClass = marshaller.getPersistentClass();
|
Class<T> pClass = marshaller.getPersistentClass();
|
||||||
DatabaseLiaison liaison = LiaisonRegistry.getLiaison(conn);
|
DatabaseLiaison liaison = LiaisonRegistry.getLiaison(conn);
|
||||||
|
|
||||||
String[] fields = fts.fieldNames();
|
String[] fields = fts.fields();
|
||||||
|
|
||||||
String table = marshaller.getTableName();
|
String table = marshaller.getTableName();
|
||||||
String column = "ftsCol_" + fts.name();
|
String column = "ftsCol_" + fts.name();
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ public @interface Entity
|
|||||||
Index[] indices () default {};
|
Index[] indices () default {};
|
||||||
|
|
||||||
/** Full-text search indexes defined on this entity, if any. Defaults to none. */
|
/** Full-text search indexes defined on this entity, if any. Defaults to none. */
|
||||||
FullTextIndex[] fullTextIndexes () default {};
|
FullTextIndex[] fullTextIndices () default {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ public @interface FullTextIndex
|
|||||||
/**
|
/**
|
||||||
* An array of the field names that should be indexed.
|
* An array of the field names that should be indexed.
|
||||||
*/
|
*/
|
||||||
public String[] fieldNames ();
|
public String[] fields ();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user