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

When using Splainer: Report of 500 when highlighting failed with NullPointerException #7

Closed
softwaredoug opened this issue Aug 24, 2014 · 7 comments

Comments

@softwaredoug
Copy link
Collaborator

Gotta love Solr's great error messages. If highlighting is not enabled and you set hl=true, according to Ralph Tice on the Solr mailing list you get a NullPointerException trying to use the highlight component (and from Splainer's PoV an HTTP 500)

Perhaps we should retry the query without hl=true etc when we get a 500

@softwaredoug
Copy link
Collaborator Author

I tried to test the configuration by disabling highlighting component and querying with Splainer. I didn't see any problems. We gracefully downgraded to showing non-highlighted results.

Followed up with Ralph Tice (reported it on solr mailing list) on this issue. He shared his solrconfig (which seems very boilerplate). Furthermore, he told me he was using a trunk build of Solr. Trying to get more information. Maybe he has a weird version of Solr? Maybe I haven't captured the right configuration?

@softwaredoug softwaredoug changed the title Retry without highlighting enabled when search fails When using Splainer: Report of 500 when highlighting failed with NullPointerException Aug 26, 2014
@ralph-tice
Copy link

I did a bit more thorough testing and splainer works fine on some of our clusters. The one on which it fails doesn't appear to be highlighting related, and I don't see any 500s anymore. The only real unusual property is that this SolrCloud cluster has ~200 shards.

A javascript stack trace appears:
TypeError: undefined is not a function
at b (http://splainer.io/scripts/vendor.99a4f099.js:4:21649)
at d (http://splainer.io/scripts/vendor.99a4f099.js:4:21786)
at new e (http://splainer.io/scripts/vendor.99a4f099.js:4:22051)
at createNormalDoc (http://splainer.io/scripts/vendor.99a4f099.js:4:22868)
at http://splainer.io/scripts/scripts.7d4ce8e1.js:1:6679
at Object.q as forEach
at http://splainer.io/scripts/scripts.7d4ce8e1.js:1:6628
at apply (http://splainer.io/scripts/scripts.7d4ce8e1.js:1:1224)
at completer (http://splainer.io/scripts/scripts.7d4ce8e1.js:1:1302)
at http://splainer.io/scripts/vendor.99a4f099.js:4:25571

Source maps would be helpful, otherwise I will try a local build of Splainer when I get a chance.

@ralph-tice
Copy link

OK, the code block that blows up is this: https://github.com/o19s/splainer-search/blob/master/services/normalDocSvc.js#L10-L14 specifically L12

Looking in console, solrDoc[solrField] results in 498257568033407000 for my document, so slice explodes.
I am not a JS dev but this seems like maaaybe it's the fix?
("" + solrDoc[solrField]).slice(0,200)

@softwaredoug
Copy link
Collaborator Author

Good find!

You've got integer types your displaying, we're incorrectly expecting
everything to be strings. That does seem like the fix, but I'll write a
test around it.

Cheers
-Doug

On Tue, Sep 2, 2014 at 8:54 PM, ralph-tice notifications@github.com wrote:

OK, the code block that blows up is this:
https://github.com/o19s/splainer-search/blob/master/services/normalDocSvc.js#L10-L14
specifically L12

Looking in console, solrDoc[solrField] results in 498257568033407000 for
my document, so slice explodes.
I am not a JS dev but this seems like maaaybe it's the fix?
("" + solrDoc[solrField]).slice(0,200)


Reply to this email directly or view it on GitHub
#7 (comment).

@softwaredoug
Copy link
Collaborator Author

Hey @ralph-tice . I applied the fix -- would you mind giving it a go?

@ralph-tice
Copy link

👍 LGTM

@softwaredoug
Copy link
Collaborator Author

Great! Fixed in c9ac859

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