Top Fields Constructors Methods
org.jabref.logic.pdf.search

public final Class PdfSearcher

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .List, .Objects, .Optional, org.jabref.gui.LibraryTab, org.jabref.model.pdf.search.PdfSearchResults, .SearchResult, org.jabref.model.strings.StringUtil, org.apache.lucene.analysis.Analyzer, org.apache.lucene.analysis.en.EnglishAnalyzer, org.apache.lucene.index.DirectoryReader, org.apache.lucene.index.IndexReader, org.apache.lucene.index.IndexWriter, org.apache.lucene.queryparser.classic.MultiFieldQueryParser, org.apache.lucene.queryparser.classic.ParseException, org.apache.lucene.search.IndexSearcher, org.apache.lucene.search.Query, org.apache.lucene.search.ScoreDoc, org.apache.lucene.search.TopDocs, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final org.apache.lucene.analysis.Analyzer
private final PdfIndexer
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PdfSearcher
of(PdfIndexer indexer)

public PdfSearchResults

Returns:

a result set of all documents that have matches in any fields
search
(final String
a pattern to search for matching entries in the index, must not be null
searchString
,
final int
number of maximum search results, must be positive
maxHits
)

Search for results matching a query in the Lucene search index

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

englishAnalyzerback to summary
private final org.apache.lucene.analysis.Analyzer englishAnalyzer
indexerback to summary
private final PdfIndexer indexer
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

PdfSearcherback to summary
private PdfSearcher(PdfIndexer indexer)

Method Detail

ofback to summary
public static PdfSearcher of(PdfIndexer indexer) throws IOException
searchback to summary
public PdfSearchResults search(final String searchString, final int maxHits) throws IOException

Search for results matching a query in the Lucene search index

Parameters
searchString:String

a pattern to search for matching entries in the index, must not be null

maxHits:int

number of maximum search results, must be positive

Returns:PdfSearchResults

a result set of all documents that have matches in any fields