FTS results and total hits mismatch

Hello, @sreeks
Here I am pasting the FTS response from CB index.
Why there is total hits=373, but details of only 10 hits available?

{
"status": {
    "total": 6,
    "failed": 0,
    "successful": 6
},
"request": {
    "query": {
        "wildcard": "*trick*"
    },
    "size": 10,
    "from": 0,
    "highlight": {
        "style": null,
        "fields": null
    },
    "fields": [
        "PIIPayload.ProfileInfo.UniqueID._attr.ID"
    ],
    "facets": null,
    "explain": false,
    "sort": [
        "-_score"
    ],
    "includeLocations": false
},
"hits": [
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::80D9C6E4EAC412771AD0D6D8C920E21D36146D4E83BA50001B4976252FF3F7002BD464F1151D9B51153C14E48506CEAD95C520F8E347357B28FE3B52C8961D4D",
        "score": 0.8824730966540637,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.Surname._text": {
                "stricker": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 8,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.Surname._text": [
                "<mark>Stricker</mark>"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "1PDXT8",
                "LH",
                "992006331608395"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::D78A3D79A6618999B6AD40F6AD2CF30750FA1E2700651C7CF3729BF4896DC9C4AA6939D194A6E71CC17038D7AEBE13577F60C7410213211DB60E27C1CCB4B640",
        "score": 0.4980479195090831,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.Address.AddressLine._text": {
                "patrick": [
                    {
                        "pos": 2,
                        "start": 6,
                        "end": 13,
                        "array_positions": [
                            0
                        ]
                    },
                    {
                        "pos": 2,
                        "start": 6,
                        "end": 13,
                        "array_positions": [
                            1
                        ]
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.Address.AddressLine._text": [
                "2s579 <mark>Patrick</mark> Henry Square 60523 Oak Brook(us)"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "MT514S",
                "LH",
                "992002072858885"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::21308E5223EF54EC98D94462C19C2F1C27139B732AD24FBE307BB251740BCF6AF078A62B52798FF67189AF1C629CA313700FC9156ABA0457B67A7EA7CF51FAE6",
        "score": 0.4668884988058881,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.Address.AddressLine._text": {
                "patrick": [
                    {
                        "pos": 2,
                        "start": 5,
                        "end": 12,
                        "array_positions": [
                            0,
                            0
                        ]
                    },
                    {
                        "pos": 2,
                        "start": 5,
                        "end": 12,
                        "array_positions": [
                            1,
                            0
                        ]
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.Address.AddressLine._text": [
                "2725 <mark>Patrick</mark> Henry St Apt 517 48326 Auburn Hills(u"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "R2DNRG",
                "LH",
                "992005070478952"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::43917F1C2E9116412928B9E861B5F8058CC487F725DDE646EE6A6A10D95F9BAD0BC5C6E1453B629430CBC354D773DD20D422DDF218102F83AB528112A6E8AF14",
        "score": 0.4599712316862809,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "BXBK9X",
                "LH",
                "992002191302997"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_6ddbfb54",
        "id": "FF::Y::*A::LH::24C85B01D2B050CD83602A7EFD5CEAD1BA488EFD33CD70658F2549A7DE6697096A86DF4A820E54F7B98D590371541CF9685CEBA92CA7F3A4F10830875A7FF9BE",
        "score": 0.44224180220313414,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.Surname._text": {
                "fitzpatrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 11,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.Surname._text": [
                "<mark>Fitzpatrick</mark>"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "B52BH5",
                "LH",
                "992007285601295"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::CB3FB44CAFF259AFE3D105FC72C366A32E7C0E496CACEAAC8EABCD5536A6C31FD5249748B1095FF9E5863DB72E14D90459C56EABD9B7677C5C6C20036FDF9220",
        "score": 0.4350892265965624,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "9LFB3H",
                "LH",
                "992005548937142"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::E658FF1F81CE543191B81244E18905EF2F09BCE5FB03FC0F5E345DD4354B63B678C73B8A976965DA74EAB04B37619978F7F6426E9A4816D5FC90A9BE2908AF82",
        "score": 0.4350892265965624,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "DK7RM5",
                "LH",
                "992000710549650"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::6AC268AA0DDFA8EDC7A4850E88EEF130189E1D134934995CD1F19BD43E3B8E524EBFEB5E2DCBCF384C2ED6952F1A5496869D545AE51986B6A166C10D94B02A34",
        "score": 0.4350892265965624,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "GVVHX0",
                "LH",
                "992006324479325"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::BA55449E1E3EF7CF1431623898B66D9AABFCE099EE266F50884238B76F57F4DB756B89D7FDE5906F79C7E5A9ACFE9D0D8B0D6E8BADEDB8897BD1CAB7DA2050FD",
        "score": 0.4350892265965624,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "6FN0QF",
                "LH",
                "992000683483085"
            ]
        }
    },
    {
        "index": "ffprofiles_c0d8fa4dfeea33b7_18572d87",
        "id": "FF::Y::*A::LH::B0F1206D1918EEC84FFF88223F33EFBD34A7F408E44CA0A665053916EA72D88B4ABA70DE99C8A5C2DAFFE1D7E08BE56EF8971D5B54E7ECE7C3BC1277F7EE49D8",
        "score": 0.42407252406671714,
        "locations": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": {
                "patrick": [
                    {
                        "pos": 1,
                        "start": 0,
                        "end": 7,
                        "array_positions": null
                    }
                ]
            }
        },
        "fragments": {
            "PIIPayload.ProfileInfo.Profile.Customer.PersonName.GivenName._text": [
                "<mark>Patrick</mark> Mr"
            ]
        },
        "sort": [
            "_score"
        ],
        "fields": {
            "PIIPayload.ProfileInfo.UniqueID._attr.ID": [
                "434ML5",
                "LH",
                "992005161078497"
            ]
        }
    }
],
"total_hits": 373,
"max_score": 0.8824730966540637,
"took": 432974998,
"facets": null

}

Hi @Rajeev_Bhat,

If you closely monitor the request sent back to you as a part of the response, you might notice the two pagination parameters like,
“size”: 10,
“from”: 0, .

So unless you specify the number of hits you need, FTS will override that to 10.
Hence please override Size parameter in request to higher value.

Cheers!

1 Like

Thanks @sreeks . ,
.