SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Lucene with MySQL
Farhan “Frank” Mashraqi
DBA
Fotolog, Inc.
fmashraqi@fotolog.com
softwareengineer99@yahoo.com
Introduction
 Farhan Mashraqi
 Senior MySQL DBA of Fotolog, Inc.
 Known on Planet MySQL as “Frank Mash”
What is Lucene?
 Started in 1997 “self serving project”
 2001: Apache folks adopts Lucene
 Open Source Information Retrieval (IR) Library
- available from the Apache Software Foundation
- Search and Index any textual data
- Doesn’t care about language, source and format of data
Lucene?
 Not a turnkey search engine
 Standard
- for building open-source based large-scale search
applications
- a high performance, scalable, cross-platform search toolkit
- Today: translated into C++, C#, Perl, Python, Ruby
- for embedded and customizable search
- widely adopted by OEM software vendors and enterprise IT
departments
Lucene
DB
Web
Aggregate DataFile System
Index Documents
Index
Search Index
Search
Results
User Query
LUCENE
Application
What types of queries it supports
 Single and multi-term queries
 Phrase queries
 Wildcards
 Result ranking
 +apple –computer +pie
 country:USA
 country:USA AND state:CA
Cons
 Need Java resources (programmers)
- JSP experience plus
 Implementation and Maintenance Cost
 By default
- No installer or wizard for setup (it’s a toolkit )
- No administration or command line tools (demo avail.)
- No spider
- Coding yourself is always an option
- No complex script language support by default
- 3rd
party tools available
Cons 2
- No built-in support for (Demos avail. for how to implement)
- HTML format
- PDF format
- Microsoft Office Documents
- Advanced XML queries
- “How tos” available.
- No database gateway
- Integrates with MySQL with little work
- Web interface
- JSP sample available
- Missing enterprise support
Lucene Libraries
1. The Lucene libraries include core search components such
as a document indexer, index searcher, query parser, and
text analyzer.
Who is behind Lucene?
 Doug Cutting (Author)
Previously at Excite
 Apache Software Foundation
Who uses Lucene?
 IBM
- IBM OmniFind Yahoo! Edition
 CNET
- http://reviews.cnet.com/
- http://www.mail-archive.com/java-user@lucene.apache.org/msg02645.html
 Wikipedia
 Fedex
 Akamai’s EdgeComputing platform
 Technorati
 FURL
 Sun
- Open Solaris Source Browser
When to use Lucene?
 Search applications
 Search functionality for existing applications
 Search enabling database application
When not to use?
 Not ideal for
- Adding generic search to site
- Enterprise systems needing support for proprietary formats
- Extremely high volume systems
- Through a better architecture this can be solved
- Investigate carefully if
- You need more than 100 QPS per system
- Highly volatile data
- Updates are actually Deletes and Additions
- Additions visible to new sessions only
Why Lucene?
 What problems does Lucene solve?
- Full text with MySQL
- Pros and Cons
 Powerful features
 Simple API
 Scalable, cost-effective, efficient Indexing
- Powerful Searching through multiple query types
Powerful features
 Simple API
- Sort by any field
- Simultaneous updates and searching
Core Index Classes
 IndexWriter
 Directory
 Analyzer
 Document
 Field
IndexWriter
 IndexWriter
- Creates new index
- Adds document to new index
- Gives you “write” access but no “read” access
- Not the only class used to modify an index
- Lucene API can be used as well
Directory
 Directory
- Represents location of the Lucene Index
- Abstract class
- Allows its subclasses to store the index as they see fit
- FSDirectory
- RAMDirectory
- Interface Identical to FSDirectory
Analyzer
 Analyzer
- Text passed through analyzer before indexing
- Specified in the IndexWriter constructor
- Incharge of extracting tokens out of text to be indexed
- Rest is eliminated
- Several implementation available (stop words, lower case
etc)
Document
 Document
- Collection of fields (virtual document)
- Chunk of data
- Fields of a document represent the document or meta-data
associated with that document
- -Original source of Document data (word PDF) irrelevant
- Metadata indexed and stored separately as fields of a
document
- Text only: java.lang.String and java.io.Reader are the only
things handled by core
Field 1
 Field
- Document in an index contains one or more fields (in a class called Field)
- Each field represents data that is either queried against or retrieved from index during
search.
- Four different types:
- Keyword
- Isn’t analyzed
- But indexed and stored in the index
- Ideal for:
- URLs
- Paths
- SSN
- Names
- Orginal value is reserved in entirety
Field types
- Unindexed
- Neither analyzed nor indexed
- Value stored in index as is
- Fields that need to be displayed with search results (URL
etc)
- But you won’t search based on these fields
- Because original values are stored
- Don’t store fields with very large values
- Especially if index size will be an issue
Field types
- Unstored
- Opposite of UnIndexed
- Field type is analyzed and indexed but isn’t stored in the
index
- Suitable for indexing a large amount of text that’s not going
to be needed in original form
- E.g.
- HTML of a webpage etc
Field types
- Text
- Analyzed and indexed
- Field of this type can be searched against
- Be careful about the field size
- If data indexed is String, it will be stored
- If Data is from a Reader
- It will not be stored
Note:
 Field.Text(String, String) and Field.Text(String, Reader) are
different.
- (String, String) stores the field data
- (String, Reader) does not
 To index a String, but not store it, use
- Field.UnStored(String, String)
Classes for Basic Search Operations
 IndexSearcher
