02-18-2020 03:18 AM
Hi everybody,
1) I want to implement searching by custom properties. I created a data model with custom properties and added new fields to the facetFields in app.config.json.
They are displayed in the application but every (string type) option is preceded with the "{en}" prefix. When a user clicks on an option, search returns 0 results. Does anyone know how to get rid of the prefix and fix this?
2) I would also like to use the data-range component for the dates in the future (currently it's impossible to select future dates). Is that possible?
Thanks for your help!
02-27-2020 03:59 AM
We got it working now, actually we didn't reindex Solr correctly but after following the instructions it worked and the prefixes aren't showing anymore.
02-19-2020 11:46 AM
02-20-2020 07:11 AM
Hey @EddieMay,
I've been able to use the queries to filter by future dates...
e.g.:
"facetQueries": { "label": "Some Date", "expanded": false, "queries": [ { "label": "SEARCH.FACET_QUERIES.TODAY", "query": "uibkVMa:Date:[TODAY to TODAY]" }, { "label": "This Week", "query": "uibkVMa:Date:[TODAY TO NOW/DAY+7DAYS]" }, { "label": "This Year", "query": "uibkVMa:Date:[TODAY TO NOW/DAY+1YEAR]" } ] },
... but I wanted to use the Search date range component specifically (link), so the user can chose the time period freely. I don't think I can put any query specifying future dates here:
"categories": [ { "id": "createdDateRange", "name": "SEARCH.CATEGORIES.CREATED_DATE", "enabled": true, "component": { "selector": "date-range", "settings": { "field": "cm:created", "dateFormat": "DD-MMM-YY" } } },
More importantly, any idea about the {en} prefixes preceding custom properties (point 1)?
Thanks for your help!
02-20-2020 10:14 AM
Hi, we have an open issue for the dates https://github.com/Alfresco/alfresco-ng2-components/issues/5122.
About the en prefix. Have you check is not something that comes from your response in the network ?
Check for all the call with /public/search/versions/1/search
02-20-2020 10:14 AM
Hi @dzider ,
the {en} prefix problem seems related to your Solr instance configuration.
Do you have the same problem using Alfresco Share search page?
You need to add multilanguage support on your Solr configuration file, see point 5 of our documentation: https://docs.alfresco.com/search-enterprise/tasks/solr-install.html (assuming you're using Alfresco Search Service).
This are the lines to add to the 'shared.properties' Solr configuration file:
alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext
After the change you need to reindex your Solr.
Let me know if this solves your issue.
02-26-2020 10:14 AM
Hi, we're having the same problem with the {en} prefix showing up on custom properties.
We added the lines on shared.properties file and reindexed Solr but we're still experiencing this problem. In Alfresco Share search page we get 'undefined' followed by the property value.
02-27-2020 03:59 AM
We got it working now, actually we didn't reindex Solr correctly but after following the instructions it worked and the prefixes aren't showing anymore.
03-02-2020 10:22 AM
Hi @panacasp,
Thanks for updating us on how you resolved your issue - very helpful to other users.
I'll mark this as solved if I may?
02-24-2023 04:37 PM
I have the same "undefined" prefix before the property values.
I am using community version via SDK/dokcer.
I did not install Alfresco Search Services so I have no solrhome path.
Can I still have place to add the configuration parameters? Or should I look for other methods?
BTW,
Some properties in search responses have {en} as their prefixes but some properties have no {en} as their prefixes.
They are all of type "d:text". Is there a way to make them consistent?
Explore our Alfresco products with the links below. Use labels to filter content by product module.