Skip to content

Search excerpt Undefined #46

Open
Open

Description

@RohitM-IN

Hi,

When added the search generation to the my doc I can see the title in results but there res.excerpt is undefined

screenshots:
image

ref PR: /pull/17

and the object received from res is

{
    "link": "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/guide/exceptions",
    "title": "Handling Exceptions",
    "ref": "935580395",
    "score": 0.21581771408826872,
    "matchData": {
        "metadata": {
            "database": {
                "content": {}
            }
        }
    }
}

settings.yml

GenerateSearchIndex: true

Activity

  1. pascalberger commented on Dec 26, 2023

    @pascalberger

    Have you added the excerpt to the search fields?

    Try with the following added to the boostrapper:

      .AddSetting(WebKeys.AdditionalSearchResultFields, new List<string> { Keys.Excerpt })
    
  2. RohitM-IN commented on Dec 29, 2023

    @RohitM-IN
    Author

    ok that resolved it thanks
    but can you add this in docs as well I appreciate it. :)

  3. RohitM-IN commented on Dec 29, 2023

    @RohitM-IN
    Author

    I Just want to ask one more thing can we set this in our settings.yml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions