On 12/5/06, Tracey Jaquith <[EMAIL PROTECTED]> wrote:
Now I have one new mystery that's popped up for me. With std req handler, this simple query q=title:commute is *not* returning me all documents that have the word "commute" in the title. There must be some other filter/clause or something happening that I'm not aware of? (For example, I do "indent=on&fl=title&q=commute" in a wget and grep the results for <title> and then grep -i for commute, there are 23 hits. But doing "&q=title:commute" only returns one of those hits..)
Indeed--those are different queries. The "fl" parameter controlled the stored fields returned by Solr; it does not affect which documents are returned. The first query asks for the titles of all documents containing the word "commute", the second for all documents with "commute" in their title. see http://wiki.apache.org/solr/CommonQueryParameters I'm not sure what problems you are experiencing with dismax, but it is important to note that you cannot specify a raw lucene query in the "q" parameter of a dismax handler. If you want to search for a word across fields, you can specify the qf (query fields) parameter. eg. q=commute qf=title^10 body (see http://incubator.apache.org/solr/docs/api/org/apache/solr/request/DisMaxRequestHandler.html) Turning on debugQuery=true is invaluable for determining what factors are influencing scoring. Was your previous solution QueryParser-based? If so, you should be able to use the exact same queries as before, passed to StandardRequestHAndler (assuming the fields are also set up identically). cheers, -MIke