if (query.hasRangeCondition() || query.hasSearchCondition()) { matchedIndexLabels = matchRangeOrSearchIndexLabels(query, allILs); if (matchedIndexLabels.isEmpty()) {
private static NoIndexException noIndexException(HugeGraph graph, ConditionQuery query, Id label) { String name = label == null ? "any label" : String.format("label '%s'", query.resultType().isVertex() ? graph.vertexLabel(label).name() : graph.edgeLabel(label).name()); List<String> mismatched = new ArrayList<>(); if (query.hasSecondaryCondition()) { mismatched.add("secondary"); } if (query.hasRangeCondition()) { mismatched.add("range"); } if (query.hasSearchCondition()) { mismatched.add("search"); } return new NoIndexException("Don't accept query based on properties " + "%s that are not indexed in %s, " + "may not match %s condition", graph.mapPkId2Name(query.userpropKeys()), name, String.join("/", mismatched)); }
Set<IndexLabel> indexLabels) { boolean reqiureRange = query.hasRangeCondition(); boolean reqiureSearch = query.hasSearchCondition(); Set<Id> queryPropKeys = query.userpropKeys(); for (IndexLabel indexLabel : indexLabels) {
if (query.hasRangeCondition() || query.hasSearchCondition()) { Set<IndexLabel> matchedILs = matchRangeOrSearchIndexLabels(query, index.indexLabels());
if (query.hasRangeCondition() || query.hasSearchCondition()) { matchedIndexLabels = matchRangeOrSearchIndexLabels(query, allILs); if (matchedIndexLabels.isEmpty()) {
private static NoIndexException noIndexException(HugeGraph graph, ConditionQuery query, Id label) { String name = label == null ? "any label" : String.format("label '%s'", query.resultType().isVertex() ? graph.vertexLabel(label).name() : graph.edgeLabel(label).name()); List<String> mismatched = new ArrayList<>(); if (query.hasSecondaryCondition()) { mismatched.add("secondary"); } if (query.hasRangeCondition()) { mismatched.add("range"); } if (query.hasSearchCondition()) { mismatched.add("search"); } return new NoIndexException("Don't accept query based on properties " + "%s that are not indexed in %s, " + "may not match %s condition", graph.mapPkId2Name(query.userpropKeys()), name, String.join("/", mismatched)); }
Set<IndexLabel> indexLabels) { boolean reqiureRange = query.hasRangeCondition(); boolean reqiureSearch = query.hasSearchCondition(); Set<Id> queryPropKeys = query.userpropKeys(); for (IndexLabel indexLabel : indexLabels) {
if (query.hasRangeCondition() || query.hasSearchCondition()) { Set<IndexLabel> matchedILs = matchRangeOrSearchIndexLabels(query, index.indexLabels());