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.
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:
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.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.
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).
18.189.180.43