Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-1247

REST search and findOne endpoints return unexpected or incorrect results for guids

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • 0.4.2
    • None

    Description

      When running a search for a particular GUID, e.g.

      {
        "indices": ["websphere", "snort", "asa", "bro", "yaf"],
        "query": "guid:a2d7ba04-d335-4948-8bc8-c889e7c531c9",
        "from": 0,
        "size": 500
      }
      

      Multiple results can be returned. This appears to be because the "guid" field gets the default analyzer, so the individual segments between the hyphens can match.

      A workaround is simply to quote the string (escaping appropriately). This should be documented. A longer term solution is likely needed, but requires more discussion.

      For findOne, the same situation happens, but since only one item is returned it can be incorrect (a partial match that happens to be sorted earlier). This should be changed to a simple GET against the id (which is also the guid by design). It's also more efficient to do this anyway.

      Attachments

        Issue Links

          Activity

            People

              justinleet Justin Leet
              justinleet Justin Leet
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: