@Test public void filterIncludesTheVerticesWhereTheSearchedValueIsPartOfThePropertyValueOfTheVertex() { GraphTraversal<Vertex, Vertex> traversal = newGraph() .withVertex(vertex -> vertex.withTimId("v1").withProperty(PROPERTY, "value12344324")) .withVertex(vertex -> vertex.withTimId("v2").withProperty(PROPERTY, "another value")) .withVertex(vertex -> vertex.withTimId("v3").withProperty(PROPERTY, "value1")) .build() .traversal() .V(); FullTextSearchParameter fullTextSearchParameter = new FullTextSearchParameter(NAME, "value"); instance.filter(traversal, fullTextSearchParameter); assertThat(traversal.toList(), containsInAnyOrder( likeVertex().withTimId("v1"), likeVertex().withTimId("v2"), likeVertex().withTimId("v3"))); }
@SuppressWarnings("unchecked") public void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter) { String term = fullTextSearchParameter.getTerm(); traversal.where(__.union(prop1.getTraversal(), prop2.getTraversal()) .is(P.test(CONTAINS_STRING_PREDICATE, term))); }
FullTextSearchDescription { @SuppressWarnings("unchecked") public void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter) { String term = fullTextSearchParameter.getTerm(); traversal.where(__.union(prop1.getTraversal(), prop2.getTraversal()) .is(P.test(CONTAINS_STRING_PREDICATE, term))); } }
FullTextSearchDescription { @SuppressWarnings("unchecked") public void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter) { String term = fullTextSearchParameter.getTerm(); traversal.where(__.union(prop1.getTraversal(), prop2.getTraversal()) .is(P.test(CONTAINS_STRING_PREDICATE, term))); } private  FullTextSearchDescription(String name, Property prop1, Property prop2); }
FullTextSearchDescription { @SuppressWarnings("unchecked") public void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter) { String term = fullTextSearchParameter.getTerm(); traversal.where(__.union(prop1.getTraversal(), prop2.getTraversal()) .is(P.test(CONTAINS_STRING_PREDICATE, term))); } private  FullTextSearchDescription(String name, Property prop1, Property prop2); static FullTextSearchDescription createLocalSimpleFullTextSearchDescription(
    String name,
    String propertyName); static FullTextSearchDescription createLocalFullTextSearchDescriptionWithBackupProperty(
    String name,
    String propertyName,
    String backUpPropertyName
  ); String getName(); @SuppressWarnings("unchecked") void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter); static FullTextSearchDescription createDerivedFullTextSearchDescriptionWithBackupProperty(
          String name, String propertyName, String backupPropertyName, String... relations); }
FullTextSearchDescription { @SuppressWarnings("unchecked") public void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter) { String term = fullTextSearchParameter.getTerm(); traversal.where(__.union(prop1.getTraversal(), prop2.getTraversal()) .is(P.test(CONTAINS_STRING_PREDICATE, term))); } private  FullTextSearchDescription(String name, Property prop1, Property prop2); static FullTextSearchDescription createLocalSimpleFullTextSearchDescription(
    String name,
    String propertyName); static FullTextSearchDescription createLocalFullTextSearchDescriptionWithBackupProperty(
    String name,
    String propertyName,
    String backUpPropertyName
  ); String getName(); @SuppressWarnings("unchecked") void filter(GraphTraversal<Vertex, Vertex> traversal, FullTextSearchParameter fullTextSearchParameter); static FullTextSearchDescription createDerivedFullTextSearchDescriptionWithBackupProperty(
          String name, String propertyName, String backupPropertyName, String... relations); static final ContainsStringPredicate CONTAINS_STRING_PREDICATE; }