-
Improvement
-
Resolution: Fixed
-
Neutral
-
2.2
-
None
-
-
Empty show more show less
-
Sprint 7 (Kromeriz)
-
2
The Magnolia Solr implementation uses the default Solr query syntax which means that you can search in all defined fields.
We notice however that when you search on an undefined field (in the Solr index) you get an ugly exception stack trace in the logs. E.g. searching in the undefined field 'body' (e.g. https://www.magnolia-cms.com/search.html?queryStr=body:solr) results in:
2015-05-12 13:27:00,171 ERROR earchprovider.logic.model.FacetedSearchResultModel: Error occurred during perform search. org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: undefined field body at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:424) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180) at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90) at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301) at info.magnolia.search.solrsearchprovider.logic.providers.FacetedSolrSearchProvider.removeOutdatedIndexes(FacetedSolrSearchProvider.java:443)
It would be nice if these searches would not result in a stack trace because this can easily fill up our logs.
PS: searching on a defined field like 'title' works well (e.g. https://www.magnolia-cms.com/search.html?queryStr=title:solr) however I would have expected that searching in the 'content' field as defined in the customised Solr schema.xml would give search results but it does not give any.. E.g:
https://www.magnolia-cms.com/search.html?queryStr=content:solr