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

Fixes #263 Add DNN Search Tag Option #265

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Timo-Breumelhof
Copy link
Collaborator

@Timo-Breumelhof Timo-Breumelhof commented Feb 12, 2025

Example:

    "templates": {
        "template": {
            "type": "multiple",
            "title": "List",
            "main": {
                "template": "template.hbs",
                "dnnsearch": true,
                "dnnSearchTitle": "{{Title}}",
                "dnnSearchDescription": "Article: {{#if Summary}}{{Summary}}{{else}}{{truncateWords Text 20}}{{/if}}",
                "dnnSearchText": "{{convertHtmlToText Text}}",
                "dnnSearchTags": "Tag1,Tag2,Tag3",
                "clientSideData": false
            },

From the lucene index after the SearchCrawler has run

{
  "TotalHits": 3,
  "Results": [
    {
      "DisplayModifiedTime": "11 minutes ago",
      "Snippet": "European goldfinch",
      "AuthorName": null,
      "Score": 0.0861446261,
      "DisplayScore": "",
      "SearchContext": {},
      "Title": "European goldfinch",
      "Description": "Article: Learn about the European goldfinch 2",
      "Body": " The European goldfinch or simply the goldfinch is a small passerine bird in the finch family that is native to Europe, North Africa and western and central Asia. It has been introduced to other areas, including Australia, New Zealand and Uruguay.  Wikipedia  \n",
      "Url": "http://demo.40fingers.net.local/opencontent-demo-templates/en-us/07-DNN-Search-SEO/0701-DNN-Search-Integration/id/149",
      "ModifiedTimeUtc": "2025-02-12T16:19:43.267",
      "IsActive": true,
      "Permissions": null,
     "Tags": [
        "tag1",
        "tag2",
        "tag3"
      ],
      "UniqueKey": "1862-149-en-US",
      "RoleId": -1,
      "PortalId": 23,
      "TabId": 4783,
      "ModuleDefId": 146,
      "ModuleId": 1862,
      "AuthorUserId": 0,
      "SearchTypeId": 1,
      "QueryString": null,
      "Keywords": {},
      "NumericKeys": {},
      "CultureCode": "en-US"
    },

fixes #236

@b-creative
Copy link

So, I gues it should be something like this?
"dnnSearchTags": "{{#each Tags}}{{Tag}}{{#unless @last}},{{/unless}}{{/each}}",

@Timo-Breumelhof
Copy link
Collaborator Author

yes

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

Successfully merging this pull request may close these issues.

2 participants