Java Doc for IndexSchema.java in  » Search-Engine » apache-solr-1.2.0 » org » apache » solr » schema » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Search Engine » apache solr 1.2.0 » org.apache.solr.schema 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.solr.schema.IndexSchema

IndexSchema
final public class IndexSchema (Code)
IndexSchema contains information about the valid fields in an index and the types of those fields.
author:
   yonik
version:
   $Id: IndexSchema.java 542679 2007-05-29 22:28:21Z ryan $

Inner Class :abstract static class DynamicReplacement implements Comparable<DynamicReplacement>
Inner Class :final static class DynamicField extends DynamicReplacement
Inner Class :static class DynamicCopy extends DynamicReplacement
Inner Class :static class DynamicDestCopy extends DynamicCopy

Field Summary
final static  Loggerlog
    

Constructor Summary
public  IndexSchema(String schemaFile)
     Constructs a schema using the specified file name using the normal Config path directory searching rules.

Method Summary
public  AnalyzergetAnalyzer()
     Returns the Analyzer used when indexing documents for this index

This Analyzer is field (and dynamic field) name aware, and delegates to a field specific Analyzer based on the field type.

public  SchemaField[]getCopyFields(String sourceField)
     Get all copy fields, both the static and the dynamic ones.
public  StringgetDefaultSearchFieldName()
    
public  FieldTypegetDynamicFieldType(String fieldName)
    
public  SchemaFieldgetField(String fieldName)
    
public  SchemaFieldgetFieldOrNull(String fieldName)
     Returns the SchemaField that should be used for the specified field name, or null if none exists.
public  FieldTypegetFieldType(String fieldName)
     Returns the FieldType for the specified field name.
public  FieldTypegetFieldTypeNoEx(String fieldName)
     Returns the FieldType for the specified field name.

This method exists because it can be more efficient then IndexSchema.getField for dynamic fields if a full SchemaField isn't needed.


Parameters:
  fieldName - may be an explicitly created field, or a name thatexcercies a dynamic field.
public  Map<String, FieldType>getFieldTypes()
     Provides direct access to the Map containing all Field Types in the index, keyed on fild type name.
public  Map<String, SchemaField>getFields()
     Provides direct access to the Map containing all explicit (ie: non-dynamic) fields in the index, keyed on field name.
public  List<SchemaField>getFieldsWithDefaultValue()
    
public  InputStreamgetInputStream()
     Direct acess to the InputStream for the schemaFile used by this instance.
public  StringgetName()
    
public  AnalyzergetQueryAnalyzer()
     Returns the Analyzer used when searching this index

This Analyzer is field (and dynamic field) name aware, and delegates to a field specific Analyzer based on the field type.

public  StringgetQueryParserDefaultOperator()
    
public  Collection<SchemaField>getRequiredFields()
     Provides direct access to the List containing all required fields.
public  SimilaritygetSimilarity()
    
public  SolrQueryParsergetSolrQueryParser(String defaultField)
     A SolrQueryParser linked to this IndexSchema for field datatype information, and populated with default options from the <solrQueryParser> configuration for this IndexSchema.
public  SchemaFieldgetUniqueKeyField()
    
public  FieldablegetUniqueKeyField(org.apache.lucene.document.Document doc)
    
 floatgetVersion()
    
public  booleanhasExplicitField(String fieldName)
     Does the schema have the specified field defined explicitly, i.e.
public  StringprintableUniqueKey(org.apache.lucene.document.Document doc)
    

Field Detail
log
final static Logger log(Code)




Constructor Detail
IndexSchema
public IndexSchema(String schemaFile)(Code)
Constructs a schema using the specified file name using the normal Config path directory searching rules.
See Also:   Config.openResource




Method Detail
getAnalyzer
public Analyzer getAnalyzer()(Code)
Returns the Analyzer used when indexing documents for this index

This Analyzer is field (and dynamic field) name aware, and delegates to a field specific Analyzer based on the field type.




getCopyFields
public SchemaField[] getCopyFields(String sourceField)(Code)
Get all copy fields, both the static and the dynamic ones.
Parameters:
  sourceField - Array of fields to copy to.



getDefaultSearchFieldName
public String getDefaultSearchFieldName()(Code)
Name of the default search field specified in the schema file



getDynamicFieldType
public FieldType getDynamicFieldType(String fieldName)(Code)
Returns the FieldType of the best matching dynamic field for the specified field name
Parameters:
  fieldName - may be an explicitly created field, or a name thatexcercies a dynamic field.
throws:
  SolrException - if no such field exists
See Also:   IndexSchema.getField(String)
See Also:   IndexSchema.getFieldTypeNoEx



getField
public SchemaField getField(String fieldName)(Code)
Returns the SchemaField that should be used for the specified field name
Parameters:
  fieldName - may be an explicitly defined field, or a name thatmatches a dynamic field.
throws:
  SolrException - if no such field exists
See Also:   IndexSchema.getFieldType



getFieldOrNull
public SchemaField getFieldOrNull(String fieldName)(Code)
Returns the SchemaField that should be used for the specified field name, or null if none exists.
Parameters:
  fieldName - may be an explicitly defined field, or a name thatmatches a dynamic field.
See Also:   IndexSchema.getFieldType



getFieldType
public FieldType getFieldType(String fieldName)(Code)
Returns the FieldType for the specified field name.

This method exists because it can be more efficient then IndexSchema.getField for dynamic fields if a full SchemaField isn't needed.


Parameters:
  fieldName - may be an explicitly created field, or a name thatexcercies a dynamic field.
throws:
  SolrException - if no such field exists
See Also:   IndexSchema.getField(String)
See Also:   IndexSchema.getFieldTypeNoEx



getFieldTypeNoEx
public FieldType getFieldTypeNoEx(String fieldName)(Code)
Returns the FieldType for the specified field name.

This method exists because it can be more efficient then IndexSchema.getField for dynamic fields if a full SchemaField isn't needed.


Parameters:
  fieldName - may be an explicitly created field, or a name thatexcercies a dynamic field. null if field is not defined.
See Also:   IndexSchema.getField(String)
See Also:   IndexSchema.getFieldTypeNoEx



getFieldTypes
public Map<String, FieldType> getFieldTypes()(Code)
Provides direct access to the Map containing all Field Types in the index, keyed on fild type name.

Modifying this Map (or any item in it) will affect the real schema




getFields
public Map<String, SchemaField> getFields()(Code)
Provides direct access to the Map containing all explicit (ie: non-dynamic) fields in the index, keyed on field name.

Modifying this Map (or any item in it) will affect the real schema




getFieldsWithDefaultValue
public List<SchemaField> getFieldsWithDefaultValue()(Code)
Provides direct access to the List containing all fields with a default value



getInputStream
public InputStream getInputStream()(Code)
Direct acess to the InputStream for the schemaFile used by this instance.
See Also:   Config.openResource



getName
public String getName()(Code)
The Name of this schema (as specified in the schema file)



getQueryAnalyzer
public Analyzer getQueryAnalyzer()(Code)
Returns the Analyzer used when searching this index

This Analyzer is field (and dynamic field) name aware, and delegates to a field specific Analyzer based on the field type.




getQueryParserDefaultOperator
public String getQueryParserDefaultOperator()(Code)
default operator ("AND" or "OR") for QueryParser



getRequiredFields
public Collection<SchemaField> getRequiredFields()(Code)
Provides direct access to the List containing all required fields. This list contains all fields with default values.



getSimilarity
public Similarity getSimilarity()(Code)
Returns the Similarity used for this index



getSolrQueryParser
public SolrQueryParser getSolrQueryParser(String defaultField)(Code)
A SolrQueryParser linked to this IndexSchema for field datatype information, and populated with default options from the <solrQueryParser> configuration for this IndexSchema.
Parameters:
  defaultField - if non-null overrides the schema default



getUniqueKeyField
public SchemaField getUniqueKeyField()(Code)
Unique Key field specified in the schema file null if this schema has no unique key field



getUniqueKeyField
public Fieldable getUniqueKeyField(org.apache.lucene.document.Document doc)(Code)
The raw (field type encoded) value of the Unique Key field for the specified Document null if this schema has no unique key field
See Also:   IndexSchema.printableUniqueKey



getVersion
float getVersion()(Code)



hasExplicitField
public boolean hasExplicitField(String fieldName)(Code)
Does the schema have the specified field defined explicitly, i.e. not as a result of a copyField declaration with a wildcard? We consider it explicitly defined if it matches a field or dynamicField declaration.
Parameters:
  fieldName - true if explicitly declared in the schema.



printableUniqueKey
public String printableUniqueKey(org.apache.lucene.document.Document doc)(Code)
The printable value of the Unique Key field for the specified Document null if this schema has no unique key field



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.