test_class.declarator: HOOK = new EditorHook(
          new IndexUpdateProvider(
              new LuceneIndexEditorProvider()))
test_class.modifier: private static final
test_class.original_string: private static final EditorHook HOOK = new EditorHook(
          new IndexUpdateProvider(
              new LuceneIndexEditorProvider()));
test_class.type: EditorHook
test_class.var_name: HOOK
test_class.declarator: root = INITIAL_CONTENT
test_class.modifier: private
test_class.original_string: private NodeState root = INITIAL_CONTENT;
test_class.type: NodeState
test_class.var_name: root
test_class.declarator: builder = root.builder()
test_class.modifier: private
test_class.original_string: private NodeBuilder builder = root.builder();
test_class.type: NodeBuilder
test_class.var_name: builder
test_class.declarator: dirs = newHashSet()
test_class.modifier: private
test_class.original_string: private Set<File> dirs = newHashSet();
test_class.type: Set<File>
test_class.var_name: dirs
test_class.declarator: tracker
test_class.modifier: private
test_class.original_string: private IndexTracker tracker;
test_class.type: IndexTracker
test_class.var_name: tracker
test_class.file: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
test_class.identifier: LuceneIndexTest
test_case.body: @Test
      public void testTokens() {
          Analyzer analyzer = LuceneIndexConstants.ANALYZER;
          assertEquals(ImmutableList.of("parent", "child"),
              LuceneIndex.tokenize("/parent/child", analyzer));
          assertEquals(ImmutableList.of("p1234", "p5678"),
              LuceneIndex.tokenize("/p1234/p5678", analyzer));
          assertEquals(ImmutableList.of("first", "second"),
              LuceneIndex.tokenize("first_second", analyzer));
          assertEquals(ImmutableList.of("first1", "second2"),
              LuceneIndex.tokenize("first1_second2", analyzer));
          assertEquals(ImmutableList.of("first", "second"),
              LuceneIndex.tokenize("first. second", analyzer));
          assertEquals(ImmutableList.of("first", "second"),
              LuceneIndex.tokenize("first.second", analyzer));
  
          assertEquals(ImmutableList.of("hello", "world"),
              LuceneIndex.tokenize("hello-world", analyzer));
          assertEquals(ImmutableList.of("hello", "wor*"),
              LuceneIndex.tokenize("hello-wor*", analyzer));
          assertEquals(ImmutableList.of("*llo", "world"),
              LuceneIndex.tokenize("*llo-world", analyzer));
          assertEquals(ImmutableList.of("*llo", "wor*"),
              LuceneIndex.tokenize("*llo-wor*", analyzer));
      }