- Opens an index in read-only mode
- Offers a number of search methods
- Some of which implemented in Searcher class
IndexSearcher is = new IndexSearcher(
FSDirectory.getDirectory("/tmp/index", false));
Query q = new TermQuery(new Term("contents",
"lucene"));
Hits hits = is.search(q);
Classes for Basic Search Operations
 Term
- Basic unit for searching
- Consists of pair of string elements: name of field and value
of field
- Term objects are involved in indexing process
- Term objects can be constructed and used with TermQUery
Query q = new TermQuery(new Term("contents",
"lucene"));
Hits hits = is.search(q);
Classes for Basic Search Operations
 Query
- A number of query subclasses
- BooleanQuery
- PhraseQuery
- PrefixQuery
- PhrasePrefixQuery
- RangeQuery
- FilteredQuery
- SpanQuery
Classes for Basic Search Operations
 TermQuery
- Most basic type of query supported by Lucene
- Used for matching documents that contain fields with
specific values
 Hits
- Simple container of pointers to ranked search results.
- Hits instances don’t load from index all documents that
match a query but only a small portion (performance)
Indexing
 Multiple type indexing
- Scalable
- High Performance
- “over 20MB/minute on Pentium M 1.5GHz”
- Incremental indexing and batch indexing have same cost
- Index Size
- index size roughly 20-30% the size of text indexed
- Compare to MySQL’s FULL-TEXT index size
- Cost-effective
- 1 MB heap (small RAM needed)
Powerful Searching & Sorting
- Ranked Searching
- Multiple Powerful Query Types
- phrase queries, wildcard queries, proximity queries, range
queries and more
- Fielded Searching
- fielded searching (e.g., title, author, contents)
- Date Range Searching
- date-range searching
- Multiple Index Searching with Merged Results
- Sort by any field
How to Integrate Your Application With Lucene
 Install JDK (5 or 6)
 Testing Lucene Demo
Prerequisites: JDK
 Installing JDK
- For downloading visit the JDK5
http://java.sun.com/javase/downloads/index_jdk5.jsp page
- or JDK 6 download page
http://java.sun.com/javase/downloads/index.jsp
- Once downloaded:
- Change Permissions
- [root@srv31 jdk-install]# chmod 755 jdk-1_5_0_09-linux-
i586.bin
- Install
- [root@srv31 jdk-install]# ./jdk-1_5_0_09-linux-i586.bin
Testing Lucene Demo
 Step 2: Testing Lucene Demo
- Set up your environment
- vi /root/.bashrc
- export PATH=/var/www/html/java/jdk1.5.0_09/bin:$PATH
export
CLASSPATH=.:/var/www/html/java/jdk1.5.0_09:/var/www/html/java/jdk1.5.0_09/lib:/var/www/html/jav
a/jdk1.5.0_09/lib/lucene-2.1.0/lucene-core-2.1.0.jar:/var/www/html/java/jdk1.5.0_09/lib/lucene-
2.1.0/lucene-demos-2.1.0.jar:/var/www/html/java/jdk1.5.0_09/lib/xmlrpc-3.0a1.jar
- Now get and place in /var/www/html/java/jdk1.5.0_09/lib/lucene-2.1.0/
- Lucene Java
- http://www.apache.org/dyn/closer.cgi/lucene/java/
- XMLRPC Library
- [root@srv31 lib]# wget http://mirror.candidhosting.com/pub/apache/lucene/java/lucene-2.1.0.zip
[root@srv31 lib]# unzip lucene-2.1.0.zip
[root@srv31 lib]# cp -p lucene-2.1.0/lucene-core-2.1.0.jar ../lib/
[root@srv31 lib]# cp -p lucene-2.1.0/lucene-demos-2.1.0.jar ../lib/
[root@srv31 lib]# cp -p /var/www/html/java/jdk1.5.0_06/lib/xmlrpc-3.0a1.jar
/var/www/html/java/jdk1.5.0_09/lib/xmlrpc-3.0a1.jar
Now "dot" the above file:
[root@srv31 lib]# . /root/.bashrc
Testing Lucene Demo 2
- Believe it or not, we are now ready to test the Lucene Demo.
- Indexing
- I just let it loose on a randomly picked directory to give you an
idea:
[root@srv31 lib]# java org.apache.lucene.demo.IndexFiles
/var/www/html/java/jdk1.5.0_09/
adding /var/www/html/java/jdk1.5.0_09/include/jni.h
adding /var/www/html/java/jdk1.5.0_09/include/linux/jawt_md.h
adding /var/www/html/java/jdk1.5.0_09/include/linux/jni_md.h
adding /var/www/html/java/jdk1.5.0_09/include/jvmti.h
adding /var/www/html/java/jdk1.5.0_09/include/jvmdi.h
Optimizing...
157013 total milliseconds
Testing Lucene Demo 3
 [root@srv31 lib]# java org.apache.lucene.demo.SearchFiles
 Query: java
 Searching for: java
 1159 total matching documents
 1. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh.GBK/LC_MESSAGES/sunw_java_plugin.mo
 2. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh/LC_MESSAGES/sunw_java_plugin.mo
 3. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/ko/LC_MESSAGES/sunw_java_plugin.mo
 4. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_HK.BIG5HK/LC_MESSAGES/sunw_java_plugin.mo
 5. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_TW.BIG5/LC_MESSAGES/sunw_java_plugin.mo
 6. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_TW/LC_MESSAGES/sunw_java_plugin.mo
 7. /var/www/html/java/jdk1.5.0_09/demo/jfc/Stylepad/README.txt
 8. /var/www/html/java/jdk1.5.0_09/demo/jfc/Notepad/README.txt
 9. /var/www/html/java/jdk1.5.0_09/demo/plugin/jfc/Stylepad/README.txt
 10. /var/www/html/java/jdk1.5.0_09/demo/plugin/jfc/Notepad/README.txt
 more (y/n) ?
