05-08-2019 02:57 AM
Good day.
I have a custom type, defined with a multi value propertie named imus:toirCodesProperty
defined as:
<property name="imus:toirCodesProperty">
<title>toirCodesProperty</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
I have configured advanced search, and the relevant part of my share-config-custom.xml
looks like this:
<field id="imus:toirCodesProperty" label-id="prop.imus_toirCodesProperty">
<control template="/org/alfresco/components/form/controls/textarea.ftl"/>
</field>
If I perform a search with commas, then I get an empty result.
The query:
query=TYPE:"imus:attachment" AND (imus:toirCodesProperty:(1234, 1785)).
But if I enter a logical operator in the control, the query succeeds.
The query:
query=TYPE:"imus:attachment" AND (imus:toirCodesProperty:(1234 or 1785)).
Can commas be used for searching in multi value text field?
Thank you.
05-10-2019 03:11 PM
Hi,
The comma in the Apache Lucene Query Parser Is not managed as you can see in the official documentazione ( Apache Lucene - Query Parser Syntax ).
For properties that are multiple, you need to repeat the name of the property for each value are you searching for.
I Hope i was helpful,
Bye
Explore our Alfresco products with the links below. Use labels to filter content by product module.