test_case.class_method_signature: LuceneIndexTest.testTokens()
test_case.full_signature: @Test public void testTokens()
test_case.identifier: testTokens
test_case.invocations: assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize assertEquals of tokenize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTokens()
focal_class.declarator: LOG = LoggerFactory
              .getLogger(LuceneIndex.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory
              .getLogger(LuceneIndex.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: NATIVE_QUERY_FUNCTION = "native*lucene"
focal_class.modifier: public static final
focal_class.original_string: public static final String NATIVE_QUERY_FUNCTION = "native*lucene";
focal_class.type: String
focal_class.var_name: NATIVE_QUERY_FUNCTION
focal_class.declarator: MIN_COST = 2.2
focal_class.modifier: private static
focal_class.original_string: private static double MIN_COST = 2.2;
focal_class.type: double
focal_class.var_name: MIN_COST
focal_class.declarator: ATTR_INDEX_PATH = "oak.lucene.indexPath"
focal_class.modifier: static final
focal_class.original_string: static final String ATTR_INDEX_PATH = "oak.lucene.indexPath";
focal_class.type: String
focal_class.var_name: ATTR_INDEX_PATH
focal_class.declarator: LUCENE_QUERY_BATCH_SIZE = 50
focal_class.modifier: static final
focal_class.original_string: static final int LUCENE_QUERY_BATCH_SIZE = 50;
focal_class.type: int
focal_class.var_name: LUCENE_QUERY_BATCH_SIZE
focal_class.declarator: USE_PATH_RESTRICTION = Boolean.getBoolean("oak.luceneUsePath")
focal_class.modifier: static final
focal_class.original_string: static final boolean USE_PATH_RESTRICTION = Boolean.getBoolean("oak.luceneUsePath");
focal_class.type: boolean
focal_class.var_name: USE_PATH_RESTRICTION
focal_class.declarator: MAX_RELOAD_COUNT = Integer.getInteger("oak.luceneMaxReloadCount", 16)
focal_class.modifier: static final
focal_class.original_string: static final int MAX_RELOAD_COUNT = Integer.getInteger("oak.luceneMaxReloadCount", 16);
focal_class.type: int
focal_class.var_name: MAX_RELOAD_COUNT
focal_class.declarator: tracker
focal_class.modifier: protected final
focal_class.original_string: protected final IndexTracker tracker;
focal_class.type: IndexTracker
focal_class.var_name: tracker
focal_class.declarator: aggregator
focal_class.modifier: private final
focal_class.original_string: private final NodeAggregator aggregator;
focal_class.type: NodeAggregator
focal_class.var_name: aggregator
focal_class.declarator: highlighter = new Highlighter(new SimpleHTMLFormatter("<strong>", "</strong>"),
              new SimpleHTMLEncoder(), null)
focal_class.modifier: private final
focal_class.original_string: private final Highlighter highlighter = new Highlighter(new SimpleHTMLFormatter("<strong>", "</strong>"),
              new SimpleHTMLEncoder(), null);
focal_class.type: Highlighter
focal_class.var_name: highlighter
focal_class.declarator: fulltextTokens = new char[] { '*', '?' }
focal_class.modifier: private static
focal_class.original_string: private static char[] fulltextTokens = new char[] { '*', '?' };
focal_class.type: char[]
focal_class.var_name: fulltextTokens
focal_class.file: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
focal_class.identifier: LuceneIndex
focal_class.interfaces: implements AdvanceFulltextQueryIndex
focal_class.class_method_signature: LuceneIndex.LuceneIndex(IndexTracker tracker, NodeAggregator aggregator)
focal_class.full_signature: public  LuceneIndex(IndexTracker tracker, NodeAggregator aggregator)
focal_class.identifier: LuceneIndex
focal_class.modifiers: public
focal_class.parameters: (IndexTracker tracker, NodeAggregator aggregator)
focal_class.signature:  LuceneIndex(IndexTracker tracker, NodeAggregator aggregator)
focal_class.class_method_signature: LuceneIndex.getMinimumCost()
focal_class.full_signature: @Override public double getMinimumCost()
focal_class.identifier: getMinimumCost
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMinimumCost()
focal_class.class_method_signature: LuceneIndex.getIndexName()
focal_class.full_signature: @Override public String getIndexName()
focal_class.identifier: getIndexName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIndexName()
focal_class.class_method_signature: LuceneIndex.getPlans(Filter filter, List<OrderEntry> sortOrder, NodeState rootState)
focal_class.full_signature: @Override public List<IndexPlan> getPlans(Filter filter, List<OrderEntry> sortOrder, NodeState rootState)
focal_class.identifier: getPlans
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, List<OrderEntry> sortOrder, NodeState rootState)
focal_class.return: List<IndexPlan>
focal_class.signature: List<IndexPlan> getPlans(Filter filter, List<OrderEntry> sortOrder, NodeState rootState)
focal_class.class_method_signature: LuceneIndex.getCost(Filter filter, NodeState root)
focal_class.full_signature: @Override public double getCost(Filter filter, NodeState root)
focal_class.identifier: getCost
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, NodeState root)
focal_class.return: double
focal_class.signature: double getCost(Filter filter, NodeState root)
focal_class.class_method_signature: LuceneIndex.getPlan(Filter filter, NodeState root)
focal_class.full_signature: @Override public String getPlan(Filter filter, NodeState root)
focal_class.identifier: getPlan
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, NodeState root)
focal_class.return: String
focal_class.signature: String getPlan(Filter filter, NodeState root)
focal_class.class_method_signature: LuceneIndex.getPlanDescription(IndexPlan plan, NodeState root)
focal_class.full_signature: @Override public String getPlanDescription(IndexPlan plan, NodeState root)
focal_class.identifier: getPlanDescription
focal_class.modifiers: @Override public
focal_class.parameters: (IndexPlan plan, NodeState root)
focal_class.return: String
focal_class.signature: String getPlanDescription(IndexPlan plan, NodeState root)
focal_class.class_method_signature: LuceneIndex.query(final Filter filter, final NodeState root)
focal_class.full_signature: @Override public Cursor query(final Filter filter, final NodeState root)
focal_class.identifier: query
focal_class.modifiers: @Override public
focal_class.parameters: (final Filter filter, final NodeState root)
focal_class.return: Cursor
focal_class.signature: Cursor query(final Filter filter, final NodeState root)
focal_class.class_method_signature: LuceneIndex.query(final IndexPlan plan, NodeState rootState)
focal_class.full_signature: @Override public Cursor query(final IndexPlan plan, NodeState rootState)
focal_class.identifier: query
focal_class.modifiers: @Override public
focal_class.parameters: (final IndexPlan plan, NodeState rootState)
focal_class.return: Cursor
focal_class.signature: Cursor query(final IndexPlan plan, NodeState rootState)
focal_class.class_method_signature: LuceneIndex.getExcerpt(Analyzer analyzer, IndexSearcher searcher, ScoreDoc doc)
focal_class.full_signature: private String getExcerpt(Analyzer analyzer, IndexSearcher searcher, ScoreDoc doc)
focal_class.identifier: getExcerpt
focal_class.modifiers: private
focal_class.parameters: (Analyzer analyzer, IndexSearcher searcher, ScoreDoc doc)
focal_class.return: String
focal_class.signature: String getExcerpt(Analyzer analyzer, IndexSearcher searcher, ScoreDoc doc)
focal_class.class_method_signature: LuceneIndex.planBuilder(Filter filter)
focal_class.full_signature: protected static IndexPlan.Builder planBuilder(Filter filter)
focal_class.identifier: planBuilder
focal_class.modifiers: protected static
focal_class.parameters: (Filter filter)
focal_class.return: IndexPlan.Builder
focal_class.signature: IndexPlan.Builder planBuilder(Filter filter)
focal_class.class_method_signature: LuceneIndex.getRelativePaths(FullTextExpression ft)
focal_class.full_signature: private static Set<String> getRelativePaths(FullTextExpression ft)
focal_class.identifier: getRelativePaths
focal_class.modifiers: private static
focal_class.parameters: (FullTextExpression ft)
focal_class.return: Set<String>
focal_class.signature: Set<String> getRelativePaths(FullTextExpression ft)
focal_class.class_method_signature: LuceneIndex.getLuceneRequest(Filter filter, IndexReader reader, boolean nonFullTextConstraints,
                                                          LuceneIndexDefinition indexDefinition)
focal_class.full_signature: private static LuceneRequestFacade getLuceneRequest(Filter filter, IndexReader reader, boolean nonFullTextConstraints,
                                                          LuceneIndexDefinition indexDefinition)
focal_class.identifier: getLuceneRequest
focal_class.modifiers: private static
focal_class.parameters: (Filter filter, IndexReader reader, boolean nonFullTextConstraints,
                                                          LuceneIndexDefinition indexDefinition)
focal_class.return: LuceneRequestFacade
focal_class.signature: LuceneRequestFacade getLuceneRequest(Filter filter, IndexReader reader, boolean nonFullTextConstraints,
                                                          LuceneIndexDefinition indexDefinition)
focal_class.class_method_signature: LuceneIndex.addNonFullTextConstraints(List<Query> qs,
                                                    Filter filter, IndexReader reader, Analyzer analyzer, IndexDefinition indexDefinition)
focal_class.full_signature: private static void addNonFullTextConstraints(List<Query> qs,
                                                    Filter filter, IndexReader reader, Analyzer analyzer, IndexDefinition indexDefinition)
focal_class.identifier: addNonFullTextConstraints
focal_class.modifiers: private static
focal_class.parameters: (List<Query> qs,
                                                    Filter filter, IndexReader reader, Analyzer analyzer, IndexDefinition indexDefinition)
focal_class.return: void
focal_class.signature: void addNonFullTextConstraints(List<Query> qs,
                                                    Filter filter, IndexReader reader, Analyzer analyzer, IndexDefinition indexDefinition)
focal_class.class_method_signature: LuceneIndex.tokenizeAndPoll(String token, Analyzer analyzer)
focal_class.full_signature: private static String tokenizeAndPoll(String token, Analyzer analyzer)
focal_class.identifier: tokenizeAndPoll
focal_class.modifiers: private static
focal_class.parameters: (String token, Analyzer analyzer)
focal_class.return: String
focal_class.signature: String tokenizeAndPoll(String token, Analyzer analyzer)
focal_class.class_method_signature: LuceneIndex.isExcludedProperty(PropertyRestriction pr,
                                                IndexingRule rule)
focal_class.full_signature: private static boolean isExcludedProperty(PropertyRestriction pr,
                                                IndexingRule rule)
focal_class.identifier: isExcludedProperty
focal_class.modifiers: private static
focal_class.parameters: (PropertyRestriction pr,
                                                IndexingRule rule)
focal_class.return: boolean
focal_class.signature: boolean isExcludedProperty(PropertyRestriction pr,
                                                IndexingRule rule)
focal_class.class_method_signature: LuceneIndex.includePropertyType(int type, IndexingRule rule)
focal_class.full_signature: private static boolean includePropertyType(int type, IndexingRule rule)
focal_class.identifier: includePropertyType
focal_class.modifiers: private static
focal_class.parameters: (int type, IndexingRule rule)
focal_class.return: boolean
focal_class.signature: boolean includePropertyType(int type, IndexingRule rule)
focal_class.class_method_signature: LuceneIndex.addReferenceConstraint(String uuid, List<Query> qs,
              IndexReader reader)
focal_class.full_signature: private static void addReferenceConstraint(String uuid, List<Query> qs,
              IndexReader reader)
focal_class.identifier: addReferenceConstraint
focal_class.modifiers: private static
focal_class.parameters: (String uuid, List<Query> qs,
              IndexReader reader)
focal_class.return: void
focal_class.signature: void addReferenceConstraint(String uuid, List<Query> qs,
              IndexReader reader)
focal_class.class_method_signature: LuceneIndex.addNodeTypeConstraints(List<Query> qs, Filter filter)
focal_class.full_signature: private static void addNodeTypeConstraints(List<Query> qs, Filter filter)
focal_class.identifier: addNodeTypeConstraints
focal_class.modifiers: private static
focal_class.parameters: (List<Query> qs, Filter filter)
focal_class.return: void
focal_class.signature: void addNodeTypeConstraints(List<Query> qs, Filter filter)
focal_class.class_method_signature: LuceneIndex.getFullTextQuery(FullTextExpression ft, final Analyzer analyzer, final IndexReader reader)
focal_class.full_signature: static Query getFullTextQuery(FullTextExpression ft, final Analyzer analyzer, final IndexReader reader)
focal_class.identifier: getFullTextQuery
focal_class.modifiers: static
focal_class.parameters: (FullTextExpression ft, final Analyzer analyzer, final IndexReader reader)
focal_class.return: Query
focal_class.signature: Query getFullTextQuery(FullTextExpression ft, final Analyzer analyzer, final IndexReader reader)
focal_class.class_method_signature: LuceneIndex.tokenToQuery(String text, String fieldName, Analyzer analyzer, IndexReader reader)
focal_class.full_signature: static Query tokenToQuery(String text, String fieldName, Analyzer analyzer, IndexReader reader)
focal_class.identifier: tokenToQuery
focal_class.modifiers: static
focal_class.parameters: (String text, String fieldName, Analyzer analyzer, IndexReader reader)
focal_class.return: Query
focal_class.signature: Query tokenToQuery(String text, String fieldName, Analyzer analyzer, IndexReader reader)
focal_class.class_method_signature: LuceneIndex.hasFulltextToken(List<String> tokens)
focal_class.full_signature: private static boolean hasFulltextToken(List<String> tokens)
focal_class.identifier: hasFulltextToken
focal_class.modifiers: private static
focal_class.parameters: (List<String> tokens)
focal_class.return: boolean
focal_class.signature: boolean hasFulltextToken(List<String> tokens)
focal_class.class_method_signature: LuceneIndex.hasFulltextToken(String token)
focal_class.full_signature: private static boolean hasFulltextToken(String token)
focal_class.identifier: hasFulltextToken
focal_class.modifiers: private static
focal_class.parameters: (String token)
focal_class.return: boolean
focal_class.signature: boolean hasFulltextToken(String token)
focal_class.class_method_signature: LuceneIndex.tokenize(String text, Analyzer analyzer)
focal_class.full_signature: static List<String> tokenize(String text, Analyzer analyzer)
focal_class.identifier: tokenize
focal_class.modifiers: static
focal_class.parameters: (String text, Analyzer analyzer)
focal_class.return: List<String>
focal_class.signature: List<String> tokenize(String text, Analyzer analyzer)
focal_class.class_method_signature: LuceneIndex.getNodeAggregator()
focal_class.full_signature: @Override public NodeAggregator getNodeAggregator()
focal_class.identifier: getNodeAggregator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: NodeAggregator
focal_class.signature: NodeAggregator getNodeAggregator()
focal_method.body: static List<String> tokenize(String text, Analyzer analyzer) {
          List<String> tokens = new ArrayList<String>();
          TokenStream stream = null;
          try {
              stream = analyzer.tokenStream(FieldNames.FULLTEXT,
                      new StringReader(text));
              CharTermAttribute termAtt = stream
                      .addAttribute(CharTermAttribute.class);
              OffsetAttribute offsetAtt = stream
                      .addAttribute(OffsetAttribute.class);
              // TypeAttribute type = stream.addAttribute(TypeAttribute.class);
  
              stream.reset();
  
              int poz = 0;
              boolean hasFulltextToken = false;
              StringBuilder token = new StringBuilder();
              while (stream.incrementToken()) {
                  String term = termAtt.toString();
                  int start = offsetAtt.startOffset();
                  int end = offsetAtt.endOffset();
                  if (start > poz) {
                      for (int i = poz; i < start; i++) {
                          for (char c : fulltextTokens) {
                              if (c == text.charAt(i)) {
                                  token.append(c);
                                  hasFulltextToken = true;
                              }
                          }
                      }
                  }
                  poz = end;
                  if (hasFulltextToken) {
                      token.append(term);
                      hasFulltextToken = false;
                  } else {
                      if (token.length() > 0) {
                          tokens.add(token.toString());
                      }
                      token = new StringBuilder();
                      token.append(term);
                  }
              }
              // consume to the end of the string
              if (poz < text.length()) {
                  for (int i = poz; i < text.length(); i++) {
                      for (char c : fulltextTokens) {
                          if (c == text.charAt(i)) {
                              token.append(c);
                          }
                      }
                  }
              }
              if (token.length() > 0) {
                  tokens.add(token.toString());
              }
              stream.end();
          } catch (IOException e) {
              LOG.error("Building fulltext query failed", e.getMessage());
              return null;
          } finally {
              try {
                  if (stream != null) {
                      stream.close();
                  }
              } catch (IOException e) {
                  // ignore
              }
          }
          return tokens;
      }
focal_method.class_method_signature: LuceneIndex.tokenize(String text, Analyzer analyzer)
focal_method.full_signature: static List<String> tokenize(String text, Analyzer analyzer)
focal_method.identifier: tokenize
focal_method.invocations: tokenStream addAttribute addAttribute reset incrementToken toString startOffset endOffset charAt append append length add toString append length length charAt append length add toString end error getMessage close
focal_method.modifiers: static
focal_method.parameters: (String text, Analyzer analyzer)
focal_method.return: List<String>
focal_method.signature: List<String> tokenize(String text, Analyzer analyzer)