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

Add highlights to search query #2761

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Add highlights to search query #2761

merged 4 commits into from
Jan 18, 2024

Conversation

arpit-at
Copy link

Highlight support is added

Changes in request

  1. highlight needs to be added as the top-level attribute in the DSL
 "highlight": {
            "fields": {
                "name": {},
                "displayName": {},
                "description": {},
                "userDescription": {},
                "__meaningsText": {},
                "__meaningNames.text": {}
            }
        }
  1. showHighlights needs to be set to true if it is required in response
    Changes in Response

A new object in response will come when showHighlights is set to true (default is false)

 "searchMetadata": {
        "810b0998-27c0-4feb-9606-b2863c4a2651": {
            "highlights": {
                "name": [
                    "<em>arpit</em>_6"
                ],
                "description": [
                    "<em>arpit</em>_6"
                ],
                "userDescription": [
                    "<em>arpit</em>_6"
                ],
                "displayName": [
                    "<em>arpit</em>_6"
                ]
            }
        },
        "3632ebdd-e7cd-4aca-bca9-0ee91c6445db": {
            "highlights": {
                "name": [
                    "<em>arpit</em>_5"
                ],
                "description": [
                    "<em>arpit</em>_5"
                ],
                "userDescription": [
                    "<em>arpit</em>_5"
                ],
                "displayName": [
                    "<em>arpit</em>_5"
                ]
            }
        }
  • tested on local

@arpit-at arpit-at changed the title Feat/highlights dg 721 Add highlights to search query Jan 17, 2024
@arpit-at
Copy link
Author

Test Results Beta
image

image

@mehtaanshul mehtaanshul merged commit bfcad2a into master Jan 18, 2024
8 checks passed
@checkaayush checkaayush deleted the feat/highlights-DG-721 branch April 23, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants