Top Description Constructors Methods
org.jabref.logic.importer

public Class QueryParser

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Comparator, .HashSet, .List, .Optional, .Set, org.jabref.logic.importer.fetcher.ComplexSearchQuery, org.apache.lucene.index.Term, org.apache.lucene.queryparser.flexible.core.QueryNodeException, org.apache.lucene.queryparser.flexible.standard.StandardQueryParser, org.apache.lucene.search.Query, org.apache.lucene.search.QueryVisitor

This class converts a query string written in lucene syntax into a complex query. For simplicity this is currently limited to fielded data and the boolean AND operator.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Optional<ComplexSearchQuery>

Returns:

A complex query containing all fields of the query string
parseQueryStringIntoComplexQuery
(String
The given query string
query
)

Parses the given query string into a complex query using lucene.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

QueryParserback to summary
public QueryParser()

Method Detail

parseQueryStringIntoComplexQueryback to summary
public Optional<ComplexSearchQuery> parseQueryStringIntoComplexQuery(String query)

Parses the given query string into a complex query using lucene.

Note

For unique fields, the alphabetically and numerically first instance in the query string is used in the complex query.

Parameters
query:String

The given query string

Returns:Optional<ComplexSearchQuery>

A complex query containing all fields of the query string