0
  "mm":"2",
  "q":"IBASEDESCRIPTION:(ankor sunnyvale tokyo^3 london labs)",
  "defType":"dismax",
  "fl":"score, IBASEDESCRIPTION",
  "q.op":"AND",
  "rows":"3",
  "debug.explain.structured":"true",
  "debugQuery":"on"

This is what I see in the response header.

mm=2 it means 2 optional clauses should match. q.op is AND - I assumed that conditions between the clauses are AND

I expect the following field not to match:

Level 3 Communications-london
akamai-level 3-london

But they are part of the results.

Could anyone help me to understand the behavior here?

I suspect it is because ^3 in the tokyo field. But that's what the boosting factor.

Gibbs
  • 21,904
  • 13
  • 74
  • 138

1 Answers1

1

mm=2 does not mean two optional clauses should match - it means that two clauses should match. q.op does not take effect when mm is set.

If no 'mm' parameter is specified in the query, or as a default in solrconfig.xml, the effective value of the q.op parameter (either in the query, as a default in solrconfig.xml, or from the defaultOperator option in the Schema) is used to influence the behavior.

Why those specific entries are included is hard to say without seeing the analysis for the field and the actual value indexed (the debug query will include information about what terms are being hit for each field and how much it contributes to the score).

You should also use qf here instead of having the field name present when using the dismax handler.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
  • Thanks. The field type is text with standard tokenizer and lower case filter. When I check the query term in the analysis page `tokyo^3` is considered as `tokyo` and `3`. Why is not considered as boosting a term? – Gibbs Apr 13 '20 at 09:30
  • 1
    That's the lucene syntax, not the dismax query syntax - this confusion seems to be an issue across several of your last questions, so it's probably a good idea to at least switch to `edismax` if you still expect general lucene queries to work when using the dismax query parser (I'm not sure if term boosting will work there either, but at least the possibility is there). To boost documents with that term when using dismax, use `bq` (boost query): `name:tokyo^3`. – MatsLindh Apr 13 '20 at 09:59