Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4491

Make analyzing suggester more flexible

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1
    • Fix Version/s: 4.9, 6.0
    • Component/s: modules/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Today we have a analyzing suggester that is bound to a single key. Yet, if you want to have a totally different surface form compared to the key used to find the suggestion you either have to copy the code or play some super ugly analyzer tricks. For example I want to suggest "Barbar Streisand" if somebody types "strei" in that case the surface form is totally different from the analyzed form.

      Even one step further I want to embed some meta-data in the suggested key like a user id or some type my surface form could look like "Barbar Streisand|15". Ideally I want to encode this as binary and that might not be a valid UTF-8 byte sequence.

      I'm actually doing this in production and my only option was to copy the analyzing suggester and some of it's related classes.

        Attachments

        1. LUCENE-4491.patch
          22 kB
          Simon Willnauer
        2. LUCENE-4491.patch
          29 kB
          Simon Willnauer

          Activity

            People

            • Assignee:
              simonw Simon Willnauer
              Reporter:
              simonw Simon Willnauer
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: