Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search excerpt Undefined #46

Open
RohitM-IN opened this issue Dec 25, 2023 · 3 comments
Open

Search excerpt Undefined #46

RohitM-IN opened this issue Dec 25, 2023 · 3 comments

Comments

@RohitM-IN
Copy link

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

settings.yml

GenerateSearchIndex: true
@pascalberger
Copy link

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 })

@RohitM-IN
Copy link
Author

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

@RohitM-IN
Copy link
Author

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

@RohitM-IN RohitM-IN reopened this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants