Git Product home page Git Product logo

Comments (2)

erewok avatar erewok commented on June 16, 2024 1

I think you're right, actually. While I was surprised to see the exception thrown, it turned to be from inputs that were either empty strings or really common matching patterns. I will read the documentation you have linked here. Thanks for the response!

from zentity.

davemoore- avatar davemoore- commented on June 16, 2024

@erewok

Most likely what you're seeing is "snowballing." This happens when the matchers or resolvers are too liberal, causing too many false matches to "snowball" into the result. When there are many false matches, the number of searchable attribute values explodes and the queries become too complex for Elasticsearch to process.

For example, let's say you have a resolver that looks at names and phone numbers, and let's say your data has a thousand documents where the value of the name is "unknown" or "". If your search matches one of those values, then suddenly your resolution job might incorrectly pick up a thousand phone numbers associated with the name "unknown" or "". Then each newly discovered phone number is included as a clause in the next query, which could exceed what Elasticsearch can process.

My recommendations would be:

  • Check for common values in your data that might cause snowballing, such as a name whose value is "unknown", and exclude those values from any searches by setting them in "scope"."exclude"."attributes".
  • Check to see if your matchers are too liberal. For example, if the names and phone numbers are text fields instead of keyword fields, and if your matchers are using a "match" query instead of a "term" query, then check the analyzers for those text fields. It's possible that the queries are matching tokens instead of the full values, such as just the first names or area codes of the phone numbers, and that could lead to more false matches and snowballing. For example, the name "Jane Smith" and the phone number "555-123-4567" might match "Jane Doe" and "555-555-5555" simply because of the matching tokens "Jane" and "555," which is too generous of a match. If this is happening, consider reindexing your data using a custom text analyzer or keyword normalizer that doesn't tokenize the value.

Some of this is covered in the entity modeling tips section of the documentation.

from zentity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.