org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer Java Examples
The following examples show how to use
org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PathHierarchyTokenizerFactory.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public Tokenizer create() { if (reverse) { return new ReversePathHierarchyTokenizer(bufferSize, delimiter, replacement, skip); } return new PathHierarchyTokenizer(bufferSize, delimiter, replacement, skip); }
Example #2
Source File: URLTokenizer.java From elasticsearch-analysis-url with Apache License 2.0 | 5 votes |
/** * Retrieve tokens representing the host of the given URL * @param url URL to be tokenized * @param partStringRaw raw (not url decoded) string containing the host * @param partString potentially url decoded string containing the host * @return host tokens * @throws IOException */ private List<Token> getHostTokens(String url, String partStringRaw, String partString) throws IOException { int start = getStartIndex(url, partStringRaw); if (!tokenizeHost || InetAddresses.isInetAddress(partString)) { int end = getEndIndex(start, partStringRaw); return Collections.singletonList(new Token(partString, URLPart.HOST, start, end)); } return tokenize(URLPart.HOST, addReader(new ReversePathHierarchyTokenizer('.', '.'), new StringReader(partString)), start); }
Example #3
Source File: PathHierarchyTokenizerFactory.java From crate with Apache License 2.0 | 5 votes |
@Override public Tokenizer create() { if (reverse) { return new ReversePathHierarchyTokenizer(bufferSize, delimiter, replacement, skip); } return new PathHierarchyTokenizer(bufferSize, delimiter, replacement, skip); }