org.apache.lucene.search.function

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.function 
org.apache.lucene.search.function
Java Source File NameTypeComment
ByteFieldSource.javaClass Expert: obtains single byte field values from the org.apache.lucene.search.FieldCache FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.

WARNING: The status of the search.function package is experimental.

CustomScoreQuery.javaClass Query that sets document score as a programmatic function of several (sub) scores.
  1. the score of its subQuery (any query)
  2. (optional) the score of its ValueSourtceQuery (or queries), for most simple/convineient use case this query would be a org.apache.lucene.search.function.FieldScoreQuery FieldScoreQuery
Subclasses can modify the computation by overriding CustomScoreQuery.customScore(int,float,float) .

WARNING: The status of the search.function package is experimental.

DocValues.javaClass Expert: represents field values as different types. Normally created via a org.apache.lucene.search.function.ValueSource ValueSuorce for a particular field and reader.

WARNING: The status of the search.function package is experimental.

FieldCacheSource.javaClass Expert: A base class for ValueSource implementations that retrieve values for a single field from the org.apache.lucene.search.FieldCache FieldCache .

Fields used herein nust be indexed (doesn't matter if these fields are stored or not).

It is assumed that each such indexed field is untokenized, or at least has a single token in a document. For documents with multiple tokens of the same field, behavior is undefined (It is likely that current code would use the value of one of these tokens, but this is not guaranteed).

Document with no tokens in this field are assigned the Zero value.

FieldScoreQuery.javaClass A query that scores each document as the value of the numeric input field.

The query matches all documents, and scores each document according to the numeric value of that field.

FloatFieldSource.javaClass Expert: obtains float field values from the org.apache.lucene.search.FieldCache FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.

WARNING: The status of the search.function package is experimental.

FunctionTestSetup.javaClass
IntFieldSource.javaClass Expert: obtains int field values from the org.apache.lucene.search.FieldCache FieldCache using getInts() and makes those values available as other numeric types, casting as needed.

WARNING: The status of the search.function package is experimental.

OrdFieldSource.javaClass Expert: obtains the ordinal of the field value from the default Lucene org.apache.lucene.search.FieldCache Fieldcache using getStringIndex().

The native lucene index order is used to assign an ordinal value for each field value.

Example:
If there were only three field values: "apple","banana","pear"
then ord("apple")=1, ord("banana")=2, ord("pear")=3

WARNING: ord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.

ReverseOrdFieldSource.javaClass Expert: obtains the ordinal of the field value from the default Lucene org.apache.lucene.search.FieldCache FieldCache using getStringIndex() and reverses the order.

The native lucene index order is used to assign an ordinal value for each field value.

Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
Example of reverse ordinal (rord):
If there were only three field values: "apple","banana","pear"
then rord("apple")=3, rord("banana")=2, ord("pear")=1

WARNING: rord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.

ShortFieldSource.javaClass Expert: obtains short field values from the org.apache.lucene.search.FieldCache FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.

WARNING: The status of the search.function package is experimental.

TestCustomScoreQuery.javaClass Test CustomScoreQuery search.
TestFieldScoreQuery.javaClass Test FieldScoreQuery search.

Tests here create an index with a few documents, each having an int value indexed field and a float value indexed field. The values of these fields are later used for scoring.

The rank tests use Hits to verify that docs are ordered (by score) as expected.

The exact score tests use TopDocs top to verify the exact score.

TestOrdValues.javaClass Test search based on OrdFieldSource and ReverseOrdFieldSource.

Tests here create an index with a few documents, each having an indexed "id" field. The ord values of this field are later used for scoring.

The order tests use Hits to verify that docs are ordered as expected.

The exact score tests use TopDocs top to verify the exact score.

ValueSource.javaClass Expert: source of values for basic function queries.

At its default/simplest form, values - one per doc - are used as the score of that doc.

Values are instantiated as org.apache.lucene.search.function.DocValues DocValues for a particular reader.

ValueSource implementations differ in RAM requirements: it would always be a factor of the number of documents, but for each document the number of bytes can be 1, 2, 4, or 8.

ValueSourceQuery.javaClass Expert: A Query that sets the scores of document to the values obtained from a org.apache.lucene.search.function.ValueSource ValueSource .

The value source can be based on a (cached) value of an indexd field, but it can also be based on an external source, e.g.

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