Java Doc for SortField.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) 


java.lang.Object
   org.apache.lucene.search.SortField

SortField
public class SortField implements Serializable(Code)
Stores information about how to sort documents by terms in an individual field. Fields must be indexed in order to sort by them.

Created: Feb 11, 2004 1:25:29 PM
author:
   Tim Jones (Nacimiento Software)
since:
   lucene 1.4
version:
   $Id: SortField.java 598296 2007-11-26 14:52:01Z mikemccand $
See Also:   Sort



Field Summary
final public static  intAUTO
     Guess type of sort based on field contents.
final public static  intCUSTOM
     Sort using a custom Comparator.
final public static  intDOC
     Sort by document number (index order).
final public static  intDOUBLE
     Sort using term values as encoded Doubles.
final public static  SortFieldFIELD_DOC
     Represents sorting by document number (index order).
final public static  SortFieldFIELD_SCORE
     Represents sorting by document score (relevancy).
final public static  intFLOAT
     Sort using term values as encoded Floats.
final public static  intINT
     Sort using term values as encoded Integers.
final public static  intLONG
     Sort using term values as encoded Longs.
final public static  intSCORE
     Sort by document score (relevancy).
final public static  intSTRING
     Sort using term values as Strings.
 booleanreverse
    

Constructor Summary
public  SortField(String field)
     Creates a sort by terms in the given field where the type of term value is determined dynamically ( SortField.AUTO AUTO ).
public  SortField(String field, boolean reverse)
     Creates a sort, possibly in reverse, by terms in the given field where the type of term value is determined dynamically ( SortField.AUTO AUTO ).
public  SortField(String field, int type)
     Creates a sort by terms in the given field with the type of term values explicitly given.
Parameters:
  field - Name of field to sort by.
public  SortField(String field, int type, boolean reverse)
     Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
Parameters:
  field - Name of field to sort by.
public  SortField(String field, Locale locale)
     Creates a sort by terms in the given field sorted according to the given locale.
public  SortField(String field, Locale locale, boolean reverse)
     Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
public  SortField(String field, SortComparatorSource comparator)
     Creates a sort with a custom comparison function.
public  SortField(String field, SortComparatorSource comparator, boolean reverse)
     Creates a sort, possibly in reverse, with a custom comparison function.

Method Summary
public  SortComparatorSourcegetFactory()
    
public  StringgetField()
     Returns the name of the field.
public  LocalegetLocale()
     Returns the Locale by which term values are interpreted.
public  booleangetReverse()
     Returns whether the sort should be reversed.
public  intgetType()
     Returns the type of contents in the field.
public  StringtoString()
    

Field Detail
AUTO
final public static int AUTO(Code)
Guess type of sort based on field contents. A regular expression is used to look at the first term indexed for the field and determine if it represents an integer number, a floating point number, or just arbitrary string characters.



CUSTOM
final public static int CUSTOM(Code)
Sort using a custom Comparator. Sort values are any Comparable and sorting is done according to natural order.



DOC
final public static int DOC(Code)
Sort by document number (index order). Sort values are Integer and lower values are at the front.



DOUBLE
final public static int DOUBLE(Code)
Sort using term values as encoded Doubles. Sort values are Double and lower values are at the front.



FIELD_DOC
final public static SortField FIELD_DOC(Code)
Represents sorting by document number (index order).



FIELD_SCORE
final public static SortField FIELD_SCORE(Code)
Represents sorting by document score (relevancy).



FLOAT
final public static int FLOAT(Code)
Sort using term values as encoded Floats. Sort values are Float and lower values are at the front.



INT
final public static int INT(Code)
Sort using term values as encoded Integers. Sort values are Integer and lower values are at the front.



LONG
final public static int LONG(Code)
Sort using term values as encoded Longs. Sort values are Long and lower values are at the front.



SCORE
final public static int SCORE(Code)
Sort by document score (relevancy). Sort values are Float and higher values are at the front.



STRING
final public static int STRING(Code)
Sort using term values as Strings. Sort values are String and lower values are at the front.



reverse
boolean reverse(Code)




Constructor Detail
SortField
public SortField(String field)(Code)
Creates a sort by terms in the given field where the type of term value is determined dynamically ( SortField.AUTO AUTO ).
Parameters:
  field - Name of field to sort by, cannot be null.



SortField
public SortField(String field, boolean reverse)(Code)
Creates a sort, possibly in reverse, by terms in the given field where the type of term value is determined dynamically ( SortField.AUTO AUTO ).
Parameters:
  field - Name of field to sort by, cannot be null.
Parameters:
  reverse - True if natural order should be reversed.



SortField
public SortField(String field, int type)(Code)
Creates a sort by terms in the given field with the type of term values explicitly given.
Parameters:
  field - Name of field to sort by. Can be null iftype is SCORE or DOC.
Parameters:
  type - Type of values in the terms.



SortField
public SortField(String field, int type, boolean reverse)(Code)
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
Parameters:
  field - Name of field to sort by. Can be null iftype is SCORE or DOC.
Parameters:
  type - Type of values in the terms.
Parameters:
  reverse - True if natural order should be reversed.



SortField
public SortField(String field, Locale locale)(Code)
Creates a sort by terms in the given field sorted according to the given locale.
Parameters:
  field - Name of field to sort by, cannot be null.
Parameters:
  locale - Locale of values in the field.



SortField
public SortField(String field, Locale locale, boolean reverse)(Code)
Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
Parameters:
  field - Name of field to sort by, cannot be null.
Parameters:
  locale - Locale of values in the field.



SortField
public SortField(String field, SortComparatorSource comparator)(Code)
Creates a sort with a custom comparison function.
Parameters:
  field - Name of field to sort by; cannot be null.
Parameters:
  comparator - Returns a comparator for sorting hits.



SortField
public SortField(String field, SortComparatorSource comparator, boolean reverse)(Code)
Creates a sort, possibly in reverse, with a custom comparison function.
Parameters:
  field - Name of field to sort by; cannot be null.
Parameters:
  comparator - Returns a comparator for sorting hits.
Parameters:
  reverse - True if natural order should be reversed.




Method Detail
getFactory
public SortComparatorSource getFactory()(Code)



getField
public String getField()(Code)
Returns the name of the field. Could return null if the sort is by SCORE or DOC. Name of field, possibly null.



getLocale
public Locale getLocale()(Code)
Returns the Locale by which term values are interpreted. May return null if no Locale was specified. Locale, or null.



getReverse
public boolean getReverse()(Code)
Returns whether the sort should be reversed. True if natural order should be reversed.



getType
public int getType()(Code)
Returns the type of contents in the field. One of the constants SCORE, DOC, AUTO, STRING, INT or FLOAT.



toString
public String toString()(Code)



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.