Loading data from MySQL
 …
 String url = "jdbc:mysql://127.0.0.1/odp";
 Connection con = DriverManager.getConnection(url, “user",
“pass");
 Statement Stmt = con.createStatement();
 ResultSet RS = Stmt.executeQuery
 ("SELECT * FROM " +
 " articles" );
Loading data from MySQL 2
 while (RS.next()) {
 // System.out.print(""" + RS.getString(1) + """);
 try {
 final Document doc = new Document();
 // create Document
 doc.add(Field.Text("title", RS.getString("title")));
 doc.add(Field.Text("type", "article"));
 doc.add(Field.Text("author",
RS.getString("author")));
 doc.add(Field.Text("body", RS.getString("body")));
 doc.add(Field.Text("extended",
RS.getString("extended")));
 …
Loading data from MySQL 3
 …
 doc.add(Field.Text("tags", RS.getString("tags")));
 doc.add(Field.UnIndexed("permalink", RS.getString("permalink") ));
 doc.add(Field.UnIndexed("id", RS.getString("id")));
 doc.add(Field.UnIndexed("member_id", RS.getString("member_id")));
 doc.add(Field.UnIndexed("portal_id", RS.getString("portal_id")));
 //doc.add(Field.Text("id", RS.getString("id")));
 writer.addDocument(doc);
 }
 catch (IOException e) { System.err.println("Unable to index student"); }
 }
 // close connection
Searching Data using XML RPC
 public static void searchArticles( final String search, final int numberOfResults)
 throws Exception
 {
 final Query query;
 Analyzer analyzer = new StandardAnalyzer();
 query = QueryParser.parse(search, "title", analyzer);
 final ArrayList ids = new ArrayList();
 try {
 final IndexReader reader = IndexReader.open(INDEX_DIR);
 final IndexSearcher searcher = new IndexSearcher(reader);
 final Hits hits = searcher.search(query);
 for (int i = 0; i != hits.length() && i != numberOfResults; ++i) {
 final Document doc = hits.doc(i);
 // id field needs to be added //ids.add(new Integer(doc.getField("id").stringValue()));
 …
Searching Data using XML RPC 2
 …
 ids.add(new Integer(doc.getField("id").stringValue()));
 System.out.println("Found + " + doc.getField("id").stringValue() );
 System.out.println("--Title = " + doc.getField("title").stringValue() );
 System.out.println("--Type = " + doc.getField("type").stringValue() );
 System.out.println("--Body = " + doc.getField("body").stringValue() );
 System.out.println("--Author = " + doc.getField("author").stringValue() );
 System.out.println("--Extended = " + doc.getField("extended").stringValue() );
 System.out.println("--Tags = " + doc.getField("tags").stringValue() );
 System.out.println("--Permalink = " + doc.getField("permalink").stringValue() );
 System.out.println("--Member Id = " + doc.getField("member_id").stringValue()
);
 System.out.println("--Portal Id = " + doc.getField("portal_id").stringValue() );
Searching Data using XML RPC 3
 }
 searcher.close();
 reader.close();
 }
 catch (IOException e) {
 System.out.println("Error while reading student data
from index");
 }
 }
Future of Lucene
 Advanced Linguistics Modules that integrate with Lucene
- Support for complex script languages
- Basis Technologies’ Rosette® Linguistics Platform
- The same linguistic software that powers multilingual web
search on Google, Live.com, Yahoo! and leading enterprise
search engines
- “allows Lucene-based applications to index and search text
in multiple languages concurrently, including complex script
languages such as Arabic, Chinese, Farsi, Japanese and
Korean. “
- www.basistech.com/lucene
What are the ports of Lucene
 Lucene4c - C
 CLucene - C++
 MUTIS - Delphi
 Lucene.Net - a straight C#/.NET port of Lucene by the
Apache Software Foundation, fully compatible with it.
 Plucene - Perl
 Kinosearch - Perl
 Pylucene - Lucene interfaced with a Python front-end
 Ferret and RubyLucene - Ruby
 Zend Framework (Search) - PHP
 Montezuma - Common Lisp
Where to get help about Lucene?
 http://lucene.apache.org/java/docs/mailinglists.html
 IRC
Books about Lucene
 Lucene in Action
- Erik Hatcher and Otis Gospodnetic
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Training Week: Introduction to Neo4j Aura Free
Training Week: Introduction to Neo4j Aura FreeTraining Week: Introduction to Neo4j Aura Free
Training Week: Introduction to Neo4j Aura FreeNeo4j
 
20191001 AWS Black Belt Online Seminar AWS Lake Formation
20191001 AWS Black Belt Online Seminar AWS Lake Formation 20191001 AWS Black Belt Online Seminar AWS Lake Formation
20191001 AWS Black Belt Online Seminar AWS Lake Formation Amazon Web Services Japan
 
20190122 AWS Black Belt Online Seminar Amazon Redshift Update
20190122 AWS Black Belt Online Seminar Amazon Redshift Update20190122 AWS Black Belt Online Seminar Amazon Redshift Update
20190122 AWS Black Belt Online Seminar Amazon Redshift UpdateAmazon Web Services Japan
 
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive 20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive Amazon Web Services Japan
 
Best Practices for Running PostgreSQL on AWS
Best Practices for Running PostgreSQL on AWSBest Practices for Running PostgreSQL on AWS
Best Practices for Running PostgreSQL on AWSAmazon Web Services Japan
 
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Amazon Web Services Japan
 
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)Amazon Web Services Japan
 
データ活用を加速するAWS分析サービスのご紹介
データ活用を加速するAWS分析サービスのご紹介データ活用を加速するAWS分析サービスのご紹介
データ活用を加速するAWS分析サービスのご紹介Amazon Web Services Japan
 
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018Massimo Quadrana
 
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)Amazon Web Services Japan
 
わかりづらいS3クロスアカウントアクセス許可に立ち向かおう
わかりづらいS3クロスアカウントアクセス許可に立ち向かおうわかりづらいS3クロスアカウントアクセス許可に立ち向かおう
わかりづらいS3クロスアカウントアクセス許可に立ち向かおうTakashi Toyosaki
 
NewRelic x Terraform Cloud で Observability as Code
NewRelic x Terraform Cloud で Observability as CodeNewRelic x Terraform Cloud で Observability as Code
NewRelic x Terraform Cloud で Observability as CodeShogo Katsurada
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflakeSunil Gurav
 
Machine Learning with PyCarent + MLflow
Machine Learning with PyCarent + MLflowMachine Learning with PyCarent + MLflow
Machine Learning with PyCarent + MLflowDatabricks
 
VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話Noritaka Sekiyama
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueAmazon Web Services
 
ブラウザ自動化ツール カオスマップ風 - STAC2018 LT
ブラウザ自動化ツール カオスマップ風 - STAC2018 LTブラウザ自動化ツール カオスマップ風 - STAC2018 LT
ブラウザ自動化ツール カオスマップ風 - STAC2018 LThnisiji
 
AWS Black Belt Tech シリーズ 2016 - Amazon SES
AWS Black Belt Tech シリーズ 2016 - Amazon SESAWS Black Belt Tech シリーズ 2016 - Amazon SES
AWS Black Belt Tech シリーズ 2016 - Amazon SESAmazon Web Services Japan
 
Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine LearningMostafa
 

Was ist angesagt? (20)

Training Week: Introduction to Neo4j Aura Free
Training Week: Introduction to Neo4j Aura FreeTraining Week: Introduction to Neo4j Aura Free
Training Week: Introduction to Neo4j Aura Free
 
20191001 AWS Black Belt Online Seminar AWS Lake Formation
20191001 AWS Black Belt Online Seminar AWS Lake Formation 20191001 AWS Black Belt Online Seminar AWS Lake Formation
20191001 AWS Black Belt Online Seminar AWS Lake Formation
 
20190122 AWS Black Belt Online Seminar Amazon Redshift Update
20190122 AWS Black Belt Online Seminar Amazon Redshift Update20190122 AWS Black Belt Online Seminar Amazon Redshift Update
20190122 AWS Black Belt Online Seminar Amazon Redshift Update
 
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive 20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive
20191030 AWS Black Belt Online Seminar AWS IoT Analytics Deep Dive
 
Best Practices for Running PostgreSQL on AWS
Best Practices for Running PostgreSQL on AWSBest Practices for Running PostgreSQL on AWS
Best Practices for Running PostgreSQL on AWS
 
AWSからのメール送信
AWSからのメール送信AWSからのメール送信
AWSからのメール送信
 
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
 
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
 
データ活用を加速するAWS分析サービスのご紹介
データ活用を加速するAWS分析サービスのご紹介データ活用を加速するAWS分析サービスのご紹介
データ活用を加速するAWS分析サービスのご紹介
 
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018
Tutorial on Sequence Aware Recommender Systems - ACM RecSys 2018
 
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)
AWS Black Belt Techシリーズ 2015 Amazon Elastic Block Store (EBS)
 
わかりづらいS3クロスアカウントアクセス許可に立ち向かおう
わかりづらいS3クロスアカウントアクセス許可に立ち向かおうわかりづらいS3クロスアカウントアクセス許可に立ち向かおう
わかりづらいS3クロスアカウントアクセス許可に立ち向かおう
 
NewRelic x Terraform Cloud で Observability as Code
NewRelic x Terraform Cloud で Observability as CodeNewRelic x Terraform Cloud で Observability as Code
NewRelic x Terraform Cloud で Observability as Code
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflake
 
Machine Learning with PyCarent + MLflow
Machine Learning with PyCarent + MLflowMachine Learning with PyCarent + MLflow
Machine Learning with PyCarent + MLflow
 
VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話VPC Reachability Analyzer 使って人生が変わった話
VPC Reachability Analyzer 使って人生が変わった話
 
Building Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS GlueBuilding Serverless ETL Pipelines with AWS Glue
Building Serverless ETL Pipelines with AWS Glue
 
ブラウザ自動化ツール カオスマップ風 - STAC2018 LT
ブラウザ自動化ツール カオスマップ風 - STAC2018 LTブラウザ自動化ツール カオスマップ風 - STAC2018 LT
ブラウザ自動化ツール カオスマップ風 - STAC2018 LT
 
