/opengrok/src/org/opensolaris/opengrok/search/context/ |
H A D | QueryMatchers.java | 101 String term = query.toString(query.getField()); 102 term = term.substring(1, term.length() - 1); //trim / from /regexp/ 103 matchers.add(new RegexpMatcher(term, true)); 128 Term term = query.getTerm(); 129 if (useTerm(term)) { 130 String text = term.text(); 131 if (isCaseInsensitive(term)) { 140 Term term 158 useTerm(Term term) argument 173 isCaseInsensitive(Term term) argument [all...] |
H A D | RegexpMatcher.java | 42 public RegexpMatcher(String term, boolean caseInsensitive) { argument 46 regexp = Pattern.compile(term, caseInsensitive ? Pattern.CASE_INSENSITIVE : 0 );
|
/opengrok/src/org/opensolaris/opengrok/search/ |
H A D | CustomQueryParser.java | 65 * Get a canonical form of a search term. This will convert the term to 69 * @param term the term to search for 70 * @return the canonical form of the search term, which matches how it is 76 private static String getCanonicalTerm(String field, String term) { argument 77 return isCaseSensitive(field) ? term : term.toLowerCase(); 84 protected Query getFuzzyQuery(String field, String term, float min) argument 86 return super.getFuzzyQuery(field, getCanonicalTerm(field, term), mi 90 getPrefixQuery(String field, String term) argument 108 getWildcardQuery(String field, String term) argument [all...] |
H A D | Summarizer.java | 178 // If we find a term that's in the query... 193 // SUM_CONTEXT beyond the last query-term. 224 // We found the series of search-term hits and added 230 // Add the words since the last hit-term insert. 307 CharTermAttribute term = ts.addAttribute(CharTermAttribute.class); 311 SToken t = new SToken(term.buffer(), 0, term.length(), offset.startOffset(), offset.endOffset());
|
/opengrok/test/org/opensolaris/opengrok/analysis/ |
H A D | PathTokenizerTest.java | 47 CharTermAttribute term = tokenizer.addAttribute(CharTermAttribute.class); 54 if ( term.toString().equals(".") ) { dots++;break; } 57 assertEquals("term", expected, term.toString());
|
H A D | JFlexTokenizerTest.java | 103 CharTermAttribute term = tokenizer.addAttribute(CharTermAttribute.class); 110 assertEquals("term", expected, term.toString()); 126 * indexed term in that case. 151 CharTermAttribute term = tokenizer.addAttribute(CharTermAttribute.class); 154 assertEquals("begin", term.toString()); 156 assertEquals("644", term.toString()); 158 assertEquals("test", term.toString());
|
/opengrok/test/org/opensolaris/opengrok/analysis/haskell/ |
H A D | HaskellSymbolTokenizerTest.java | 63 CharTermAttribute term = ts.addAttribute(CharTermAttribute.class); 66 l.add(term.toString());
|
/opengrok/test/org/opensolaris/opengrok/analysis/php/ |
H A D | PhpSymbolTokenizerTest.java | 61 CharTermAttribute term = ts.addAttribute(CharTermAttribute.class); 64 l.add(term.toString());
|
/opengrok/src/org/opensolaris/opengrok/index/ |
H A D | IndexDatabase.java | 383 "Couldn't find a start term for {0}, empty u field?", 399 while (uidIter != null && uidIter.term() != null 400 && uidIter.term().utf8ToString().startsWith(startuid)) { 562 * Remove a stale file (uidIter.term().text()) from the index database (and 568 String path = Util.uid2url(uidIter.term().utf8ToString()); 573 writer.deleteDocuments(new Term(QueryBuilder.U, uidIter.term())); 867 while (uidIter != null && uidIter.term() != null 868 && uidIter.term().compareTo(emptyBR) !=0 869 && uidIter.term().compareTo(buid) < 0) { 875 if (uidIter != null && uidIter.term() ! [all...] |
/opengrok/test/org/opensolaris/opengrok/search/context/ |
H A D | ContextTest.java | 81 String term = "qwerty"; 84 QueryBuilder qb = new QueryBuilder().setDefs(term); 89 qb = new QueryBuilder().setRefs(term); 94 qb = new QueryBuilder().setFreetext(term); 99 qb = new QueryBuilder().setHist(term); 104 qb = new QueryBuilder().setPath(term); 109 qb = new QueryBuilder().setHist(term).setFreetext(term); 142 // Search freetext for the term "def"
|
/opengrok/src/org/opensolaris/opengrok/web/ |
H A D | SearchHelper.java | 323 // Bug #3900: Check if this is a search for a single term, and that 324 // term is a definition. If that's the case, and we only have one match, 330 // one single definition term AND we have exactly one match AND there 360 private void getSuggestion(Term term, IndexReader ir, argument 362 if (term == null) { 365 String[] toks = TABSPACE.split(term.text(), 0); 368 SuggestWord[] words = checker.suggestSimilar(new Term(term.field(), tok),
|
/opengrok/egrok/src/org/opensolaris/opengrok/egrok/ui/ |
H A D | ResultsControl.java | 180 String term = line.substring(startidx + "<b>".length(), endidx); 184 result.append(term, courierNew);
|