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

CheckHits
public class CheckHits (Code)

Inner Class :public static class ExplanationAssertingSearcher extends IndexSearcher
Inner Class :public static class ExplanationAsserter extends HitCollector

Field Summary
public static  floatEXPLAIN_SCORE_TOLERANCE_DELTA
     Some explains methods calculate their vlaues though a slightly differnet order of operations from the acctaul scoring method ...


Method Summary
public static  voidcheckDocIds(String mes, int[] results, Hits hits)
    
public static  voidcheckEqual(Query query, Hits hits1, Hits hits2)
    
public static  voidcheckExplanations(Query query, String defaultFieldName, Searcher searcher)
     Asserts that the explanation value for every document matching a query corresponds with the true score.
public static  voidcheckExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep)
     Asserts that the explanation value for every document matching a query corresponds with the true score.
public static  voidcheckHitCollector(Query query, String defaultFieldName, Searcher searcher, int[] results)
     Tests that a query matches the an expected set of documents using a HitCollector.
public static  voidcheckHits(Query query, String defaultFieldName, Searcher searcher, int[] results)
     Tests that a query matches the an expected set of documents using Hits.
public static  voidcheckHitsQuery(Query query, Hits hits1, Hits hits2, int[] results)
     Tests that two queries have an expected order of documents, and that the two queries have the same score values.
public static  voidcheckNoMatchExplanations(Query q, String defaultFieldName, Searcher searcher, int[] results)
    
public static  Stringhits2str(Hits hits1, Hits hits2, int start, int end)
    
public static  StringtopdocsString(TopDocs docs, int start, int end)
    
public static  voidverifyExplanation(String q, int doc, float score, boolean deep, Explanation expl)
     Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.

Field Detail
EXPLAIN_SCORE_TOLERANCE_DELTA
public static float EXPLAIN_SCORE_TOLERANCE_DELTA(Code)
Some explains methods calculate their vlaues though a slightly differnet order of operations from the acctaul scoring method ... this allows for a small amount of variation





Method Detail
checkDocIds
public static void checkDocIds(String mes, int[] results, Hits hits) throws IOException(Code)
Tests that a Hits has an expected order of documents



checkEqual
public static void checkEqual(Query query, Hits hits1, Hits hits2) throws IOException(Code)



checkExplanations
public static void checkExplanations(Query query, String defaultFieldName, Searcher searcher) throws IOException(Code)
Asserts that the explanation value for every document matching a query corresponds with the true score.
See Also:   ExplanationAsserter
See Also:   CheckHits.checkExplanations(Query,String,Searcher,boolean)
See Also:    for a
See Also:   "deep" testing of the explanation details.
Parameters:
  query - the query to test
Parameters:
  searcher - the searcher to test the query against
Parameters:
  defaultFieldName - used for displaing the query in assertion messages



checkExplanations
public static void checkExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep) throws IOException(Code)
Asserts that the explanation value for every document matching a query corresponds with the true score. Optionally does "deep" testing of the explanation details.
See Also:   ExplanationAsserter
Parameters:
  query - the query to test
Parameters:
  searcher - the searcher to test the query against
Parameters:
  defaultFieldName - used for displaing the query in assertion messages
Parameters:
  deep - indicates whether a deep comparison of sub-Explanation details should be executed



checkHitCollector
public static void checkHitCollector(Query query, String defaultFieldName, Searcher searcher, int[] results) throws IOException(Code)
Tests that a query matches the an expected set of documents using a HitCollector.

Note that when using the HitCollector API, documents will be collected if they "match" regardless of what their score is.


Parameters:
  query - the query to test
Parameters:
  searcher - the searcher to test the query against
Parameters:
  defaultFieldName - used for displaing the query in assertion messages
Parameters:
  results - a list of documentIds that must match the query
See Also:   Searcher.search(QueryHitCollector)
See Also:   CheckHits.checkHits



checkHits
public static void checkHits(Query query, String defaultFieldName, Searcher searcher, int[] results) throws IOException(Code)
Tests that a query matches the an expected set of documents using Hits.

Note that when using the Hits API, documents will only be returned if they have a positive normalized score.


Parameters:
  query - the query to test
Parameters:
  searcher - the searcher to test the query against
Parameters:
  defaultFieldName - used for displaing the query in assertion messages
Parameters:
  results - a list of documentIds that must match the query
See Also:   Searcher.search(Query)
See Also:   CheckHits.checkHitCollector



checkHitsQuery
public static void checkHitsQuery(Query query, Hits hits1, Hits hits2, int[] results) throws IOException(Code)
Tests that two queries have an expected order of documents, and that the two queries have the same score values.



checkNoMatchExplanations
public static void checkNoMatchExplanations(Query q, String defaultFieldName, Searcher searcher, int[] results) throws IOException(Code)
Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates no match (ie: Explanation value of 0.0f)



hits2str
public static String hits2str(Hits hits1, Hits hits2, int start, int end) throws IOException(Code)



topdocsString
public static String topdocsString(TopDocs docs, int start, int end)(Code)



verifyExplanation
public static void verifyExplanation(String q, int doc, float score, boolean deep, Explanation expl)(Code)
Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.
Parameters:
  q - String representation of the query for assertion messages
Parameters:
  doc - Document ID for assertion messages
Parameters:
  score - Real score value of doc with query q
Parameters:
  deep - indicates whether a deep comparison of sub-Explanation details should be executed
Parameters:
  expl - The Explanation to match against score



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.