Package org.sindice.siren.qparser.json

Examples of org.sindice.siren.qparser.json.JsonQueryParser


    parser.setDatatypeAnalyzers(this.getDatatypeAnalyzers());
    return parser.parse(keywordQuery, SimpleIndexer.DEFAULT_SIREN_FIELD);
  }

  public Query parseJsonQuery(final String JsonQuery) throws QueryNodeException {
    final JsonQueryParser parser = new JsonQueryParser();
    final KeywordQueryParser kParser = new KeywordQueryParser();
    kParser.setDatatypeAnalyzers(this.getDatatypeAnalyzers());
    kParser.setAllowTwig(false);
    parser.setKeywordQueryParser(kParser);
    return parser.parse(JsonQuery, SimpleIndexer.DEFAULT_SIREN_FIELD);
  }
View Full Code Here


  @Override
  protected Query parse(final String field, final String qstr,
                        final Map<String, Analyzer> datatypeConfig)
  throws ParseException {
    final JsonQueryParser parser = new JsonQueryParser();
    parser.setDefaultOperator(this.getDefaultOperator());
    parser.getKeywordQueryParser().setQNames(qnames);
    parser.getKeywordQueryParser().setDatatypeAnalyzers(datatypeConfig);

    try {
      return parser.parse(qstr, field);
    }
    catch (final QueryNodeException e) {
      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.sindice.siren.qparser.json.JsonQueryParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.