Java Doc for Indexer.java in  » Groupware » hipergate » com » knowgate » lucene » 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 » Groupware » hipergate » com.knowgate.lucene 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.knowgate.lucene.Indexer

All known Subclasses:   com.knowgate.lucene.NewsMessageIndexer,  com.knowgate.lucene.MailIndexer,  com.knowgate.lucene.BugIndexer,
Indexer
public class Indexer (Code)

Data Feeder from hipergate tables for Lucene


author:
   Sergio Montoro Ten
version:
   3.0
See Also:    http://jakarta.apache.org/lucene/docs/index.html


Field Summary
final public static  StringDEFAULT_ANALYZER
    


Method Summary
public static  voidadd(IndexWriter oIWrt, Map oKeywords, Map oTexts, Map oUnStored)
    
public static  voidadd(String sTableName, String sDirectory, String sAnalyzer, Map oKeywords, Map oTexts, Map oUnStored)
    
public static  voidadd(String sTableName, Properties oProps, String sGUID, int iNumber, String sWorkArea, String sContainer, String sTitle, String sText, String sAuthor, String sAbstract, String sComments)
    
public static  intdelete(String sTableName, String sWorkArea, Properties oProps, String sGuid)
    
public static  voidmain(String[] argv)
    

Static method for calling indexer from the command line


Parameters:
  argv - String[] Must have two arguments, the first one is the full pathto hipergate.cnf or other properties file containing database connection parameters.
The second argument must be "rebuild".
The third argument is one of {k_bugs|k_newsmsgs|k_mime_msgs} indicating which table index is to be rebuilt.
Command line example: java -cp ...
public static  voidoptimize(Properties oProps, String sTableName, String sWorkArea)
    
public static  voidrebuild(Properties oProps, String sTableName, String sWorkArea)
    
public static  voidrebuild(Properties oProps, String sTableName)
    

Field Detail
DEFAULT_ANALYZER
final public static String DEFAULT_ANALYZER(Code)





Method Detail
add
public static void add(IndexWriter oIWrt, Map oKeywords, Map oTexts, Map oUnStored) throws ClassNotFoundException, IOException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException, NullPointerException(Code)



add
public static void add(String sTableName, String sDirectory, String sAnalyzer, Map oKeywords, Map oTexts, Map oUnStored) throws ClassNotFoundException, IOException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException, NullPointerException(Code)



add
public static void add(String sTableName, Properties oProps, String sGUID, int iNumber, String sWorkArea, String sContainer, String sTitle, String sText, String sAuthor, String sAbstract, String sComments) throws ClassNotFoundException, IOException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException, NullPointerException(Code)
Add a document to the index
Parameters:
  sTableName - k_bugs, k_newsmsgs or k_mime_msgs
Parameters:
  oProps - Properties Collection containing luceneindex directory
Parameters:
  sWorkArea - WorkArea for document
Parameters:
  sContainer - GUID of Category or NewsGroup to which documento belongs
Parameters:
  sGUID - Document GUID
Parameters:
  iNumber - Document number (optional, may be zero)
Parameters:
  sTitle - Document Title (optional, may be null)
Parameters:
  sText - Document text (optional, may be null)
Parameters:
  sAuthor - Document author (optional, may be null)
Parameters:
  sAbstract - Document abstract (optional, may be null)
Parameters:
  sComments - Document comments (optional, may be null)
throws:
  ClassNotFoundException -
throws:
  IOException -
throws:
  IllegalArgumentException - If sTableName is not one of { k_bugs, k_newsmsgs, k_mime_msgs }
throws:
  NoSuchFieldException - If luceneindex property is not found at oProps
throws:
  IllegalAccessException -
throws:
  InstantiationException -
throws:
  NullPointerException -



delete
public static int delete(String sTableName, String sWorkArea, Properties oProps, String sGuid) throws IllegalArgumentException, NoSuchFieldException, IllegalAccessException, IOException, NullPointerException(Code)
Delete a document with a given GUID
Parameters:
  sTableName - k_bugs, k_newsmsgs or k_mime_msgs
