1
package org.apache.lucene.facet.taxonomy.directory;
3
import org.apache.lucene.document.FieldSelector;
4
import org.apache.lucene.document.FieldSelectorResult;
7
* Licensed to the Apache Software Foundation (ASF) under one or more
8
* contributor license agreements. See the NOTICE file distributed with
9
* this work for additional information regarding copyright ownership.
10
* The ASF licenses this file to You under the Apache License, Version 2.0
11
* (the "License"); you may not use this file except in compliance with
12
* the License. You may obtain a copy of the License at
14
* http://www.apache.org/licenses/LICENSE-2.0
16
* Unless required by applicable law or agreed to in writing, software
17
* distributed under the License is distributed on an "AS IS" BASIS,
18
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
* See the License for the specific language governing permissions and
20
* limitations under the License.
24
* @lucene.experimental
26
abstract class Consts {
28
static final String FULL = "$full_path$";
29
static final String FIELD_PAYLOADS = "$payloads$";
30
static final String PAYLOAD_PARENT = "p";
31
static final char[] PAYLOAD_PARENT_CHARS = PAYLOAD_PARENT.toCharArray();
34
* The following is a "field selector", an object which tells Lucene to
35
* extract only a single field rather than a whole document.
37
public static final FieldSelector fullPathSelector = new FieldSelector() {
38
public FieldSelectorResult accept(String fieldName) {
39
if (fieldName.equals(FULL)) {
40
return FieldSelectorResult.LOAD_AND_BREAK;
42
return FieldSelectorResult.NO_LOAD;
47
* Delimiter used for creating the full path of a category from the list of
48
* its labels from root. It is forbidden for labels to contain this
51
* Originally, we used \uFFFE, officially a "unicode noncharacter" (invalid
52
* unicode character) for this purpose. Recently, we switched to the
53
* "private-use" character \uF749.
55
//static final char DEFAULT_DELIMITER = '\uFFFE';
56
static final char DEFAULT_DELIMITER = '\uF749';