~slub.team/goobi-indexserver/3.x

« back to all changes in this revision

Viewing changes to lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/directory/Consts.java

  • Committer: Sebastian Meyer
  • Date: 2012-08-03 09:12:40 UTC
  • Revision ID: sebastian.meyer@slub-dresden.de-20120803091240-x6861b0vabq1xror
Remove Lucene and Solr source code and add patches instead
Fix Bug #985487: Auto-suggestion for the search interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.apache.lucene.facet.taxonomy.directory;
2
 
 
3
 
import org.apache.lucene.document.FieldSelector;
4
 
import org.apache.lucene.document.FieldSelectorResult;
5
 
 
6
 
/**
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
13
 
 *
14
 
 *     http://www.apache.org/licenses/LICENSE-2.0
15
 
 *
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.
21
 
 */
22
 
 
23
 
/**
24
 
 * @lucene.experimental
25
 
 */
26
 
abstract class Consts {
27
 
 
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();
32
 
 
33
 
  /**
34
 
   * The following is a "field selector", an object which tells Lucene to
35
 
   * extract only a single field rather than a whole document.
36
 
   */
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;
41
 
      }
42
 
      return FieldSelectorResult.NO_LOAD;
43
 
    }  
44
 
  };
45
 
 
46
 
  /**
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
49
 
   * character.
50
 
   * <P>
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.
54
 
   */
55
 
  //static final char DEFAULT_DELIMITER = '\uFFFE';
56
 
  static final char DEFAULT_DELIMITER = '\uF749';
57
 
  
58
 
}