Full-Text Search with Lucene Yonik Seeley 02 May 2007 Amsterdam, Netherlands.

Slides:



Advertisements
Similar presentations
Lucene in action Information Retrieval A.A – P. Ferragina, U. Scaiella – – Dipartimento di Informatica – Università di Pisa –
Advertisements

Lucene/Solr Architecture
Lucene Tutorial Based on Lucene in Action Michael McCandless, Erik Hatcher, Otis Gospodnetic.
Introduction to Information Retrieval Introduction to Information Retrieval Lucene Tutorial Chris Manning and Pandu Nayak.
© Copyright 2012 STI INNSBRUCK Apache Lucene Ioan Toma based on slides from Aaron Bannert
Advanced Indexing Techniques with Apache Lucene - Payloads Advanced Indexing Techniques with Michael Busch
Advanced Indexing Techniques with
Apache Solr Yonik Seeley 29 June 2006 Dublin, Ireland.
The Lucene Search Engine Kira Radinsky Modified by Amit Gross to Lucene 4 Based on the material from: Thomas Paul and Steven J. Owens.
Lucene in action Information Retrieval A.A – P. Ferragina, U. Scaiella – – Dipartimento di Informatica – Università di Pisa –
Solr has a lot of extensive features Solr Integration and Enhancements Todd Hatcher.
Full Text Search using Azure Search. Shankar Subramanyam Senior Consultant | Enthusiast:
The Lucene Search Engine Kira Radinsky Based on the material from: Thomas Paul and Steven J. Owens.
Introduction to Open Source Search with Apache Lucene and Solr Grant Ingersoll.
Parametric search and zone weighting Lecture 6. Recap of lecture 4 Query expansion Index construction.
Introduction to Lucene Debapriyo Majumdar Information Retrieval – Spring 2015 Indian Statistical Institute Kolkata.
Lucene in action Information Retrieval A.A – P. Ferragina, U. Scaiella – – Dipartimento di Informatica – Università di Pisa –
1 Open-Source Search Engines and Lucene/Solr UCSB 290N Tao Yang Slides are based on Y. Seeley, S. Das, C. Hostetter.
Introduction to Information Retrieval Introduction to Information Retrieval Lucene Tutorial Chris Manning, Pandu Nayak, and Prabhakar Raghavan.
Implementing search with free software An introduction to Solr By Mick England.
Full-Text Search with Lucene Yonik Seeley 02 May 2007 Amsterdam, Netherlands slides:
Word Up! Using Lucene for full-text search of your data set.
Powerful Full-Text Search with Solr Yonik Seeley Web 2.0 Expo, Berlin 8 November 2007 download at
1 Introduction to Lucene Rong Jin. What is Lucene ?  Lucene is a high performance, scalable Information Retrieval (IR) library Free, open-source project.
Introduction to Apache Lucene/Solr CSCI 572: Information Retrieval and Search Engines Summer 2010.
Search Search Drupal with Apache Solr with CERN Web Communications Group – Copyright 2013.
Apache Lucene in LexGrid. Lucene Overview High-performance, full-featured text search engine library. Written entirely in Java. An open source project.
© NYC Apache Lucene/Solr Meetup. Lucid Imagination, Inc. Agenda Welcome "Faster. Better. Solr! What to look for in Solr 1.4“ Yonik Seeley,
Nutch Search Engine Tool. Nutch overview A full-fledged web search engine Functionalities of Nutch  Internet and Intranet crawling  Parsing different.
Softvérové knižnice a systémy Vyhľadávanie informácií Michal Laclavík.
1 Lucene Jianguo Lu School of Computer Science University of Windsor.
Lucene Open Source Search Engine. Lucene - Overview Complete search engine in a Java library Stand-alone only, no server – But can use SOLR Handles indexing.
Lucene Boot Camp I Grant Ingersoll Lucid Imagination Nov. 3, 2008 New Orleans, LA.
Lucene Performance Grant Ingersoll November 16, 2007 Atlanta, GA.
Vyhľadávanie informácií Softvérové knižnice a systémy Vyhľadávanie informácií Michal Laclavík.
Lucene Part2. Lucene Jarkarta Lucene ( is a high- performance, full-featured, java, open-source, text search engine.
University of North Texas Libraries Building Search Systems for Digital Library Collections Mark E. Phillips Texas Conference on Digital Libraries May.
Revolutionizing enterprise web development Searching with Solr.
Lucene Part1 ‏. Lucene Use Case Store data in a 2 dimensional way How do we do this. Spreadsheet Relational Database X/Y.
Indexing UMLS concepts with Apache Lucene Julien Thibault University of Utah Department of Biomedical Informatics.
Introduction to Digital Libraries hussein suleman uct cs honours 2003.
Lucene-Demo Brian Nisonger. Intro No details about Implementation/Theory No details about Implementation/Theory See Treehouse Wiki- Lucene for additional.
“ Lucene.Net is a source code, class-per-class, API-per-API and algorithmatic port of the Java Lucene search engine to the C# and.NET ”
Iccha Sethi Serdar Aslan Team 1 Virginia Tech Information Storage and Retrieval CS 5604 Instructor: Dr. Edward Fox 10/11/2010.
Lucene Boot Camp Grant Ingersoll Lucid Imagination Nov. 4, 2008 New Orleans, LA.
Design a full-text search engine for a website based on Lucene
807 - TEXT ANALYTICS Massimo Poesio Lab 2: (Quick intro to) SOLR Document clustering with MAHOUT.
Lucene Jianguo Lu.
1 CS 8803 AIAD (Spring 2008) Project Group#22 Ajay Choudhari, Avik Sinharoy, Min Zhang, Mohit Jain Smart Seek.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
CS520 Web Programming Full Text Search Chengyu Sun California State University, Los Angeles.
HW3 Overview There are 4 components to this homework; you will possibly not need all of them; 1. Installing Ubuntu 2. Installing Solr 3. Using Solr to.
Introduction to Information Retrieval Introduction to Information Retrieval ΜΕ003-ΠΛΕ70: Ανάκτηση Πληροφορίας Διδάσκουσα: Ευαγγελία Πιτουρά Εισαγωγή στο.
Lucene : Text Search IG5 – TILE Esther Pacitti. Basic Architecture.
Apache Lucene Searching the Web and Everything Else Daniel Naber Mindquarry GmbH ID 380.
Lucene Tutorial Chris Manning and Pandu Nayak
Why indexing? For efficient searching of a document
Jianguo Lu School of Computer Science University of Windsor
Searching AND INDEXING Big data
IST 516 Fall 2010 Dongwon Lee, Ph.D. Wonhong Nam, Ph.D.
CS276 Lucene Section.
Searching and Indexing
Safe by default, optimized for efficiency
Building Search Systems for Digital Library Collections
Vores tankesæt: 80% teknologi | 20% forretning
Lucene in action Information Retrieval A.A
Lucene/Solr Architecture
Introduction to Elasticsearch with basics of Lucene May 2014 Meetup
Rafał Kuć – Sematext sematext.com
Table of Contents 1) Understanding Lucene 2) Lucene Indexing
Presentation transcript:

Full-Text Search with Lucene Yonik Seeley 02 May 2007 Amsterdam, Netherlands

What is Lucene High performance, scalable, full-text search library Written by Doug Cutting, 100% Java Focus: Indexing + Searching Documents Easily embeddable, no config files No crawlers or document parsing

Inverted Index aardvark hood red little riding robin women zoo Little Red Riding Hood Robin Hood Little Women

Basic Application IndexWriterIndexSearcher Lucene Index Document field1: value1 field2: value2 field3: value3 Hits (Matching Docs) Query addDocument()search()

Indexing Documents IndexWriter writer = new IndexWriter(directory, analyzer, true); Document doc = new Document(); doc.add(new Field("title", "Lucene in Action", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("author", "Erik Hatcher", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("author", "Otis Gospodnetic", Field.Store.YES, Field.Index.TOKENIZED)); writer.addDocument(doc); writer.close();

Field Options Indexed –Necessary for searching or sorting Tokenized –Text analysis done before indexing Stored Compressed Binary –Currently for stored-only fields

Searching an Index IndexSearcher searcher = new IndexSearcher(directory); QueryParser parser = new QueryParser("defaultField", analyzer); Query query = parser.parse("title:Lucene"); Hits hits = searcher.search(query); System.out.println(“matches:" + hits.length()); Document doc = hits.doc(0); System.out.println(“first:" + doc.get("title")); searcher.close();

Scoring VSM – Vector Space Model tf – numer of terms in field lengthNorm – number of tokens in field idf – number of documents containing term coord – coordination factor, number of matching terms document boost query clause boost

Query Construction Lucene QueryParser Example: queryParser.parse("title:spiderman"); good for IPC, human entered queries, debug does text analysis and constructs appropriate queries not all query types supported Programmatic query construction Example: new TermQuery(new Term(“title”,”spiderman”)) explicit, no escaping necessary

Query Examples 1.mission impossible EQUIV: mission OR impossible QueryParser default is “optional” 2.+mission +impossible –actor:cruise EQUIV: mission AND impossible NOT cruise 3.“mission impossible” –actor:cruise 4.title:spiderman^10 description:spiderman 5.description:“spiderman movie”~10

Query Examples2 1.releaseDate:[2000 TO 2007] Range search: lexicographic ordering, so beware of numbers 2.Wildcard searches: te?t, te*t, test* 3.spider~ Fuzzy search: Levenshtein distanceLevenshtein distance Optional minimum similarity: spider~0.7 4.*:* 5.(a AND b) OR (c AND d)

Deleting Documents IndexReader.deleteDocument(int id) –exclusive with IndexWriter –powerful Deleting with IndexWriter –deleteDocuments(Term t) –updateDocument(Term t, Document d) Deleting does not immediately reclaim space

Performance Decrease index segments Lower merge factor Optimize Use cached filters ‘+title:spiderman +released:true’ ‘title:spiderman’ filtered by ‘released:true’

Index Structure _0.fnm _0.fdt _0.fdx _0.frq _0.tis _0.tii _0.prx _0.nrm _0_1.del segments_3 IndexWriter params MaxBufferedDocs MergeFactor MaxMergeDocs MaxFieldLength

Search Relevancy PowerShot SD 500 PowerShotSD500 SD500PowerShot PowerShot sd500powershot powershot WhitespaceTokenizer WordDelimiterFilter catenateWords=1 LowercaseFilter power-shot sd500 power-shotsd500 sd500powershot sd500powershot WhitespaceTokenizer WordDelimiterFilter catenateWords=0 LowercaseFilter Query Analysis A Match! Document Analysis

Tokenizers Tokenizers break field text into tokens StandardTokenizer –source string: “full-text lucene.apache.org” –“full” “text” “lucene.apache.org” WhitespaceTokenizer –“full-text” “lucene.apache.org” LetterTokenizer –“full” “text” “lucene” “apache” “org”

TokenFilters LowerCaseFilter StopFilter LengthFilter ISOLatin1AccentFilter SnowballPorterFilter –stemming: reducing words to root form –rides, ride, riding => ride –country, countries => countri contrib/analyzers for other languages

Analyzers class MyAnalyzer extends Analyzer { private Set myStopSet = StopFilter.makeStopSet(StopAnalyzer.ENGLISH_STOP_ WORDS); public TokenStream tokenStream(String fieldname, Reader reader) { TokenStream ts = new StandardTokenizer(reader); ts = new StandardFilter(ts); ts = new LowerCaseFilter(ts); ts = new StopFilter(ts, myStopSet); return ts; }

Analysis Tips Use PerFieldAnalyzerWrapper Add same field more than once, analyze differently –Boost exact case matches –Boost exact tense matches –Query with or without synonyms –Soundex for sounds-like queries

Nutch Open source web search application Crawlers Link-graph database Document parsers (HTML, word, pdf, etc) Language + charset detection Utilizes Hadoop (DFS + MapReduce) for massive scalability

Solr XML/HTTP, JSON APIs Faceted search / navigation Flexible Data Schema Hit Highlighting Configurable Caching Replication Web admin interface Solr Flare: Ruby on Rails user interface

Questions?