public static IndexType getFullTextGIN(String configuration){ IndexType it=new IndexType(GIN_FULLTEXT); it.getProperties().put(GIN_CONFIGURATION, configuration); return it; }
public static IndexType getFullTextGIN(String configuration){ IndexType it=new IndexType(GIN_FULLTEXT); it.getProperties().put(GIN_CONFIGURATION, configuration); return it; }
public static IndexType fromNotifyJson(JsonNode node){ // older version if(node.isValueNode()){ String s=node.asText(); if ("UNIQUE".equalsIgnoreCase(s)){ return UNIQUE; } else if ("NON_UNIQUE".equalsIgnoreCase(s)){ return NON_UNIQUE; } } IndexType it=new IndexType(node.get("name").asText()); Iterator<String> keys=node.fieldNames(); while (keys.hasNext()){ String k=keys.next(); if (!"name".equals(k)){ it.getProperties().put(k, node.get(k).asText()); } } return it; } }
public static IndexType fromNotifyJson(JsonNode node){ // older version if(node.isValueNode()){ String s=node.asText(); if ("UNIQUE".equalsIgnoreCase(s)){ return UNIQUE; } else if ("NON_UNIQUE".equalsIgnoreCase(s)){ return NON_UNIQUE; } } IndexType it=new IndexType(node.get("name").asText()); Iterator<String> keys=node.fieldNames(); while (keys.hasNext()){ String k=keys.next(); if (!"name".equals(k)){ it.getProperties().put(k, node.get(k).asText()); } } return it; } }
if (IndexType.GIN_FULLTEXT.equals(getIndexType().getName())) { sql.append("to_tsvector("); String conf = indexType.getProperties().get(IndexType.GIN_CONFIGURATION); if (conf != null) { sql.append("'" + conf + "'"); // need single quotes, no double
if (IndexType.GIN_FULLTEXT.equals(getIndexType().getName())) { sql.append("to_tsvector("); String conf = indexType.getProperties().get(IndexType.GIN_CONFIGURATION); if (conf != null) { sql.append("'" + conf + "'"); // need single quotes, no double