Example usage for org.apache.lucene.queryparser.flexible.core QueryNodeException getLocalizedMessage

List of usage examples for org.apache.lucene.queryparser.flexible.core QueryNodeException getLocalizedMessage

Introduction

In this page you can find the example usage for org.apache.lucene.queryparser.flexible.core QueryNodeException getLocalizedMessage.

Prototype

@Override
    public String getLocalizedMessage() 

Source Link

Usage

From source file:suonos.lucene.QueryHelper.java

License:Apache License

public Query createQuery(String query) {
    query = query.trim();//from ww w .ja  va 2 s  .co m

    if (query.isEmpty())
        return null;

    try {
        return stmt.standardQueryParser().parse(query, "title");

    } catch (QueryNodeException e) {
        throw new ServiceException(e.getLocalizedMessage());
    }
}