Uploaded image for project: 'Providence'
  1. PROV-1915

The ElasticSearch plugin silently drops exceptions and returns wrong results on improper fieldType

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 1.6.3, 1.7
    • Fix versions: None
    • Components: search
    • Labels:
      None
    • Environment:
      ElasticSearch

      Description

      As outlined in http://www.collectiveaccess.org/support/forum/index.php?p=/discussion/298134/boolean-searches-type-safety-in-es

       we get incorrect results on some searches in ES (ok on SqlSearch), and by all appearances it could be a type-related issue. Example:

      ca_sets.set_code:tstset
      5 results (correct)

      ca_sets.set_code:tstset OR ca_sets.set_id:tstset (or any other non-number string)
      No results (incorrect)

      ca_sets.set_code:tstset OR ca_sets.set_id:3992 (or any other number)
      5 results (correct)

      Note that ca_sets.set_code OR ca_sets.set_id is the expansion of the set access_point in the standard search_indexing.conf (and thus the standard set access_point fails).

      In fact ES throws an error NumberFormatException[For input string: "tstset"] but the catch in app/lib/core/Plugins/SearchEngine/ElasticSearch.php (L.372) swallows it up and silently returns the empty return set, a big no-no as the user is not aware of any issues and gets the wrong results (the query might very well have results).

        Attachments

          Activity

            People

            • Assignee:
              Former user (Inactive)
              Reporter:
              yelto
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: