/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/ |
H A D | PrefixFilter.java | 23 * A Filter that restricts search results to values that have a matching prefix in a given 28 public PrefixFilter(Term prefix) { argument 29 super(new PrefixQuery(prefix));
|
H A D | PrefixQuery.java | 26 /** A Query that matches documents containing terms with a specified prefix. A PrefixQuery 33 private Term prefix; field in class:PrefixQuery 35 /** Constructs a query for terms starting with <code>prefix</code>. */ 36 public PrefixQuery(Term prefix) { argument 37 this.prefix = prefix; 40 /** Returns the prefix of this query. */ 41 public Term getPrefix() { return prefix; } 45 return new PrefixTermEnum(reader, prefix); 52 if (!prefix [all...] |
H A D | PrefixTermEnum.java | 27 * specified prefix filter term. 35 private final Term prefix; field in class:PrefixTermEnum 38 public PrefixTermEnum(IndexReader reader, Term prefix) throws IOException { argument 39 this.prefix = prefix; 41 setEnum(reader.terms(new Term(prefix.field(), prefix.text()))); 55 return prefix; 60 if (term.field() == prefix.field() && term.text().startsWith(prefix [all...] |
H A D | FuzzyTermEnum.java | 45 private final String prefix; field in class:FuzzyTermEnum 51 * Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f. 66 * Creates a FuzzyTermEnum with an empty prefix. 82 * Constructor for enumeration of all terms from specified <code>reader</code> which share a prefix of 92 * @param prefixLength Length of required common prefix. Default value is 0. 110 //The prefix could be longer than the word. 116 this.prefix = searchTerm.text().substring(0, realPrefixLength); 121 setEnum(reader.terms(new Term(searchTerm.field(), prefix))); 130 if (field == term.field() && term.text().startsWith(prefix)) { 131 final String target = term.text().substring(prefix [all...] |
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/search/results/ |
H A D | FacetResult.java | 71 * @param prefix prefix for each result line 74 public String toString(String prefix) { argument 80 sb.append(nl).append(prefix).append("Request: ").append( 86 sb.append(nl).append(prefix).append("Num valid Descendants (up to specified depth): ").append( 92 sb.append(nl).append(this.rootNode.toString(prefix + "\t"));
|
H A D | FacetResultNode.java | 38 * @param prefix prefix for each result line 40 public String toString(String prefix); argument
|
/lucene-3.6.0/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/ |
H A D | RegexCapabilities.java | 42 * A wise prefix implementation can reduce the term enumeration (and thus increase performance) 45 * @return static non-regex prefix of the pattern last passed to {@link #compile}. May return null. 47 String prefix(); method in interface:RegexCapabilities
|
H A D | JakartaRegexpCapabilities.java | 28 * {@link #prefix} implementation which can offer performance gains under 30 * it doesn't always provide a prefix even if one would exist. 44 prefixField = REProgram.class.getDeclaredField("prefix"); 90 public String prefix() { method in class:JakartaRegexpCapabilities 92 final char[] prefix; 94 prefix = (char[]) getPrefixMethod.invoke(regexp.getProgram()); 96 prefix = (char[]) prefixField.get(regexp.getProgram()); 100 return prefix == null ? null : new String(prefix); 102 // if we cannot get the prefix, retur [all...] |
H A D | JavaUtilRegexCapabilities.java | 26 * {@link #prefix} that queries using this implementation will enumerate and 77 public String prefix() { method in class:JavaUtilRegexCapabilities
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/ |
H A D | NamedThreadFactory.java | 25 * A default {@link ThreadFactory} implementation that accepts the name prefix 40 * @param threadNamePrefix the name prefix assigned to each thread created. 50 private static String checkPrefix(String prefix) { argument 51 return prefix == null || prefix.length() == 0 ? "Lucene" : prefix;
|
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/util/ |
H A D | StemmerUtil.java | 27 * @param prefix Prefix string to test 28 * @return true if <code>s</code> starts with <code>prefix</code> 30 public static boolean startsWith(char s[], int len, String prefix) { argument 31 final int prefixLen = prefix.length(); 35 if (s[i] != prefix.charAt(i))
|
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ |
H A D | RepSumByPrefTask.java | 28 * Report by-name-prefix statistics aggregated by name. 37 protected String prefix; field in class:RepSumByPrefTask 44 System.out.println("------------> Report Sum By Prefix ("+prefix+") ("+ 57 if (stat1.getElapsed()>=0 && stat1.getTask().getName().startsWith(prefix)) { // only ended tasks with proper name 78 public void setPrefix(String prefix) { argument 79 this.prefix = prefix; 87 return super.toString()+" "+prefix;
|
/lucene-3.6.0/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/ |
H A D | TrecTopicsReader.java | 114 // read until finding a line that starts with the specified prefix 115 private StringBuilder read (BufferedReader reader, String prefix, StringBuilder sb, boolean collectMatchLine, boolean collectAll) throws IOException { argument 123 if (line.startsWith(prefix)) {
|
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | ConstantScorePrefixQuery.java | 31 private final Term prefix; field in class:ConstantScorePrefixQuery 33 public ConstantScorePrefixQuery(Term prefix) { argument 34 this.prefix = prefix; 37 /** Returns the prefix for this query */ 38 public Term getPrefix() { return prefix; } 45 Query q = new ConstantScoreQuery(new PrefixFilter(prefix)); 55 if (!prefix.field().equals(field)) { 56 buffer.append(prefix.field()); 59 buffer.append(prefix [all...] |
H A D | PrefixFilter.java | 34 protected final Term prefix; field in class:PrefixFilter 36 PrefixFilter(Term prefix) { argument 37 this.prefix = prefix; 40 Term getPrefix() { return prefix; } 45 new PrefixGenerator(prefix) { 55 return o instanceof PrefixFilter && ((PrefixFilter)o).prefix.equals(this.prefix); 60 return 0xcecf7fe2 + prefix.hashCode(); 67 sb.append(prefix 83 protected final Term prefix; field in class:PrefixGenerator 85 PrefixGenerator(Term prefix) argument [all...] |
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/surround/query/ |
H A D | SrndPrefixQuery.java | 27 public SrndPrefixQuery(String prefix, boolean quoted, char truncator) { argument 29 this.prefix = prefix; 33 private final String prefix; field in class:SrndPrefixQuery 34 public String getPrefix() {return prefix;}
|
H A D | SrndTruncQuery.java | 42 private String prefix; field in class:SrndTruncQuery 70 prefix = truncated.substring(0, i); 86 int prefixLength = prefix.length(); 87 TermEnum enumerator = reader.terms(new Term(fieldName, prefix)); 94 if ((! text.startsWith(prefix)) || (! term.field().equals(fieldName))) {
|
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/miscellaneous/ |
H A D | PrefixAndSuffixAwareTokenFilter.java | 35 public PrefixAndSuffixAwareTokenFilter(TokenStream prefix, TokenStream input, TokenStream suffix) { argument 37 prefix = new PrefixAwareTokenFilter(prefix, input) { 43 this.suffix = new PrefixAwareTokenFilter(prefix, suffix) {
|
/lucene-3.6.0/solr/solrj/src/test/org/apache/solr/common/params/ |
H A D | ModifiableSolrParamsTest.java | 116 private void compareArrays(String prefix, argument 120 assertEquals(prefix + "length: ", expected.length, actual.length); 123 assertEquals(prefix + " index " + i, expected[i], actual[i]);
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/fst/ |
H A D | ByteSequenceOutputs.java | 62 // no common prefix 65 // output1 is a prefix of output2 68 // output2 is a prefix of output1 80 // no prefix removed 93 public BytesRef add(BytesRef prefix, BytesRef output) { argument 94 assert prefix != null; 96 if (prefix == NO_OUTPUT) { 99 return prefix; 101 assert prefix.length > 0; 103 BytesRef result = new BytesRef(prefix 112 write(BytesRef prefix, DataOutput out) argument [all...] |
H A D | IntSequenceOutputs.java | 62 // no common prefix 65 // output1 is a prefix of output2 68 // output2 is a prefix of output1 80 // no prefix removed 93 public IntsRef add(IntsRef prefix, IntsRef output) { argument 94 assert prefix != null; 96 if (prefix == NO_OUTPUT) { 99 return prefix; 101 assert prefix.length > 0; 103 IntsRef result = new IntsRef(prefix 112 write(IntsRef prefix, DataOutput out) argument [all...] |
H A D | NoOutputs.java | 70 public Object add(Object prefix, Object output) { argument 71 assert prefix == NO_OUTPUT: "got " + prefix; 77 public void write(Object prefix, DataOutput out) { argument
|
H A D | Outputs.java | 50 public abstract T add(T prefix, T output); argument
|
H A D | PositiveIntOutputs.java | 82 public Long add(Long prefix, Long output) { argument 83 assert valid(prefix); 85 if (prefix == NO_OUTPUT) { 88 return prefix; 90 return prefix + output;
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/ |
H A D | TestPrefixRandom.java | 35 * Generates random prefix queries, and validates against a simple impl. 79 /** a stupid prefix query that just blasts thru the terms */ 81 private final Term prefix; field in class:TestPrefixRandom.DumbPrefixQuery 85 prefix = term; 90 return new SimplePrefixTermEnum(reader, prefix); 94 private final Term prefix; field in class:TestPrefixRandom.DumbPrefixQuery.SimplePrefixTermEnum 97 private SimplePrefixTermEnum(IndexReader reader, Term prefix) throws IOException { argument 98 this.prefix = prefix; 99 setEnum(reader.terms(new Term(prefix 139 assertSame(String prefix) argument [all...] |