need help on FLAG_PARTIAL

Eden He <[email protected]> Tue, 20 Apr 2021 10:34:31 +0800
Newsgroups gmane.comp.search.xapian.general
Message-ID <CABaDr5Yynh58=rGrkAK2HG7ZcgNuwtnVL4dU3e-c1+xMHboWfQ@mail.gmail.com>
Hi,
I have some docs with a fields named "phone",
something like that:
{
ID int
Name str
Phone str
}
I created an index for them and gave a prefix "P" to the field "phone",
and there is one doc whose value of phone is "53083763748".
However, when I searched that field using FLAG_PARTIAL, I can only get
results when I used the following code:

queryparser.add_prefix("phone", "P")
query = queryparser.parse_query("phone:5", xapian.QueryParser.FLAG_PARTIAL)

when I expand the query to "53" or "530", I can only get nothing.

queryparser.add_prefix("phone", "P")
query = queryparser.parse_query("phone:53", xapian.QueryParser.FLAG_PARTIAL)

there must be something wrong, but I cannot tell where it is. Would you
please help me with this?
Thanks.

--
all the best.