“Did you mean” error

  • matteo.cattelan
    Participant
    7 months, 3 weeks ago #35563

    Hi,
    i have an error when active the option:
    Display “Did you mean?” in search results header ?

    I have the PRO Version of plugin.

    This is the erros:

    {“error”:{“root_cause”:[{“type”:”illegal_argument_exception”,”reason”:”no mapping found for field [spell]”}],”type”:”search_phase_execution_exception”,”reason”:”all shards failed”,”phase”:”query”,”grouped”:true,”failed_shards”:[{“shard”:0,”index”:”wp_it”,”node”:”GbLND5ZMSrqT3nD1giH9Ew”,”reason”:{“type”:”illegal_argument_exception”,”reason”:”no mapping found for field [spell]”}}],”caused_by”:{“type”:”illegal_argument_exception”,”reason”:”no mapping found for field [spell]”,”caused_by”:{“type”:”illegal_argument_exception”,”reason”:”no mapping found for field [spell]”}}},”status”:400}

    Thanks a lot, have a nice day

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35564

    “Did you mean” appears only in the deprecated WPSOLR Ajax template.

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35565

    Yes i set WPSOLR Ajax template in Search template select.
    Do I need to do something else?

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35566

    This template being deprecated, I cannot help with questions or issues.

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35567

    So you give an option that is not available. Good plugin…

    Please remove “Did you mean” options if this is not available.

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35622

    I just tested the “Did you mean” with OpenSearch and the deprecated template. It worked fine.

    no mapping found for field [spell]

    It looks like your index schema does not contain the definition for field “spell”.
    Was the index created by WPSOLR?

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35627

    Yes the index is created by WPSOLR, please, give me an example of definition for field spell.

    Thanks a lot for all.

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35629

    You can check the full OpenSearch configuration file wpsolr-pro/wpsolr/core/classes/engines/opensearch_php/wpsolr_index_1_0.json

    "spell": {
      "type": "text",
      "analyzer": "wpsolr_analyser_did_you_mean"
    }
     
    wpsolr
    Keymaster
    7 months, 3 weeks ago #35631

    Check in OpenSearch dashboard that your index contains this definitions.

    Which OpenSearch version do you use?

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35632

    it exists but only in the English index… in other languages it is not present, but the plugin does this when it creates the index…
    My OpenSearch version is: OpenSearch_1_2_R20221114-P3 (latest)

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35634

    Does it work with the English index?

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35635

    Yes for English “did you mean” work but i have 5 languages.

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35636

    That means other indexes have not been created with WPSOLR? If so, create new ones.

    matteo.cattelan
    Participant
    7 months, 3 weeks ago #35637

    All index is created with WPSOLR

    wpsolr
    Keymaster
    7 months, 3 weeks ago #35638

    Create new ones anyway. The “spell” field should appear.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.