Created
September 19, 2011 12:09
-
-
Save jgeraerts/1226375 to your computer and use it in GitHub Desktop.
fetch solr server instance directly from hybris
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FacetSearchConfig config = facetSearchConfigService.getConfiguration("prdSolrConf"); | |
IndexedType indexedType = config.getIndexConfig().getIndexedType("PSProduct"); | |
SearchQuery query = new SearchQuery(config, indexedType); | |
SolrServer solrServer = solrService.getSolrServer(config.getSolrConfig(), indexedType); | |
String s = fieldNameProvider.getFieldName(indexedType.getIndexedProperty("categories"),null, FieldNameProvider.FieldType.INDEX); | |
SolrQuery q = new SolrQuery("*:*"); | |
q.addFilterQuery(s+":"+code); | |
QueryResponse response = solrServer.query(q); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment