add debugQuery=true to your query, and look at the parsed query - it'll
show you a lot about what's going on.

Also, try the phrase "good building constructor" in the admin UI
analysis tab, for your full_text field. It'll help you understand what's
happening in terms of tokenisation.

Upayavira

On Thu, Oct 22, 2015, at 05:50 PM, Shawn Heisey wrote:
> On 10/22/2015 10:37 AM, vitaly bulgakov wrote:
> > But it returns no results when the query has a term which is not in a
> > document. 
> > Say searching for "building constructor" I get a result, but
> > searching for "good building constructor" returns no results because there
> > are no documents containing all three terms. 
> > 
> > What should I do to be able to search ignoring non-existing terms? 
> 
> There are two reasons for this to fail.
> 
> One reason is that your query is expecting all three terms to be in the
> index -- using AND for the default operator.  This might be done with
> the q.op parameter if you're using the standard query parser, or the mm
> parameter (set to 100%) if you're using dismax/edismax.  Older versions
> of Solr will let you configure the default operator in schema.xml, but
> this is discouraged, and I don't think it works in Solr 5.x.  The
> default operator defaults to OR, but many people will set that to AND.
> 
> The other possible reason is that you are passing the query text with
> the quotes, making it a phrase query, which means that the terms must
> all be present in the index, must be next to each other, and must be in
> that precise order.  If this is the problem, try using q=(good building
> constructor) instead of q="good building constructor".
> 
> Thanks,
> Shawn
> 

Reply via email to