FIlterSpec

I am using the CddQueryService and I am trying to filter the documents for a specific month.
Filtering for a specific document works

            String filterCriteria = "__meta.docRef:Gesamtmonatsbericht_CDM/" + docRef;

This does not work;

"Monatsarbeitspaket.Monat:Monatsarbeitspaket_CDM/Monatsarbeitspaket_DM/Monat/2025-10-01T00:00:00Z"

I have tried close to everything - square brackets, switching the path notation in several ways. I cant figure it out.

You need to escape colons because they are a special character for solr. This is done automatically for full text searches. But filters need to be treated separatly. com.mgmtp.a12.dataservices.search.SearchUtils.stripAccentsAndEscapeCharacters(String) is your friend.

String filterCriteria = "Monatsarbeitspaket.Monat:Monatsarbeitspaket_CDM/Monatsarbeitspaket_DM/Monat/2025-10-01T00:00:00Z";
String escapedCriteria = SearchUtils.stripAccentsAndEscapeCharacters(filterCriteria);
documentV2Service.findCMDDocument("Monatsarbeitspaket_CDM", escapedCriteria);

I am wondering that I have to escape it in the second example and not in the first one?

But it throws an exception as well - I would think that the notation I am using is wrong.

The issue is caused by the semicolon (:). In DS, semicolons are used to separate field definitions from values in filters. Since your value contains semicolons (e.g., 2025-10-01T00:00:00Z), our parser becomes confused and fails to interpret it correctly.

Can you explain what is documentV2Service.findCMDDocument doing? This is not DS API

Do you mean a colon?

If that were the problem, shouldn’t stripAccentsAndEscapeCharacters have solved it? Because it didn’t.

And why does my first example work, while the second one does not?

Hi @soeren-round-ridge,

The API mentioned is recalling ClientUtils of solr4j library. This is used quite late in the processing (after DS processes the query and before we send a request to Solr). I am afraid we are not allowing search for this character in versions 2024.06 and 2023.06 as described in here: GetA12

In version 2025.06 : is searchable via exact_match and simple_search operators

Hello @soeren-round-ridge , I am a member of the Discourse team. I can see that there was a new response to your question on the Topic of the discussion. Do you find it helpful, or should the question remain open?

Thanks ahead for your feedback and have a nice rest of the day!

Hello @soeren-round-ridge , I am a member of the Discourse team. I can see that there was a new response to your question on FilterSpec. Do you find it helpful, or should the question remain open?

Thanks ahead for your feedback and have a nice rest of the day!