Understanding the difference between search matchType: 'headword' vs 'inflection'

shahoodshahood Member ✭✭
edited September 2018 in General

Hi @AmosDuveen,

Here is the scenario: For example, I'm looking up "zebra crossing" using search endpoint.

I start with the search term "zebra cross". At 7th search suggestion, i get the following:

  "id": "zebra_crossing",
  "matchString": "zebra cross",
  "region": "gb",
  "score": 0.55143934,
  "word": "zebra crossing",
  "matchType": "headword"

Then I try the search term "zebra crossing". Here is what I get as the 1st suggestion:

  "score": 12.682389,
  "word": "zebra_crossing",
  "region": "gb",
  "inflection_id": "zebra crossing",
  "matchString": "zebra crossing",
  "id": "zebra_crossing",
  "matchType": "inflection"

I can notice the difference in matchType in both cases but I also notice the difference between 'word' field which is something I can't quite comprehend.

  1. Looking at id, one can conclude that it is the same dictionary entry. Is that right? If yes, why is word field different in both cases? If no, why does id field contain the same
    value in both cases?

  2. Is word field dependent on matchType? If yes, how?

  3. What is inflection_id in second case? Why has it not been defined in the Model and being an id, why doesn't it contain the hyphenated version?

  4. I went an extra mile looking up "zebra crossing" in inflections endpoint. There I got an array "inflectionOf" with one entry in it having "id": "zebra_crossing". Shouldn't this "id": "zebra_crossing" correspond to the inflection_id as mentioned in Q3 above? If yes, why is this one hyphenated and the one in Q3 not hyphenated?

Hope to hear from you soon!

Thanks
Shahood

Comments

Sign In or Register to comment.