Troubleshooting

This section will provide help, tips, and suggestions about difficulties that you could meet while you're experimenting with what we described in this chapter.

Queries don't match expected documents

There's no single answer to this big and popular question. Without any additional information, the first two things I would do are as follows:

  • Retry the query by appending debug parameters (for example, debugQuery and explainOther) and analyze the explain section. There's a wonderful online tool (http://explain.solr.pl) that makes life easy by explaining debug information.
  • Use the field analysis page, type some sample values, and see what happens at index and query time. Probably, your analyzer chains are not consistent.

Mismatch between index and query analyzer

Using different analyzer chains at index and query time sometimes causes problems because tokens produced at query time don't match, as one would expect, with the output tokens at index time. The field analysis page helps a lot in debugging these situations. Type a value for a field and see what happens at query and index time. In addition, this page provides a check for all highlighting matches between index and query tokens.

No score is returned in response

The score field is a virtual field that must be explicitly asked for in requests. A value of * in the fl parameter is not enough because * means "all real fields." A request for all real fields that also include the score must provide an fl parameter with the value of *,score. Note that this is valid in general for all virtual fields (for example, functions, transformers, and so on).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.180.43