Hi,
i have a Custom Model with a MultiValue custom property, like this:
<property name="sdoc:configurators"> <title>Configuratori</title> <type>d:text</type> <mandatory>false</mandatory> <multiple>true</multiple> <index enabled="true"> <tokenised>TRUE</tokenised> <facetable>false</facetable> </index> </property>
This property is populated with Strings like:
Document1 --> ["VALUE", "AAAA", "BBBB"]
Document2 --> ["VALUE1", "XXXXX", "YYYYYY"]
Document3 --> ["VALUEZZZ", "CCCC"]
Document4 --> ["DDDD", "EEEEE"]
I need to find all documents with an exact value in this property. My FTS query is:
(PATH:'my-path//*') AND (=cm:content.mimetype:application/pdf) AND (TYPE:'sdoc:mydoc') AND (-EXISTS:'sdoc:configurators') AND =sdoc:configurators:'VALUE'
I expect to find ONLY Document1 (the only with exact value "VALUE"), but my FTS result is Document1, Document2 and Document3.
Obviously it happens because these three documents contain the sub-string "VALUE". How can i match only the documents that match exactly the string "VALUE"?
Thanks!
Maybe depends on Alfresco version (https://hub.alfresco.com/t5/alfresco-content-services-blog/exact-term-queries-in-search-services-2-0...) and also on cross-language settings (https://docs.alfresco.com/search-services/latest/install/options/). You can try nasty hack and add also this to your search
AND sdoc:configurators:'?????'
It should match exactly 5 character long values (length of string VALUE).
Anyway, why are you using -EXISTS:'sdoc:configurators' ? The '-' means do not match.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.