Open Bug 1729468 Opened 4 years ago Updated 4 years ago

[docs] improve supersearch operator docs

Categories

(Socorro :: General, task, P2)

Tracking

(Not tracked)

People

(Reporter: willkg, Unassigned)

Details

Supersearch supports a set of operators, but neither the docs nor the tests are particularly clear exactly how those operators work and how that's affected by how the fields are indexed.

This covers improving these docs so they're clearer and have better examples:

https://crash-stats.mozilla.org/documentation/supersearch/#filters

I'm pretty sure I've had problems with contains working inconsistently depending on how the field is indexed. I'm pretty sure someone had a problem with one of the operators doing a surprising case-insensitive match. I'm pretty sure there are cases where certain characters get removed during indexing and thus can't be matched on.

Fixing this blocks updating Elasticsearch or switching to something else since we need to know exactly how things work before we can responsibly make changes.

I did a minor fix for "contains" and "has terms" about case-sensitivity in:

https://github.com/mozilla-services/socorro/pull/5970

I think we should fix the docs further:

  1. Differentiate between how we're analyzing strings. We have standard, keyword, and maybe some others. I think the operators do different things in those cases.
  2. What is an enum?
  3. What are examples of these fields? Can we pull the examples from super search fields?
  4. What are examples of operators and the kinds of questions they can answer?

The fields documentation should be clearer, too. Maybe we include details about how the field is indexed in the description so it's clearer how to use the operators?

You need to log in before you can comment on or make changes to this bug.