0

I'm getting correct response when I searched for "jira" and when I searched for "jirx" I'm getting below response.

Is there anyway to fetch entire document in the solr response instead of just suggestion?

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"jirx",
      "_":"1638684256357"}},
  "response":{"numFound":0,"start":0,"docs":[]
  },
  "spellcheck":{
    "suggestions":[
      "jirx",{
        "numFound":1,
        "startOffset":0,
        "endOffset":4,
        "suggestion":["jira"]}]}}
Venkat
  • 31
  • 3

2 Answers2

0

No, you need to inspect the suggestion values in the response and decide what to do with them. Keep in mind that you might get many suggestions so you will need to decide if you show the user all the suggestions or only the one with most hits.

If you get just one suggestion you could automatically do a second query with that suggestions, sometimes that is good idea but it really depends.

Hector Correa
  • 26,290
  • 8
  • 57
  • 73
0

If you want to check if there is a similar type of word that might exist, then you are lookin for fuzzy search. Try searching for jirx~1 or jirx~2. This will give you the result jira also. Please be sure you use fuzzy search upto 1 or 2 only which is suggested by solr documentation.

Dimanshu Parihar
  • 347
  • 2
  • 12