public Object visit(TextsearchQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ TextsearchQueryNode: "); buffer.append(" Path="); Path relPath = node.getRelativePath(); if (relPath == null) { buffer.append("."); } else { Path.Element[] elements = relPath.getElements(); String slash = ""; for (int i = 0; i < elements.length; i++) { buffer.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { buffer.append("@"); } buffer.append(elements[i]); } } buffer.append(" Query=").append(node.getQuery()); buffer.append("\n"); return buffer; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ TextsearchQueryNode: "); buffer.append(" Path="); Path relPath = node.getRelativePath(); if (relPath == null) { buffer.append("."); } else { Path.Element[] elements = relPath.getElements(); String slash = ""; for (int i = 0; i < elements.length; i++) { buffer.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { buffer.append("@"); } buffer.append(elements[i]); } } buffer.append(" Query=").append(node.getQuery()); buffer.append("\n"); return buffer; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; // escape quote String query = node.getQuery().replaceAll("'", "''"); sb.append("CONTAINS("); if (node.getRelativePath() == null) { sb.append("*"); } else { if (node.getRelativePath().getLength() > 1 || !node.getReferencesProperty()) { exceptions.add(new InvalidQueryException("Child axis not supported in SQL")); } else { try { appendName(node.getRelativePath().getName(), resolver, sb); } catch (NamespaceException e) { exceptions.add(e); } } } sb.append(", '"); sb.append(query).append("')"); return sb; }
public Object visit(TextsearchQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; // escape quote String query = node.getQuery().replaceAll("'", "''"); sb.append("CONTAINS("); if (node.getRelativePath() == null) { sb.append("*"); } else { if (node.getRelativePath().getLength() > 1 || !node.getReferencesProperty()) { exceptions.add(new InvalidQueryException("Child axis not supported in SQL")); } else { try { appendName(node.getRelativePath().getName(), resolver, sb); } catch (NamespaceException e) { exceptions.add(e); } } } sb.append(", '"); sb.append(query).append("')"); return sb; }
sb.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { sb.append("@");
sb.append(slash); slash = "/"; if (node.getReferencesProperty() && i == elements.length - 1) { sb.append("@");
Path relPath = node.getRelativePath(); String fieldname; if (relPath == null || !node.getReferencesProperty()) { fieldname, analyzer, synonymProvider, cache); Query context = parser.parse(node.getQuery()); if (relPath != null && (!node.getReferencesProperty() || relPath.getLength() > 1)) { && ((node.getReferencesProperty() && i == elements.length - 2) || (!node.getReferencesProperty() && i == elements.length - 1))) { Query q = new NameQuery(name, indexFormatVersion, nsMappings); BooleanQuery and = new BooleanQuery(); and.add(context, Occur.MUST); context = and; } else if ((node.getReferencesProperty() && i < elements.length - 2) || (!node.getReferencesProperty() && i < elements.length - 1)) {
Path relPath = node.getRelativePath(); String fieldname; if (relPath == null || !node.getReferencesProperty()) { fieldname, analyzer, synonymProvider, cache); Query context = parser.parse(node.getQuery()); if (relPath != null && (!node.getReferencesProperty() || relPath.getLength() > 1)) { && ((node.getReferencesProperty() && i == elements.length - 2) || (!node.getReferencesProperty() && i == elements.length - 1))) { Query q = new NameQuery(name, indexFormatVersion, nsMappings); BooleanQuery and = new BooleanQuery(); and.add(context, Occur.MUST); context = and; } else if ((node.getReferencesProperty() && i < elements.length - 2) || (!node.getReferencesProperty() && i < elements.length - 1)) {