Last part for open cmis wire up ALF-10131 SOLR: CMISQueryServices (old and open cmis) broken with SOLR (was WCMQS does not work, error on the page)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30371 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2011-09-09 10:08:16 +00:00
parent 1b0c7a1047
commit 661e8777f7
2 changed files with 31 additions and 4 deletions

View File

@@ -3,11 +3,22 @@
<beans>
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<ref bean="search.lucene.sql.alfresco" />
</property>
</bean>
<bean id="search.lucene.sql.alfresco" class="org.alfresco.repo.search.impl.solr.SolrQueryLanguage" >
<property name="factories">
<list>

View File

@@ -25,6 +25,7 @@ import org.alfresco.repo.search.impl.querymodel.QueryOptions;
import org.alfresco.repo.search.impl.querymodel.QueryOptions.Connective;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.LimitBy;
import org.alfresco.service.cmr.search.QueryParameterDefinition;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
@@ -141,7 +142,22 @@ public class CMISQueryOptions extends QueryOptions
//searchParameters.setPermissionEvaluation()
searchParameters.setQuery(this.getQuery());
searchParameters.setSkipCount(this.getSkipCount());
//searchParameters.addAllAttribute()
for(Locale locale : this.getLocales())
{
searchParameters.addLocale(locale);
}
for(QueryParameterDefinition queryParameterDefinition: this.getQueryParameterDefinitions())
{
searchParameters.addQueryParameterDefinition(queryParameterDefinition);
}
//searchParameters.addQueryTemplate(name, template)
//searchParameters.addSort()
for(StoreRef storeRef : this.getStores())
{
searchParameters.addStore(storeRef);
}
//searchParameters.addTextAttribute()
return searchParameters;
}
}