Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: .matching
    • Labels:
      None

      Description

      proximity operator is not implemented. Attached a proposed implementation (TO BE TESTED)

        Attachments

          Activity

          Hide
          richardm Richard McCreadie added a comment -

          Current implementation passes all of the unit tests. Resolving this issue.

          Query language documentation should be updated to describe what this functionality does and how it differs from proximity score modifiers.

          Show
          richardm Richard McCreadie added a comment - Current implementation passes all of the unit tests. Resolving this issue. Query language documentation should be updated to describe what this functionality does and how it differs from proximity score modifiers.
          Hide
          richardm Richard McCreadie added a comment -

          Did a test of Distance.noTimes for the proximity, but it fails all of the tests. Looking at the Distance test case, I think that noTimes is looking for n-grams not term sets in windows.

          If so, it is not applicable for this issue.

          Show
          richardm Richard McCreadie added a comment - Did a test of Distance.noTimes for the proximity, but it fails all of the tests. Looking at the Distance test case, I think that noTimes is looking for n-grams not term sets in windows. If so, it is not applicable for this issue.
          Hide
          craigm Craig Macdonald added a comment -

          Do you have numbers to prove this?
          Also, does isInWindow() pass similar tests to Distance.noTimes
          Could the method be moved to the Distance class, to keep everything in the same place?

          Show
          craigm Craig Macdonald added a comment - Do you have numbers to prove this? Also, does isInWindow() pass similar tests to Distance.noTimes Could the method be moved to the Distance class, to keep everything in the same place?
          Hide
          richardm Richard McCreadie added a comment -

          Related note:

          The patch uses the local isInWindow method rather than Distance.noTimes method

          Either implementation should be valid, but each will be faster in different use cases.
          isInWindow will be faster for long documents when the query terms appear only rarely. (Complexity: |Q| . window . occurences(Q,d))
          Distance.noTimes will be faster when the query terms appear often in a document. (Complexity: |Q| . documentLength-window)

          Show
          richardm Richard McCreadie added a comment - Related note: The patch uses the local isInWindow method rather than Distance.noTimes method Either implementation should be valid, but each will be faster in different use cases. isInWindow will be faster for long documents when the query terms appear only rarely. (Complexity: |Q| . window . occurences(Q,d)) Distance.noTimes will be faster when the query terms appear often in a document. (Complexity: |Q| . documentLength-window)
          Hide
          richardm Richard McCreadie added a comment -

          Committed patch and test case for interpretation 'All query terms must be contained within a window of n terms'. Window is set to num_query_terms if window is less than num_query_terms.

          Commit 3754.

          Resolve?

          Show
          richardm Richard McCreadie added a comment - Committed patch and test case for interpretation 'All query terms must be contained within a window of n terms'. Window is set to num_query_terms if window is less than num_query_terms. Commit 3754. Resolve?

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              catena.matteo Matteo Catena
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: