Java Doc for Field.java in  » Net » lucene-connector » org » apache » lucene » document » 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 » Net » lucene connector » org.apache.lucene.document 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.lucene.document.AbstractField
      org.apache.lucene.document.Field

Field
final public class Field extends AbstractField implements Fieldable,Serializable(Code)
A field is a section of a Document. Each field has two parts, a name and a value. Values may be free text, provided as a String or as a Reader, or they may be atomic keywords, which are not further processed. Such keywords may be used to represent dates, urls, etc. Fields are optionally stored in the index, so that they may be returned with hits on the document.

Inner Class :final public static class Store extends Parameter implements Serializable
Inner Class :final public static class Index extends Parameter implements Serializable
Inner Class :final public static class TermVector extends Parameter implements Serializable


Constructor Summary
public  Field(String name, String value, Store store, Index index)
     Create a field by specifying its name, value and how it will be saved in the index.
public  Field(String name, String value, Store store, Index index, TermVector termVector)
     Create a field by specifying its name, value and how it will be saved in the index.
public  Field(String name, Reader reader)
     Create a tokenized and indexed field that is not stored.
public  Field(String name, Reader reader, TermVector termVector)
     Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
public  Field(String name, TokenStream tokenStream)
     Create a tokenized and indexed field that is not stored.
public  Field(String name, TokenStream tokenStream, TermVector termVector)
     Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
public  Field(String name, byte[] value, Store store)
     Create a stored field with binary value.

Method Summary
public  byte[]binaryValue()
     The value of the field in Binary, or null.
public  ReaderreaderValue()
     The value of the field as a Reader, or null.
public  voidsetValue(String value)
    

Expert: change the value of this field.

public  voidsetValue(Reader value)
     Expert: change the value of this field.
public  voidsetValue(byte[] value)
     Expert: change the value of this field.
public  voidsetValue(TokenStream value)
     Expert: change the value of this field.
public  StringstringValue()
     The value of the field as a String, or null.
public  TokenStreamtokenStreamValue()
     The value of the field as a TokesStream, or null.


Constructor Detail
Field
public Field(String name, String value, Store store, Index index)(Code)
Create a field by specifying its name, value and how it will be saved in the index. Term vectors will not be stored in the index.
Parameters:
  name - The name of the field
Parameters:
  value - The string to process
Parameters:
  store - Whether value should be stored in the index
Parameters:
  index - Whether the field should be indexed, and if so, if it shouldbe tokenized before indexing
throws:
  NullPointerException - if name or value is null
throws:
  IllegalArgumentException - if the field is neither stored nor indexed



Field
public Field(String name, String value, Store store, Index index, TermVector termVector)(Code)
Create a field by specifying its name, value and how it will be saved in the index.
Parameters:
  name - The name of the field
Parameters:
  value - The string to process
Parameters:
  store - Whether value should be stored in the index
Parameters:
  index - Whether the field should be indexed, and if so, if it shouldbe tokenized before indexing
Parameters:
  termVector - Whether term vector should be stored
throws:
  NullPointerException - if name or value is null
throws:
  IllegalArgumentException - in any of the following situations:
  • the field is neither stored nor indexed
  • the field is not indexed but termVector is TermVector.YES



Field
public Field(String name, Reader reader)(Code)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until IndexWriter.addDocument(Document) has been called.
Parameters:
  name - The name of the field
Parameters:
  reader - The reader with the content
throws:
  NullPointerException - if name or reader is null



Field
public Field(String name, Reader reader, TermVector termVector)(Code)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until IndexWriter.addDocument(Document) has been called.
Parameters:
  name - The name of the field
Parameters:
  reader - The reader with the content
Parameters:
  termVector - Whether term vector should be stored
throws:
  NullPointerException - if name or reader is null



Field
public Field(String name, TokenStream tokenStream)(Code)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until IndexWriter.addDocument(Document) has been called.
Parameters:
  name - The name of the field
Parameters:
  tokenStream - The TokenStream with the content
throws:
  NullPointerException - if name or tokenStream is null



Field
public Field(String name, TokenStream tokenStream, TermVector termVector)(Code)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until IndexWriter.addDocument(Document) has been called.
Parameters:
  name - The name of the field
Parameters:
  tokenStream - The TokenStream with the content
Parameters:
  termVector - Whether term vector should be stored
throws:
  NullPointerException - if name or tokenStream is null



Field
public Field(String name, byte[] value, Store store)(Code)
Create a stored field with binary value. Optionally the value may be compressed.
Parameters:
  name - The name of the field
Parameters:
  value - The binary value
Parameters:
  store - How value should be stored (compressed or not)
throws:
  IllegalArgumentException - if store is Store.NO




Method Detail
binaryValue
public byte[] binaryValue()(Code)
The value of the field in Binary, or null. If null, the Reader value, String value, or TokenStream value is used. Exactly one of stringValue(), readerValue(), binaryValue(), and tokenStreamValue() must be set.



readerValue
public Reader readerValue()(Code)
The value of the field as a Reader, or null. If null, the String value, binary value, or TokenStream value is used. Exactly one of stringValue(), readerValue(), binaryValue(), and tokenStreamValue() must be set.



setValue
public void setValue(String value)(Code)

Expert: change the value of this field. This can be used during indexing to re-use a single Field instance to improve indexing speed by avoiding GC cost of new'ing and reclaiming Field instances. Typically a single Document instance is re-used as well. This helps most on small documents.

Note that you should only use this method after the Field has been consumed (ie, the Document containing this Field has been added to the index). Also, each Field instance should only be used once within a single Document instance. See ImproveIndexingSpeed for details.




setValue
public void setValue(Reader value)(Code)
Expert: change the value of this field. See setValue(String).



setValue
public void setValue(byte[] value)(Code)
Expert: change the value of this field. See setValue(String).



setValue
public void setValue(TokenStream value)(Code)
Expert: change the value of this field. See setValue(String).



stringValue
public String stringValue()(Code)
The value of the field as a String, or null. If null, the Reader value, binary value, or TokenStream value is used. Exactly one of stringValue(), readerValue(), binaryValue(), and tokenStreamValue() must be set.



tokenStreamValue
public TokenStream tokenStreamValue()(Code)
The value of the field as a TokesStream, or null. If null, the Reader value, String value, or binary value is used. Exactly one of stringValue(), readerValue(), binaryValue(), and tokenStreamValue() must be set.



Fields inherited from org.apache.lucene.document.AbstractField
protected float boost(Code)(Java Doc)
protected Object fieldsData(Code)(Java Doc)
protected boolean isBinary(Code)(Java Doc)
protected boolean isCompressed(Code)(Java Doc)
protected boolean isIndexed(Code)(Java Doc)
protected boolean isStored(Code)(Java Doc)
protected boolean isTokenized(Code)(Java Doc)
protected boolean lazy(Code)(Java Doc)
protected String name(Code)(Java Doc)
protected boolean omitNorms(Code)(Java Doc)
protected boolean storeOffsetWithTermVector(Code)(Java Doc)
protected boolean storePositionWithTermVector(Code)(Java Doc)
protected boolean storeTermVector(Code)(Java Doc)

Methods inherited from org.apache.lucene.document.AbstractField
public float getBoost()(Code)(Java Doc)
public boolean getOmitNorms()(Code)(Java Doc)
final public boolean isBinary()(Code)(Java Doc)
final public boolean isCompressed()(Code)(Java Doc)
final public boolean isIndexed()(Code)(Java Doc)
public boolean isLazy()(Code)(Java Doc)
public boolean isStoreOffsetWithTermVector()(Code)(Java Doc)
public boolean isStorePositionWithTermVector()(Code)(Java Doc)
final public boolean isStored()(Code)(Java Doc)
final public boolean isTermVectorStored()(Code)(Java Doc)
final public boolean isTokenized()(Code)(Java Doc)
public String name()(Code)(Java Doc)
public void setBoost(float boost)(Code)(Java Doc)
public void setOmitNorms(boolean omitNorms)(Code)(Java Doc)
protected void setStoreTermVector(Field.TermVector termVector)(Code)(Java Doc)
final public String toString()(Code)(Java Doc)

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.