AWS Black Belt Tech シリーズ 2016 - Amazon SES
AWS Black Belt Tech シリーズ 2016 - Amazon SESAWS Black Belt Tech シリーズ 2016 - Amazon SES
AWS Black Belt Tech シリーズ 2016 - Amazon SES
 
Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine Learning
 

Andere mochten auch

Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)dnaber
 
Lucandra
LucandraLucandra
Lucandraotisg
 
Lucene Introduction
Lucene IntroductionLucene Introduction
Lucene Introductionotisg
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?lucenerevolution
 
Berlin Buzzwords 2013 - How does lucene store your data?
Berlin Buzzwords 2013 - How does lucene store your data?Berlin Buzzwords 2013 - How does lucene store your data?
Berlin Buzzwords 2013 - How does lucene store your data?Adrien Grand
 
Architecture and Implementation of Apache Lucene: Marter's Thesis
Architecture and Implementation of Apache Lucene: Marter's ThesisArchitecture and Implementation of Apache Lucene: Marter's Thesis
Architecture and Implementation of Apache Lucene: Marter's ThesisJosiane Gamgo
 
Introduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneRahul Jain
 
Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1YI-CHING WU
 
Portable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej BialeckiPortable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej Bialeckilucenerevolution
 
Finite State Queries In Lucene
Finite State Queries In LuceneFinite State Queries In Lucene
Finite State Queries In Luceneotisg
 
Analytics in olap with lucene & hadoop
Analytics in olap with lucene & hadoopAnalytics in olap with lucene & hadoop
Analytics in olap with lucene & hadooplucenerevolution
 
Architecture and implementation of Apache Lucene
Architecture and implementation of Apache LuceneArchitecture and implementation of Apache Lucene
Architecture and implementation of Apache LuceneJosiane Gamgo
 
Beyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and SolrBeyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and SolrBertrand Delacretaz
 

Andere mochten auch (20)

Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
 
Lucene basics
Lucene basicsLucene basics
Lucene basics
 
Lucandra
LucandraLucandra
Lucandra
 
Lucene Introduction
Lucene IntroductionLucene Introduction
Lucene Introduction
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?
 
Lucene
LuceneLucene
Lucene
 
Berlin Buzzwords 2013 - How does lucene store your data?
Berlin Buzzwords 2013 - How does lucene store your data?Berlin Buzzwords 2013 - How does lucene store your data?
Berlin Buzzwords 2013 - How does lucene store your data?
 
Architecture and Implementation of Apache Lucene: Marter's Thesis
Architecture and Implementation of Apache Lucene: Marter's ThesisArchitecture and Implementation of Apache Lucene: Marter's Thesis
Architecture and Implementation of Apache Lucene: Marter's Thesis
 
Introduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of Lucene
 
Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1
 
Portable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej BialeckiPortable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej Bialecki
 
Lucene And Solr Intro
Lucene And Solr IntroLucene And Solr Intro
Lucene And Solr Intro
 
Finite State Queries In Lucene
Finite State Queries In LuceneFinite State Queries In Lucene
Finite State Queries In Lucene
 
Apache lucene
Apache luceneApache lucene
Apache lucene
 
Analytics in olap with lucene & hadoop
Analytics in olap with lucene & hadoopAnalytics in olap with lucene & hadoop
Analytics in olap with lucene & hadoop
 
Introduction To Apache Lucene
Introduction To Apache LuceneIntroduction To Apache Lucene
Introduction To Apache Lucene
 
Solr
SolrSolr
Solr
 
Architecture and implementation of Apache Lucene
Architecture and implementation of Apache LuceneArchitecture and implementation of Apache Lucene
Architecture and implementation of Apache Lucene
 
Search Lucene
Search LuceneSearch Lucene
Search Lucene
 
Beyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and SolrBeyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and Solr
 

Ähnlich wie Lucene and MySQL

Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)Manish kumar
 
Intelligent crawling and indexing using lucene
Intelligent crawling and indexing using luceneIntelligent crawling and indexing using lucene
Intelligent crawling and indexing using luceneSwapnil & Patil
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucenelucenerevolution
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAsad Abbas
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Netgramana
 
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...Ashnikbiz
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearchpmanvi
 
Elasticsearch and Spark
Elasticsearch and SparkElasticsearch and Spark
Elasticsearch and SparkAudible, Inc.
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiRobert Calcavecchia
 
Search Engines: Best Practice
Search Engines: Best PracticeSearch Engines: Best Practice
Search Engines: Best PracticeYuliya_Prach
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrRahul Jain
 
New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1Stefan Schmidt
 

Ähnlich wie Lucene and MySQL (20)

Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)
 
Intelligent crawling and indexing using lucene
Intelligent crawling and indexing using luceneIntelligent crawling and indexing using lucene
Intelligent crawling and indexing using lucene
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using Lucene
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
 
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...
FOSSASIA 2015 - 10 Features your developers are missing when stuck with Propr...
 
Apache Lucene Searching The Web
Apache Lucene Searching The WebApache Lucene Searching The Web
Apache Lucene Searching The Web
 
Solr5
Solr5Solr5
Solr5
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Elasticsearch and Spark
Elasticsearch and SparkElasticsearch and Spark
Elasticsearch and Spark
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
 
Search Engines: Best Practice
Search Engines: Best PracticeSearch Engines: Best Practice
Search Engines: Best Practice
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/Solr
 
