question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`client.search()` vague suggest documentation

See original GitHub issue

In the client.search() documentation, when I attempt to use the parameters suggestionField and suggestionText, I get error messages that indicate that my input string is null. However, I thought that suggestionText was supposed to be the key to my input string? Trying to get suggestions based on a user’s query isn’t clearly defined anywhere in the documentation or examples.

{
        index: 'random_index',
        suggestField: 'suggest',
        suggestText: 'query'
}

Error:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: [null_pointer_exception] Input string is null

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:11

github_iconTop GitHub Comments

2reactions
Drewclamcommented, Oct 25, 2018

@rosman21’s solution works for me after changing prefix to text.

2reactions
flyinghawkercommented, Sep 15, 2018

Complement suggest is different scenarios from normal suggesters. Here I try in another way which may not work as expected but at least produce certain reasonable result. `{

  index: 'title',
  size:1, 
  from:0,
  body: {
    "query" : {
      "match": {
        "title": 'dolo'
      }
    },
    "suggest" : {
      "my-suggestion" : {
        "text" : 'dolo',
        "term" : {
          "field" : "title"
        }
      }
    }
  }
}

`

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elasticsearch Node.js client get term suggestions?
1 Answer 1 ... If you mean Completion Suggester, the completion suggester provides auto-complete/search-as-you-type functionality. Share.
Read more >
Query Suggestions - Elastic App Search Documentation [8.5]
A Query Suggestion provides recommended queries. It's been called autocomplete, typeahead... It's a feature with many names. Suggestions work against indexed ...
Read more >
Error handling — Boto3 Docs 1.26.35 documentation
Using a low-level Amazon SQS client, here's an example of catching a generic or vague exception from the AWS service, and parsing out...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
Usually, this indicates the server cannot find a better 5xx error code to response. Sometimes, server administrators log error responses ...
Read more >
EDUC 8112 Module 2 Assignment 2 - Academic Guides
For Module 2, Assignment 2, you will find articles and create a bibliography, ... Focus on the main concepts, avoiding words that are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found