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


org.apache.lucene.search.FieldCache

All known Subclasses:   org.apache.lucene.search.FieldCacheImpl,
FieldCache
public interface FieldCache (Code)
Expert: Maintains caches of term values.

Created: May 19, 2004 11:13:14 AM
author:
   Tim Jones (Nacimiento Software)
since:
   lucene 1.4
version:
   $Id: FieldCache.java 544546 2007-06-05 16:29:35Z doronc $


Inner Class :public static class StringIndex
Inner Class :public interface ByteParser
Inner Class :public interface ShortParser
Inner Class :public interface IntParser
Inner Class :public interface FloatParser

Field Summary
public static  FieldCacheDEFAULT
     Expert: The cache used internally by sorting and range query classes.
final public static  intSTRING_INDEX
     Indicator for StringIndex values in the cache.


Method Summary
public  ObjectgetAuto(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found reads field to see if it contains integers, floats or strings, and then calls one of the other methods in this class to get the values.
public  byte[]getBytes(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the single byte values.
public  byte[]getBytes(IndexReader reader, String field, ByteParser parser)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the bytes.
Parameters:
  parser - Computes byte for string values.
public  Comparable[]getCustom(IndexReader reader, String field, SortComparator comparator)
     Checks the internal cache for an appropriate entry, and if none is found reads the terms out of field and calls the given SortComparator to get the sort values.
public  float[]getFloats(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the floats.
public  float[]getFloats(IndexReader reader, String field, FloatParser parser)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the floats.
Parameters:
  parser - Computes float for string values.
public  int[]getInts(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the integers.
public  int[]getInts(IndexReader reader, String field, IntParser parser)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the integers.
Parameters:
  parser - Computes integer for string values.
public  short[]getShorts(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the shorts.
public  short[]getShorts(IndexReader reader, String field, ShortParser parser)
     Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the shorts.
Parameters:
  parser - Computes short for string values.
public  StringIndexgetStringIndex(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the strings.
public  String[]getStrings(IndexReader reader, String field)
     Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the strings.

Field Detail
DEFAULT
public static FieldCache DEFAULT(Code)
Expert: The cache used internally by sorting and range query classes.



STRING_INDEX
final public static int STRING_INDEX(Code)
Indicator for StringIndex values in the cache.





Method Detail
getAuto
public Object getAuto(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found reads field to see if it contains integers, floats or strings, and then calls one of the other methods in this class to get the values. For string values, a StringIndex is returned. After calling this method, there is an entry in the cache for both type AUTO and the actual found type.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the values. int[], float[] or StringIndex.
throws:
  IOException - If any error occurs.



getBytes
public byte[] getBytes(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the single byte values. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getBytes
public byte[] getBytes(IndexReader reader, String field, ByteParser parser) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the bytes.
Parameters:
  parser - Computes byte for string values. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getCustom
public Comparable[] getCustom(IndexReader reader, String field, SortComparator comparator) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found reads the terms out of field and calls the given SortComparator to get the sort values. A hit in the cache will happen if reader, field, and comparator are the same (using equals()) as a previous call to this method.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the values.
Parameters:
  comparator - Used to convert terms into something to sort by. Array of sort objects, one for each document.
throws:
  IOException - If any error occurs.



getFloats
public float[] getFloats(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the floats. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getFloats
public float[] getFloats(IndexReader reader, String field, FloatParser parser) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the floats.
Parameters:
  parser - Computes float for string values. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getInts
public int[] getInts(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the integers. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getInts
public int[] getInts(IndexReader reader, String field, IntParser parser) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the integers.
Parameters:
  parser - Computes integer for string values. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getShorts
public short[] getShorts(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the shorts. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getShorts
public short[] getShorts(IndexReader reader, String field, ShortParser parser) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the shorts.
Parameters:
  parser - Computes short for string values. The values in the given field for each document.
throws:
  IOException - If any error occurs.



getStringIndex
public StringIndex getStringIndex(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the strings. Array of terms and index into the array for each document.
throws:
  IOException - If any error occurs.



getStrings
public String[] getStrings(IndexReader reader, String field) throws IOException(Code)
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.
Parameters:
  reader - Used to get field values.
Parameters:
  field - Which field contains the strings. The values in the given field for each document.
throws:
  IOException - If any error occurs.



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