Apache solr
Apache solrApache solr
Apache solr
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Oracle by Muhammad Iqbal
Oracle by Muhammad IqbalOracle by Muhammad Iqbal
Oracle by Muhammad Iqbal
 
New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1New Persistence Features in Spring Roo 1.1
New Persistence Features in Spring Roo 1.1
 
Apache Solr vs Oracle Endeca
Apache Solr vs Oracle EndecaApache Solr vs Oracle Endeca
Apache Solr vs Oracle Endeca
 
SphinxSE with MySQL
SphinxSE with MySQLSphinxSE with MySQL
SphinxSE with MySQL
 
Technologies for Websites
Technologies for WebsitesTechnologies for Websites
Technologies for Websites
 

Kürzlich hochgeladen

Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabiaahmedjiabur940
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numberssuginr1
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...gajnagarg
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...HyderabadDolls
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 

Kürzlich hochgeladen (20)

Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 

Lucene and MySQL

  • 1. Lucene with MySQL Farhan “Frank” Mashraqi DBA Fotolog, Inc. fmashraqi@fotolog.com softwareengineer99@yahoo.com
  • 2. Introduction  Farhan Mashraqi  Senior MySQL DBA of Fotolog, Inc.  Known on Planet MySQL as “Frank Mash”
  • 3. What is Lucene?  Started in 1997 “self serving project”  2001: Apache folks adopts Lucene  Open Source Information Retrieval (IR) Library - available from the Apache Software Foundation - Search and Index any textual data - Doesn’t care about language, source and format of data
  • 4. Lucene?  Not a turnkey search engine  Standard - for building open-source based large-scale search applications - a high performance, scalable, cross-platform search toolkit - Today: translated into C++, C#, Perl, Python, Ruby - for embedded and customizable search - widely adopted by OEM software vendors and enterprise IT departments
  • 5. Lucene DB Web Aggregate DataFile System Index Documents Index Search Index Search Results User Query LUCENE Application
  • 6. What types of queries it supports  Single and multi-term queries  Phrase queries  Wildcards  Result ranking  +apple –computer +pie  country:USA  country:USA AND state:CA
  • 7. Cons  Need Java resources (programmers) - JSP experience plus  Implementation and Maintenance Cost  By default - No installer or wizard for setup (it’s a toolkit ) - No administration or command line tools (demo avail.) - No spider - Coding yourself is always an option - No complex script language support by default - 3rd party tools available
  • 8. Cons 2 - No built-in support for (Demos avail. for how to implement) - HTML format - PDF format - Microsoft Office Documents - Advanced XML queries - “How tos” available. - No database gateway - Integrates with MySQL with little work - Web interface - JSP sample available - Missing enterprise support
  • 9. Lucene Libraries 1. The Lucene libraries include core search components such as a document indexer, index searcher, query parser, and text analyzer.
  • 10. Who is behind Lucene?  Doug Cutting (Author) Previously at Excite  Apache Software Foundation
  • 11. Who uses Lucene?  IBM - IBM OmniFind Yahoo! Edition  CNET - http://reviews.cnet.com/ - http://www.mail-archive.com/java-user@lucene.apache.org/msg02645.html  Wikipedia  Fedex  Akamai’s EdgeComputing platform  Technorati  FURL  Sun - Open Solaris Source Browser
  • 12. When to use Lucene?  Search applications  Search functionality for existing applications  Search enabling database application
  • 13. When not to use?  Not ideal for - Adding generic search to site - Enterprise systems needing support for proprietary formats - Extremely high volume systems - Through a better architecture this can be solved - Investigate carefully if - You need more than 100 QPS per system - Highly volatile data - Updates are actually Deletes and Additions - Additions visible to new sessions only
  • 14. Why Lucene?  What problems does Lucene solve? - Full text with MySQL - Pros and Cons  Powerful features  Simple API  Scalable, cost-effective, efficient Indexing - Powerful Searching through multiple query types
  • 15. Powerful features  Simple API - Sort by any field - Simultaneous updates and searching
  • 16. Core Index Classes  IndexWriter  Directory  Analyzer  Document  Field
  • 17. IndexWriter  IndexWriter - Creates new index - Adds document to new index - Gives you “write” access but no “read” access - Not the only class used to modify an index - Lucene API can be used as well
  • 18. Directory  Directory - Represents location of the Lucene Index - Abstract class - Allows its subclasses to store the index as they see fit - FSDirectory - RAMDirectory - Interface Identical to FSDirectory
  • 19. Analyzer  Analyzer - Text passed through analyzer before indexing - Specified in the IndexWriter constructor - Incharge of extracting tokens out of text to be indexed - Rest is eliminated - Several implementation available (stop words, lower case etc)
  • 20. Document  Document - Collection of fields (virtual document) - Chunk of data - Fields of a document represent the document or meta-data associated with that document - -Original source of Document data (word PDF) irrelevant - Metadata indexed and stored separately as fields of a document - Text only: java.lang.String and java.io.Reader are the only things handled by core
  • 21. Field 1  Field - Document in an index contains one or more fields (in a class called Field) - Each field represents data that is either queried against or retrieved from index during search. - Four different types: - Keyword - Isn’t analyzed - But indexed and stored in the index - Ideal for: - URLs - Paths - SSN - Names - Orginal value is reserved in entirety
  • 22. Field types - Unindexed - Neither analyzed nor indexed - Value stored in index as is - Fields that need to be displayed with search results (URL etc) - But you won’t search based on these fields - Because original values are stored - Don’t store fields with very large values - Especially if index size will be an issue
  • 23. Field types - Unstored - Opposite of UnIndexed - Field type is analyzed and indexed but isn’t stored in the index - Suitable for indexing a large amount of text that’s not going to be needed in original form - E.g. - HTML of a webpage etc
  • 24. Field types - Text - Analyzed and indexed - Field of this type can be searched against - Be careful about the field size - If data indexed is String, it will be stored - If Data is from a Reader - It will not be stored
  • 25. Note:  Field.Text(String, String) and Field.Text(String, Reader) are different. - (String, String) stores the field data - (String, Reader) does not  To index a String, but not store it, use - Field.UnStored(String, String)
  • 26. Classes for Basic Search Operations  IndexSearcher - Opens an index in read-only mode - Offers a number of search methods - Some of which implemented in Searcher class IndexSearcher is = new IndexSearcher( FSDirectory.getDirectory("/tmp/index", false)); Query q = new TermQuery(new Term("contents", "lucene")); Hits hits = is.search(q);
  • 27. Classes for Basic Search Operations  Term - Basic unit for searching - Consists of pair of string elements: name of field and value of field - Term objects are involved in indexing process - Term objects can be constructed and used with TermQUery Query q = new TermQuery(new Term("contents", "lucene")); Hits hits = is.search(q);
  • 28. Classes for Basic Search Operations  Query - A number of query subclasses - BooleanQuery - PhraseQuery - PrefixQuery - PhrasePrefixQuery - RangeQuery - FilteredQuery - SpanQuery
  • 29. Classes for Basic Search Operations  TermQuery - Most basic type of query supported by Lucene - Used for matching documents that contain fields with specific values  Hits - Simple container of pointers to ranked search results. - Hits instances don’t load from index all documents that match a query but only a small portion (performance)
  • 30. Indexing  Multiple type indexing - Scalable - High Performance - “over 20MB/minute on Pentium M 1.5GHz” - Incremental indexing and batch indexing have same cost - Index Size - index size roughly 20-30% the size of text indexed - Compare to MySQL’s FULL-TEXT index size - Cost-effective - 1 MB heap (small RAM needed)
  • 31. Powerful Searching & Sorting - Ranked Searching - Multiple Powerful Query Types - phrase queries, wildcard queries, proximity queries, range queries and more - Fielded Searching - fielded searching (e.g., title, author, contents) - Date Range Searching - date-range searching - Multiple Index Searching with Merged Results - Sort by any field
  • 32. How to Integrate Your Application With Lucene  Install JDK (5 or 6)  Testing Lucene Demo
  • 33. Prerequisites: JDK  Installing JDK - For downloading visit the JDK5 http://java.sun.com/javase/downloads/index_jdk5.jsp page - or JDK 6 download page http://java.sun.com/javase/downloads/index.jsp - Once downloaded: - Change Permissions - [root@srv31 jdk-install]# chmod 755 jdk-1_5_0_09-linux- i586.bin - Install - [root@srv31 jdk-install]# ./jdk-1_5_0_09-linux-i586.bin
  • 34. Testing Lucene Demo  Step 2: Testing Lucene Demo - Set up your environment - vi /root/.bashrc - export PATH=/var/www/html/java/jdk1.5.0_09/bin:$PATH export CLASSPATH=.:/var/www/html/java/jdk1.5.0_09:/var/www/html/java/jdk1.5.0_09/lib:/var/www/html/jav a/jdk1.5.0_09/lib/lucene-2.1.0/lucene-core-2.1.0.jar:/var/www/html/java/jdk1.5.0_09/lib/lucene- 2.1.0/lucene-demos-2.1.0.jar:/var/www/html/java/jdk1.5.0_09/lib/xmlrpc-3.0a1.jar - Now get and place in /var/www/html/java/jdk1.5.0_09/lib/lucene-2.1.0/ - Lucene Java - http://www.apache.org/dyn/closer.cgi/lucene/java/ - XMLRPC Library - [root@srv31 lib]# wget http://mirror.candidhosting.com/pub/apache/lucene/java/lucene-2.1.0.zip [root@srv31 lib]# unzip lucene-2.1.0.zip [root@srv31 lib]# cp -p lucene-2.1.0/lucene-core-2.1.0.jar ../lib/ [root@srv31 lib]# cp -p lucene-2.1.0/lucene-demos-2.1.0.jar ../lib/ [root@srv31 lib]# cp -p /var/www/html/java/jdk1.5.0_06/lib/xmlrpc-3.0a1.jar /var/www/html/java/jdk1.5.0_09/lib/xmlrpc-3.0a1.jar Now "dot" the above file: [root@srv31 lib]# . /root/.bashrc
  • 35. Testing Lucene Demo 2 - Believe it or not, we are now ready to test the Lucene Demo. - Indexing - I just let it loose on a randomly picked directory to give you an idea: [root@srv31 lib]# java org.apache.lucene.demo.IndexFiles /var/www/html/java/jdk1.5.0_09/ adding /var/www/html/java/jdk1.5.0_09/include/jni.h adding /var/www/html/java/jdk1.5.0_09/include/linux/jawt_md.h adding /var/www/html/java/jdk1.5.0_09/include/linux/jni_md.h adding /var/www/html/java/jdk1.5.0_09/include/jvmti.h adding /var/www/html/java/jdk1.5.0_09/include/jvmdi.h Optimizing... 157013 total milliseconds
  • 36. Testing Lucene Demo 3  [root@srv31 lib]# java org.apache.lucene.demo.SearchFiles  Query: java  Searching for: java  1159 total matching documents  1. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh.GBK/LC_MESSAGES/sunw_java_plugin.mo  2. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh/LC_MESSAGES/sunw_java_plugin.mo  3. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/ko/LC_MESSAGES/sunw_java_plugin.mo  4. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_HK.BIG5HK/LC_MESSAGES/sunw_java_plugin.mo  5. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_TW.BIG5/LC_MESSAGES/sunw_java_plugin.mo  6. /var/www/html/java/jdk1.5.0_09/jre/lib/locale/zh_TW/LC_MESSAGES/sunw_java_plugin.mo  7. /var/www/html/java/jdk1.5.0_09/demo/jfc/Stylepad/README.txt  8. /var/www/html/java/jdk1.5.0_09/demo/jfc/Notepad/README.txt  9. /var/www/html/java/jdk1.5.0_09/demo/plugin/jfc/Stylepad/README.txt  10. /var/www/html/java/jdk1.5.0_09/demo/plugin/jfc/Notepad/README.txt  more (y/n) ?
  • 37. Loading data from MySQL  …  String url = "jdbc:mysql://127.0.0.1/odp";  Connection con = DriverManager.getConnection(url, “user", “pass");  Statement Stmt = con.createStatement();  ResultSet RS = Stmt.executeQuery  ("SELECT * FROM " +  " articles" );
  • 38. Loading data from MySQL 2  while (RS.next()) {  // System.out.print(""" + RS.getString(1) + """);  try {  final Document doc = new Document();  // create Document  doc.add(Field.Text("title", RS.getString("title")));  doc.add(Field.Text("type", "article"));  doc.add(Field.Text("author", RS.getString("author")));  doc.add(Field.Text("body", RS.getString("body")));  doc.add(Field.Text("extended", RS.getString("extended")));  …
  • 39. Loading data from MySQL 3  …  doc.add(Field.Text("tags", RS.getString("tags")));  doc.add(Field.UnIndexed("permalink", RS.getString("permalink") ));  doc.add(Field.UnIndexed("id", RS.getString("id")));  doc.add(Field.UnIndexed("member_id", RS.getString("member_id")));  doc.add(Field.UnIndexed("portal_id", RS.getString("portal_id")));  //doc.add(Field.Text("id", RS.getString("id")));  writer.addDocument(doc);  }  catch (IOException e) { System.err.println("Unable to index student"); }  }  // close connection
  • 40. Searching Data using XML RPC  public static void searchArticles( final String search, final int numberOfResults)  throws Exception  {  final Query query;  Analyzer analyzer = new StandardAnalyzer();  query = QueryParser.parse(search, "title", analyzer);  final ArrayList ids = new ArrayList();  try {  final IndexReader reader = IndexReader.open(INDEX_DIR);  final IndexSearcher searcher = new IndexSearcher(reader);  final Hits hits = searcher.search(query);  for (int i = 0; i != hits.length() && i != numberOfResults; ++i) {  final Document doc = hits.doc(i);  // id field needs to be added //ids.add(new Integer(doc.getField("id").stringValue()));  …
  • 41. Searching Data using XML RPC 2  …  ids.add(new Integer(doc.getField("id").stringValue()));  System.out.println("Found + " + doc.getField("id").stringValue() );  System.out.println("--Title = " + doc.getField("title").stringValue() );  System.out.println("--Type = " + doc.getField("type").stringValue() );  System.out.println("--Body = " + doc.getField("body").stringValue() );  System.out.println("--Author = " + doc.getField("author").stringValue() );  System.out.println("--Extended = " + doc.getField("extended").stringValue() );  System.out.println("--Tags = " + doc.getField("tags").stringValue() );  System.out.println("--Permalink = " + doc.getField("permalink").stringValue() );  System.out.println("--Member Id = " + doc.getField("member_id").stringValue() );  System.out.println("--Portal Id = " + doc.getField("portal_id").stringValue() );
  • 42. Searching Data using XML RPC 3  }  searcher.close();  reader.close();  }  catch (IOException e) {  System.out.println("Error while reading student data from index");  }  }
  • 43. Future of Lucene  Advanced Linguistics Modules that integrate with Lucene - Support for complex script languages - Basis Technologies’ Rosette® Linguistics Platform - The same linguistic software that powers multilingual web search on Google, Live.com, Yahoo! and leading enterprise search engines - “allows Lucene-based applications to index and search text in multiple languages concurrently, including complex script languages such as Arabic, Chinese, Farsi, Japanese and Korean. “ - www.basistech.com/lucene
  • 44. What are the ports of Lucene  Lucene4c - C  CLucene - C++  MUTIS - Delphi  Lucene.Net - a straight C#/.NET port of Lucene by the Apache Software Foundation, fully compatible with it.  Plucene - Perl  Kinosearch - Perl  Pylucene - Lucene interfaced with a Python front-end  Ferret and RubyLucene - Ruby  Zend Framework (Search) - PHP  Montezuma - Common Lisp
  • 45. Where to get help about Lucene?  http://lucene.apache.org/java/docs/mailinglists.html  IRC
  • 46. Books about Lucene  Lucene in Action - Erik Hatcher and Otis Gospodnetic