6 Replies Latest reply: May 16, 2013 12:53 AM by MatKessler RSS

    Can You Disable Spelling Correction For Nrs Query

    MatKessler
      Does anyone know if it is possible to disable spelling correction for a search in an Nrs query? I have tried some possibilities, but with no luck.

      I am aware that the Ntx parameter supports "spell nospell" but this does not seem to work when placed in the same sort of place in an Nrs query.

      Note - I am doing an Nrs query so that I can combine the results of wildcarding and regular search into one set of results. I would be ok with spelling correction here if there were search reports about the spelling correction that takes place in Nrs, but that doesn't happen. Now I am stuck trying to turn off spelling correction here, because I don't want any to happen if I don't know why. If there are no results, I would rather then redirect to a regular Ntt-based query afterwards so that I can get spelling correction then.
        • 1. Re: Can You Disable Spelling Correction For Nrs Query
          1004987
          Hi,

          did you try this ?
          http://localhost:8006/endeca_jspref/controller.jsp?sid=13E802CBE173&enePort=17001&eneHost=localhost&N=0&Nrs=collection()/record[P_Region = "Sonoma"]&Ntk=P_Description&Ntt=polihed&Ntx=mode+matchall+spell+nospell
          http://localhost:8006/endeca_jspref/controller.jsp?sid=13E802CBE173&enePort=17001&eneHost=localhost&N=0&Nrs=collection()/record[P_Region = "Sonoma"]&Ntk=P_Description&Ntt=polihed&Ntx=mode+matchall

          (Ntt is polihed instead of polished)

          The first query didnot return any records and the second query returned few records.
          I tried testing it on Wine app and it works perfectly.

          Thanks,
          Sugun
          • 2. Re: Can You Disable Spelling Correction For Nrs Query
            MatKessler
            This works for disabling spelling correction, however the records returned are an intersection of what's returned by Ntt/Ntk/Ntx and Nrs. I don't want that as my Nrs query is just an OR statement of different "matches" (aka search) queries. It's more expansive than what would be returned by Ntt/Ntk/Ntx alone, or adding Ntt/Ntk/Ntx to the query as you suggest.
            • 3. Re: Can You Disable Spelling Correction For Nrs Query
              Michael Peel-Oracle
              Hi Mat

              What does the OR statement look like? Any way you could rewrite it to use a search, then use multiple searches as that would give you the intersection, i.e.
              Ntk=product_interface|boolean_interface&Ntt=<regular-search>|<id> OR <id> OR <id>&Ntx=mode+matchallpartial|mode+matchboolean
              I don't think boolean matches support spell-correction, but you could also use match-any match mode if you want to be able to switch on/off spell correction with spell+nospell for each of the searches. Of course it'll need your OR logic to be simple enough to match the boolean search logic, so not possible if you're doing anything complex, but thought I'd mention it in case it might work.

              Cheers

              Michael
              • 4. Re: Can You Disable Spelling Correction For Nrs Query
                MatKessler
                Thanks, Michael. This is actually a decent idea and I've looked into boolean search a bit. Unfortunately you get no thesaurus or relevance ranking with boolean search, according to the doc.
                • 5. Re: Can You Disable Spelling Correction For Nrs Query
                  Michael Peel-Oracle
                  Ah, I thought this was for product identifiers so you wouldn't need thesaurus/spell correction etc. In that case, rather than using a boolean search couldn't you use a regular search with match mode of "Any"? I've done that in the past for a similar-ish requirement and it worked well, with the proviso that you need to phrase any of your multi-term OR matches and increase the search_max threshold.
                  • 6. Re: Can You Disable Spelling Correction For Nrs Query
                    MatKessler
                    Well, what we are really doing is a search across lots of fields, and often contains parametric data and funny abbreviations and acronyms. Ie "1/4W 1kohm" is not unusual to see.