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

« back to all changes in this revision

Viewing changes to solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.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
 
/**
2
 
/**
3
 
 * Licensed to the Apache Software Foundation (ASF) under one or more
4
 
 * contributor license agreements.  See the NOTICE file distributed with
5
 
 * this work for additional information regarding copyright ownership.
6
 
 * The ASF licenses this file to You under the Apache License, Version 2.0
7
 
 * (the "License"); you may not use this file except in compliance with
8
 
 * the License.  You may obtain a copy of the License at
9
 
 *
10
 
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 
 *
12
 
 * Unless required by applicable law or agreed to in writing, software
13
 
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 
 * See the License for the specific language governing permissions and
16
 
 * limitations under the License.
17
 
 */
18
 
 
19
 
package org.apache.solr.common.params;
20
 
 
21
 
import java.util.Locale;
22
 
 
23
 
/**
24
 
 * @since solr 1.3
25
 
 */
26
 
public interface CoreAdminParams 
27
 
{
28
 
  /** What Core are we talking about **/
29
 
  public final static String CORE = "core";
30
 
 
31
 
  /** Persistent -- should it save the cores state? **/
32
 
  public final static String PERSISTENT = "persistent";
33
 
  
34
 
  /** If you rename something, what is the new name **/
35
 
  public final static String NAME = "name";
36
 
 
37
 
  /** If you rename something, what is the new name **/
38
 
  public final static String DATA_DIR = "dataDir";
39
 
 
40
 
  /** Name of the other core in actions involving 2 cores **/
41
 
  public final static String OTHER = "other";
42
 
 
43
 
  /** What action **/
44
 
  public final static String ACTION = "action";
45
 
  
46
 
  /** If you specify a schema, what is its name **/
47
 
  public final static String SCHEMA = "schema";
48
 
  
49
 
  /** If you specify a config, what is its name **/
50
 
  public final static String CONFIG = "config";
51
 
  
52
 
  /** Specifies a core instance dir. */
53
 
  public final static String INSTANCE_DIR = "instanceDir";
54
 
 
55
 
  /** If you specify a file, what is its name **/
56
 
  public final static String FILE = "file";
57
 
  
58
 
  /** If you merge indexes, what are the index directories.
59
 
   * The directories are specified by multiple indexDir parameters. */
60
 
  public final static String INDEX_DIR = "indexDir";
61
 
 
62
 
  /** If you merge indexes, what is the source core's name
63
 
   * More than one source core can be specified by multiple srcCore parameters */
64
 
  public final static String SRC_CORE = "srcCore";
65
 
 
66
 
  /** The collection name in solr cloud */
67
 
  public final static String COLLECTION = "collection";
68
 
 
69
 
  /** The shard id in solr cloud */
70
 
  public final static String SHARD = "shard";
71
 
  
72
 
  /** Prefix for core property name=value pair **/
73
 
  public final static String PROPERTY_PREFIX = "property.";
74
 
 
75
 
  /** If you unload a core, delete the index too */
76
 
  public final static String DELETE_INDEX = "deleteIndex";
77
 
 
78
 
  public enum CoreAdminAction {
79
 
    STATUS,  
80
 
    LOAD,
81
 
    UNLOAD,
82
 
    RELOAD,
83
 
    CREATE,
84
 
    PERSIST,
85
 
    SWAP,
86
 
    RENAME,
87
 
    @Deprecated
88
 
    ALIAS,
89
 
    MERGEINDEXES;
90
 
    
91
 
    public static CoreAdminAction get( String p )
92
 
    {
93
 
      if( p != null ) {
94
 
        try {
95
 
          return CoreAdminAction.valueOf( p.toUpperCase(Locale.ENGLISH) );
96
 
        }
97
 
        catch( Exception ex ) {}
98
 
      }
99
 
      return null; 
100
 
    }
101
 
  }
102
 
}