Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

DOM Contains() filter returns fuzzy matches instead of filtering by substring?

Solved234 views15th December 2025DataMiner Object Model
6
Enis Abaza [SLC] [DevOps Advocate]295 12th December 2025 2 Comments

Using DomInstanceExposers.FieldValues.DomInstanceField(fieldId).Contains(searchValue) returns unexpected results. The filter appears to perform fuzzy/tokenized matching rather than exact substring matching.

Environment:
- DataMiner 10.5.0.0-16432-CU8

Code:

var customerNameFieldId = GetFieldDescriptorId("Customer Name");
var definitionFilter = DomInstanceExposers.DomDefinitionId.Equal(domDefinition.ID.Id);
var customerNameFilter = DomInstanceExposers.FieldValues.DomInstanceField(customerNameFieldId).Contains("00000000");

var combinedFilter = new ANDFilterElement<DomInstance>(definitionFilter, customerNameFilter);
var instances = DomHelper.DomInstances.Read(combinedFilter); // Returns 2646 instances

Result:

- Search value: "00000000"
- Expected: 0 results (no CustomerName contains this string)
- Actual: 2646 results

Verified by logging actual field values - none contain "00000000":

CustomerName: 'MBC FZ LLC - 110004' - Contains '00000000': False
CustomerName: 'MBC FZ LLC - 110002' - Contains '00000000': False
CustomerName: 'MX1 Internal - MX1Internal0000' - Contains '00000000': False
...

Questions:

1. Is Contains performing tokenized matching in OpenSearch rather than exact substring matching (like SQL LIKE '%value%')?

2. Is there an alternative filter for exact substring matching at database level?

3. Is this expected behavior or a bug?

Current workaround: Post-filtering in memory with LINQ .Where(), but this impacts performance on large datasets.

Enis Abaza [SLC] [DevOps Advocate] Selected answer as best 15th December 2025
Alberto De Luca [DevOps Enabler] commented 13th December 2025

Great question – won't post an answer as I haven't played much with OpenSearch yet, but based on the output above, I'd say you're right and that Contains(…)-based DOM filter behaves like a tokenized search rather than a SQL LIKE '%value%'

So 1 & 3 would seem by design:
ref 2, unsure – have you tried a "term" query?
https://docs.opensearch.org/1.1/opensearch/query-dsl/term/#term

Subscribing to get an insight from more experienced users.

Enis Abaza [SLC] [DevOps Advocate] commented 15th December 2025

Hi Alberto, I appreciate the pointer. The DOM filter API (DomHelper/DomInstanceExposers) doesn’t expose a way to enforce a raw OpenSearch term query from this layer, so there’s no straightforward path to exact term semantics via DOM. If there’s an officially supported hook to pass a term query through DOM, happy to try it but otherwise, this would require dropping below DOM to OpenSearch, which isn’t available in this context.

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Thomas Ghysbrecht [SLC] [DevOps Enabler]5.58K Posted 15th December 2025 2 Comments

Hi Enis,

It is indeed correct that the 'Contains' filter is analyzed in Elasticsearch and OpenSearch with some kind of fuzzy matching. (n-gram tokenizer)
This has been the default behavior for many years with similar objects stored by DataMiner in these DBs. Possible confusing results have been noted in the past, and a task was created to further evaluate if this could be improved. (194368)

This behavior is already different on STaaS. There, a contains filter is evaluated as a strict full match, more in line with what most users would expect.

In your case, if OpenSearch will be used, the workaround will depend on the use case. The one you suggested is an option but could indeed lead to reading a lot more data than needed. If only a certain part of the string will be known, this could also be stored separately so an 'equal' filter could be used. But that will again depend on whether this is possible for the solution you are creating.

Enis Abaza [SLC] [DevOps Advocate] Selected answer as best 15th December 2025
Enis Abaza [SLC] [DevOps Advocate] commented 15th December 2025

Hi Thomas, thanks for the clarification. For our use case, storing separate searchable fields isn’t feasible as the values we query with "Contains" are produced by another generic component from polled APIs and vary by use-case, so reshaping the storage would be a risky change. Is there any supported way on OpenSearch to do an exact substring match at query time to avoid large reads and in-memory filtering? If not, is there any ETA on task 194368?

Thomas Ghysbrecht [SLC] [DevOps Enabler] commented 15th December 2025

There is unfortunately no way right now to execute a contains query via the DOM API that would result in the exact match behavior. There is currently no official ETA for that task. We can share the use-case with the PO that manages that backlog, however, so the priority can be re-evaluated.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2026 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin