[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

[Feature Request] metadata indicating the synonym found in the document #2042

Open
Justpaolo opened this issue Oct 30, 2024 · 1 comment
Open

Comments

@Justpaolo
Copy link

Description

When searching for a term with synonyms I get results from which it'is complex to trace the synonym matching the document, for example because of typo tolerance or because the synonym is made of two words.

Is it possible to modify the query processing to track synonym matches?

for example, given the following synonyms ["blazer", "coat", "jacket"]

when searching for "coat" to have a result like this


{
  "hits": [
    {
      "document": {
        "id": "1",
        "title": "Sample Document",
        "content": "You have a nice jaket."
      },
      "matched_synonym": "jacket" 
    },
    {
      "document": {
        "id": "2",
        "title": "Sample Document Bis",
        "content": "One supermarket offered a school blazer for just $10."
      },
      "matched_synonym": "blazer" 
    }
  ]
}

@kishorenc
Copy link
Member
kishorenc commented Nov 1, 2024

The highlighting section associated with each result should already have matched keywords, which when different from the words in the query, can help you figure out which synonym is being used for resolving that hit. Wouldn't that be sufficient?

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

No branches or pull requests

2 participants