Details
-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
None
Description
Hi, in my opinion, saving multivalue fields (JCR) to SOLR as String (separated by comma) is very not correct.
If in SOLR schema field is configured as multivalue, it should be saved as array, but Magnolia
info.magnolia.search.solrsearchprovider.logic.indexer.SolrIndexerImpl class expects all "things" to be String (Map<String,String> things).
Because of that info.magnolia.search.solrsearchprovider.logic.indexer.BasicSolrIndexService turns String[] into String:
else if(o instanceof String[])
{ value = StringUtils.join((String[])((String[])o), ", "); }Because of that value is stored in solr like:
"articleOldUrls": [
"text, another, yet-another"
]
instead of:
"articleOldUrls": [
"text",
"another",
"yet-another"
]
That makes solr search unusable, I can't do query:
http://localhost:8983/solr/vinl_collection/select?q=articleOldUrls%3Ayet-another&wt=json&indent=true
because it won't return any results.
When I did some hacking, and passed String[] array to SolrInputDocument and then I saved it using standard magnoliaSolrBrigde, it works fine.
I think this should be fixed.
Regards
Mariusz
Checklists
Attachments
Issue Links
- is duplicated by
-
MGNLEESOLR-89 Multi value field indexing
-
- Closed
-