~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/index/params/FacetIndexingParams.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.index.params;
2
 
 
3
 
import java.io.Serializable;
4
 
 
5
 
import org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy;
6
 
import org.apache.lucene.facet.index.categorypolicy.PathPolicy;
7
 
import org.apache.lucene.facet.taxonomy.CategoryPath;
8
 
 
9
 
/**
10
 
 * Licensed to the Apache Software Foundation (ASF) under one or more
11
 
 * contributor license agreements.  See the NOTICE file distributed with
12
 
 * this work for additional information regarding copyright ownership.
13
 
 * The ASF licenses this file to You under the Apache License, Version 2.0
14
 
 * (the "License"); you may not use this file except in compliance with
15
 
 * the License.  You may obtain a copy of the License at
16
 
 *
17
 
 *     http://www.apache.org/licenses/LICENSE-2.0
18
 
 *
19
 
 * Unless required by applicable law or agreed to in writing, software
20
 
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 
 * See the License for the specific language governing permissions and
23
 
 * limitations under the License.
24
 
 */
25
 
 
26
 
/**
27
 
 * Parameters on how facets are to be written to the index. 
28
 
 * For example, which fields and terms are used to refer to the indexed posting list.
29
 
 * <P>
30
 
 * If non-default parameters were used during indexing, the same parameters
31
 
 * must also be passed during faceted search. This requirement is analogous
32
 
 * to the requirement during search to know which fields were indexed, and which
33
 
 * Analyzer was used on the text.
34
 
 * 
35
 
 * @lucene.experimental
36
 
 */
37
 
public interface FacetIndexingParams extends Serializable {
38
 
 
39
 
  /**
40
 
   * The name of the category-list to put this category in, or null if this
41
 
   * category should not be aggregatable.
42
 
   * <P>
43
 
   * By default, all categories are written to the same category list, but
44
 
   * applications which know in advance that in some situations only parts
45
 
   * of the category hierarchy needs to be counted can divide the categories
46
 
   * into two or more different category lists.
47
 
   * <P>
48
 
   * If null is returned for a category, it means that this category should
49
 
   * not appear in any category list, and thus counts for it cannot be
50
 
   * aggregated. This category can still be used for drill-down, even though
51
 
   * the count for it is not known.
52
 
   */
53
 
  public CategoryListParams getCategoryListParams(CategoryPath category);
54
 
 
55
 
  /**
56
 
   * Return info about all category lists in the index.
57
 
   * 
58
 
   * @see #getCategoryListParams(CategoryPath)
59
 
   */
60
 
  public Iterable<CategoryListParams> getAllCategoryListParams();
61
 
 
62
 
  // TODO (Facet): Add special cases of exact/non-exact category term-text
63
 
 
64
 
  /**
65
 
   * Return the drilldown Term-Text which does not need to do any allocations.
66
 
   * The number of chars set is returned.
67
 
   * <p>
68
 
   * Note: Make sure <code>buffer</code> is large enough.
69
 
   * @see CategoryPath#charsNeededForFullPath()
70
 
   */
71
 
  public int drillDownTermText(CategoryPath path, char[] buffer);
72
 
 
73
 
  /**
74
 
   * Get the partition size.
75
 
   * Same value should be used during the life time of an index.
76
 
   * At search time this value is compared with actual taxonomy size and their minimum is used.
77
 
   */
78
 
  public int getPartitionSize();
79
 
 
80
 
  /** 
81
 
   * Get the policy for indexing category <b>paths</b>, 
82
 
   * used for deciding how "high" to climb in taxonomy 
83
 
   * from a category when ingesting its category paths. 
84
 
   */
85
 
  public PathPolicy getPathPolicy();
86
 
 
87
 
  /** 
88
 
   * Get the policy for indexing category <b>ordinals</b>, 
89
 
   * used for deciding how "high" to climb in taxonomy 
90
 
   * from a category when ingesting its ordinals 
91
 
   */
92
 
  public OrdinalPolicy getOrdinalPolicy();
93
 
  
94
 
  /** 
95
 
   * Get the delimiter character used internally for drill-down terms 
96
 
   */ 
97
 
  public char getFacetDelimChar();
98
 
}