use of org.alfresco.solr.query.Solr4QueryParser in project SearchServices by Alfresco.
the class AlfrescoSolrDataModel method getLuceneQueryParser.
public Solr4QueryParser getLuceneQueryParser(SearchParameters searchParameters, SolrQueryRequest req, FTSQueryParser.RerankPhase rerankPhase) {
Analyzer analyzer = req.getSchema().getQueryAnalyzer();
Solr4QueryParser parser = new Solr4QueryParser(req, Version.LUCENE_5_5_0, searchParameters.getDefaultFieldName(), analyzer, rerankPhase);
parser.setNamespacePrefixResolver(namespaceDAO);
parser.setDictionaryService(getDictionaryService(CMISStrictDictionaryService.DEFAULT));
parser.setTenantService(tenantService);
parser.setSearchParameters(searchParameters);
parser.setAllowLeadingWildcard(true);
Properties props = new CoreDescriptorDecorator(req.getCore().getCoreDescriptor()).getProperties();
int topTermSpanRewriteLimit = Integer.parseInt(props.getProperty("alfresco.topTermSpanRewriteLimit", "1000"));
parser.setTopTermSpanRewriteLimit(topTermSpanRewriteLimit);
return parser;
}
Aggregations