Lucene 4 Cookbook
eBook - ePub

Lucene 4 Cookbook

Edwood Ng, Vineeth Mohan

Share book
  1. 220 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Lucene 4 Cookbook

Edwood Ng, Vineeth Mohan

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Lucene 4 Cookbook an online PDF/ePUB?
Yes, you can access Lucene 4 Cookbook by Edwood Ng, Vineeth Mohan in PDF and/or ePUB format, as well as other popular books in Computer Science & Databases. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781782162285
Edition
1

Lucene 4 Cookbook


Table of Contents

Lucene 4 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introducing Lucene
Introduction
How Lucene works
Why is Lucene so popular?
Some Lucene implementations
Installing Lucene
How to do it...
How it worksā€¦
Setting up a simple Java Lucene project
Getting ready
How to do it...
How it works...
Obtaining an IndexWriter
How to do itā€¦
How it worksā€¦
Creating an analyzer
Getting ready
How to do it...
How it worksā€¦
Creating fields
How to do it...
How It Works
Creating and writing documents to an index
How to do it...
How it worksā€¦
Deleting documents
How to do it...
How it worksā€¦
Obtaining an IndexSearcher
How to do it...
How it worksā€¦
Creating queries with the Lucene QueryParser
How to do it...
How it worksā€¦
Performing a search
How to do it...
How it worksā€¦
Enumerating results
How to do it...
How it worksā€¦
2. Analyzing Your Text
Introduction
Obtaining a common analyzer
Getting ready
How to do it...
How it works...
There's moreā€¦
Obtaining a TokenStream
Getting ready
How to do it...
How it worksā€¦
Obtaining TokenAttribute values
Getting ready
How to do itā€¦
How it worksā€¦
Using PositionIncrementAttribute
Getting ready
How to do it...
How it worksā€¦
Using PerFieldAnalyzerWrapper
Getting ready
How to do itā€¦
How it worksā€¦
Defining custom TokenFilters
How to do itā€¦
How it worksā€¦
Defining custom analyzers
How to do itā€¦
How it worksā€¦
Defining custom tokenizers
How to do itā€¦
How it worksā€¦
Defining custom attributes
How to do itā€¦
How it worksā€¦
3. Indexing Your Data
Introduction
Obtaining an IndexWriter
How to do it...
How it works...
Creating a StringField
How to do it...
How it works...
Creating a TextField
How to do it...
How it works...
Creating a numeric field
How to do it...
How it works...
Creating a DocValue Field
How to do it...
How it works...
Transactional commits and index versioning
How to do it...
How it works...
Reusing field and document objects per thread
How to do It...
How it works...
Delving into field norms
How to do it...
How it works...
Changing similarity implementation used during indexing
Getting ready
How to do itā€¦
4. Searching Your Indexes
Introduction
Obtaining IndexReaders
How to do it...
How it works...
Un-inverting single-valued fields in memory with FieldCache
How to do it...
How it works...
TermVectors
How to do it...
How it works...
IndexSearcher
How to do it...
How it works...
Constructing queries
How to do it...
How it works...
Specifying sort logic
How to do it...
How it works...
Forming a search result
How to do it...
How it works...
Pagination
How to do it...
How it works...
Using Collectors
How to do it...
How it works...
Sorting with custom FieldComparator
How to do it...
How it works...
5. Near Real-time Searching
Introduction
Using the DirectoryReader to open index in Near Real-Time
How to do it...
How it works...
Using the SearcherManager to refresh IndexSearcher
How to do it...
How it works...
Generational indexing with TrackingIndexWriter
How to do itā€¦
How it works...
Maintaining search sessions with SearcherLifetimeManager
How to do itā€¦
How it worksā€¦
Performance tuning: latency and throughput
How to do itā€¦
How it worksā€¦
6. Querying and Filtering Data
Introduction
Performing advanced filtering
How to do it...
How it worksā€¦
Creating a custom filter
How to do it...
Searching with QueryParser
How to do it..
Wildcard search
Term range search
Autogenerated phrase query
Date resolution
Default operator
Enable position increments
Fuzzy query
Lowercase expanded term
Phrase slop
TermQuery and TermRangeQuery
How to do it..
BooleanQuery
How to do it..
How it worksā€¦
PrefixQuery and WildcardQuery
How to do it...
How it worksā€¦
PhraseQuery and MultiPhraseQuery
How to do it...
How it worksā€¦
FuzzyQuery
How to do it...
How it worksā€¦
NumericRangeQuery
How to do itā€¦
How it worksā€¦
DisjunctionMaxQuery
How to do itā€¦
How it worksā€¦
RegexpQuery
How to do itā€¦
SpanQuery
How to do it...
How it worksā€¦
CustomScoreQuery
How to do itā€¦
How it worksā€¦
7. Flexible Scoring
Introduction
Overriding similarity
How to do itā€¦
How it worksā€¦
There's moreā€¦
The BM25 model
The language model
The divergence from randomness model
The information-based Model
Implementing the BM25 model
How to do Itā€¦
How it worksā€¦
Implementing the language model
How to do itā€¦
Implementing the divergence from randomness model
How to do Itā€¦
How it worksā€¦
Implementing the information-based model
How to do Itā€¦
How it worksā€¦
8. Introducing Elasticsearch
Introduction
Getting Elasticsearch
Getting ready
How to do it...
How it works...
There's moreā€¦
Creating a new index
How to do itā€¦
How it worksā€¦
Predefine field mappings
How to do it...
How it works....
Adding a document
How to do it...
How it works...
Deleting a document
How to do itā€¦
How it worksā€¦
Updating a document
How to do itā€¦
How it worksā€¦
Performing bulk indexing
How to do itā€¦
How it worksā€¦
Searching the index
How to do it...
How it works...
There's moreā€¦
Scaling Elasticsearch
How to do itā€¦
How it worksā€¦
There's moreā€¦
9. Extending Lucene with Modules
Introduction
Exploring spatial search
Getting readyā€¦
How to do itā€¦
How it worksā€¦
There's moreā€¦
Implementing joins
Getting readyā€¦
How to do itā€¦
Performing faceting
Getting readyā€¦
How to do itā€¦
How it worksā€¦
Implementing grouping
Getting readyā€¦
How to do itā€¦
Employing autosuggest
Getting readyā€¦
How to do itā€¦
Implementing highlighting
Getting readyā€¦
How to do itā€¦
How it worksā€¦
Index

Lucene 4 Cookbook

Copyright Ā© 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products menti...

Table of contents