09-09-2015 10:28 AM
SELECT * FROM custom:type WHERE CONTAINS('test')
SELECT * FROM custom:type WHERE CONTAINS('TEXT:test')
SELECT * FROM custom:type WHERE CONTAINS('ALL:test')
ERROR [solr.core.SolrCore] [http-bio-8443-exec-3] java.lang.UnsupportedOperationException
at org.alfresco.solr.query.Solr4QueryParser.createAllQuery(Solr4QueryParser.java:1005)
at org.alfresco.solr.query.Solr4QueryParser.getFieldQuery(Solr4QueryParser.java:615)
at org.alfresco.solr.query.Lucene4QueryParserAdaptor.getFieldQuery(Lucene4QueryParserAdaptor.java:67)
at org.alfresco.solr.query.Lucene4QueryParserAdaptor.getFieldQuery(Lucene4QueryParserAdaptor.java:48)
at org.alfresco.repo.search.impl.querymodel.impl.lucene.functions.LuceneFTSTerm.addComponent(LuceneFTSTerm.java:68)
at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneFunctionalConstraint.addComponent(LuceneFunctionalConstraint.java:57)
at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQuery.buildQuery(LuceneQuery.java:105)
at org.alfresco.solr.AlfrescoSolrDataModel.getCMISQuery(AlfrescoSolrDataModel.java:2004)
at org.alfresco.solr.query.CmisQParserPlugin$CmisQParser.parse(CmisQParserPlugin.java:189)
at org.apache.solr.search.QParser.getQuery(QParser.java:141)
01-28-2016 11:08 AM
protected Query createAllQuery(String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException {
// Set<String> all = searchParameters.getAllAttributes();
// if ((all null) || (all.size() 0))
// {
// Collection<QName> contentAttributes = dictionaryService.getAllProperties(null);
// BooleanQuery query = new BooleanQuery();
// for (QName qname : contentAttributes)
// {
// // The super implementation will create phrase queries etc if required
// Query part = getFieldQuery(PROPERTY_FIELD_PREFIX + qname.toString(), queryText, analysisMode, luceneFunction);
// if (part != null)
// {
// query.add(part, Occur.SHOULD);
// }
// else
// {
// query.add(createNoMatchQuery(), Occur.SHOULD);
// }
// }
// return query;
// }
// else
// {
// BooleanQuery query = new BooleanQuery();
// for (String fieldName : all)
// {
// Query part = getFieldQuery(fieldName, queryText, analysisMode, luceneFunction);
// if (part != null)
// {
// query.add(part, Occur.SHOULD);
// }
// else
// {
// query.add(createNoMatchQuery(), Occur.SHOULD);
// }
// }
// return query;
// }
throw new UnsupportedOperationException();
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.