Parameters:
  oProps - Properties Collection containing luceneindex directory
Parameters:
  sGuid - Document GUID Number of documents deleted
throws:
  IllegalArgumentException - If sTableName is not one of { k_bugs, k_newsmsgs, k_mime_msgs }
throws:
  NoSuchFieldException - If luceneindex property is not found at oProps
throws:
  IllegalAccessException -
throws:
  IOException -
throws:
  NullPointerException - If sGuid is null



main
public static void main(String[] argv) throws SQLException, IOException, ClassNotFoundException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException(Code)

Static method for calling indexer from the command line


Parameters:
  argv - String[] Must have two arguments, the first one is the full pathto hipergate.cnf or other properties file containing database connection parameters.
The second argument must be "rebuild".
The third argument is one of {k_bugs|k_newsmsgs|k_mime_msgs} indicating which table index is to be rebuilt.
Command line example: java -cp ... com.knowgate.lucene.Indexer /etc/hipergate.cnf rebuild k_mime_msgs
throws:
  SQLException -
throws:
  IOException -
throws:
  ClassNotFoundException -
throws:
  IllegalArgumentException -
throws:
  NoSuchFieldException -
throws:
  IllegalAccessException -
throws:
  InstantiationException -



optimize
public static void optimize(Properties oProps, String sTableName, String sWorkArea) throws NoSuchFieldException, IllegalArgumentException, ClassNotFoundException, FileNotFoundException, IOException, InstantiationException, IllegalAccessException(Code)
Optimize a given index
Parameters:
  oProps - Properties Collection (typically loaded from hipergate.cnf)containing luceneindex property and (optionally) analyzer
Parameters:
  sTableName - String Name of table to be indexed (currently only k_bugs, k_newsmsgs or k_mime_msgs are permitted)
Parameters:
  sWorkArea - GUID of WorkArea to be optimized
throws:
  NoSuchFieldException -
throws:
  IllegalArgumentException -
throws:
  ClassNotFoundException -
throws:
  IOException -
throws:
  InstantiationException -
throws:
  IllegalAccessException -



rebuild
public static void rebuild(Properties oProps, String sTableName, String sWorkArea) throws SQLException, IOException, ClassNotFoundException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException(Code)

Rebuild Full Text Index for a table

Indexed documents have the following fields:
Field NameDescriptionIndexedStored
workareaGUID of WorkAreaYesYes
containerName of Container (NewsGroup, Project, etc)YesYes
guidGUID for Retrieved ObjectYesYes
numberObject Ordinal IdentifierYesYes
titleTitle or SubjectYesYes
authorAuthorYesYes
textDocument TextYesNo
abstractFirst 80 characters of textNoYes

Parameters:
  oProps - Properties Collection (typically loaded from hipergate.cnf) containing:
driver : Class name for JDBC driver
dburl : Database Connection URL
dbuser : Database User
dbpassword : Database User Password
luceneindex : Base path for Lucene index directories,the rebuilded index will be stored at a subdirectory called as the table name.

Parameters:
  sTableName - Name of table to be indexed (currently only k_bugs, k_newsmsgs or k_mime_msgs are permitted)analyzer : org.apache.lucene.analysis.Analyzer subclass name
Parameters:
  sWorkArea - GUID of WorkArea to be rebuilt
throws:
  NoSuchFieldException - If any of the requiered properties of oProps is not found
throws:
  ClassNotFoundException - If JDBC driver or analyzer classes are not found
throws:
  SQLException -
throws:
  IOException -
throws:
  IllegalArgumentException -
throws:
  IllegalAccessException -
throws:
  InstantiationException -



rebuild
public static void rebuild(Properties oProps, String sTableName) throws SQLException, IOException, ClassNotFoundException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException, InstantiationException(Code)

Parameters:
  oProps -
Parameters:
  sTableName -
throws:
  SQLException -
throws:
  IOException -
throws:
  ClassNotFoundException -
throws:
  IllegalArgumentException -
throws:
  NoSuchFieldException -
throws:
  IllegalAccessException -
throws:
  InstantiationException -



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.