Skip to content

[feature](inverted index) add multi position PhraseQuery support to search function#57588

Merged
airborne12 merged 1 commit intoapache:masterfrom
zzzxl1993:202510311015
Nov 11, 2025
Merged

[feature](inverted index) add multi position PhraseQuery support to search function#57588
airborne12 merged 1 commit intoapache:masterfrom
zzzxl1993:202510311015

Conversation

@zzzxl1993
Copy link
Contributor

@zzzxl1993 zzzxl1993 commented Oct 31, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

ClickBench: Total hot run time: 27.77 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit b682b450c38548f698f6fc26d03706ad7cbd2a47, data reload: false

query1	0.05	0.04	0.05
query2	0.10	0.05	0.05
query3	0.25	0.08	0.08
query4	1.60	0.11	0.12
query5	0.26	0.26	0.28
query6	1.16	0.65	0.65
query7	0.03	0.03	0.02
query8	0.06	0.04	0.04
query9	0.61	0.53	0.53
query10	0.58	0.57	0.56
query11	0.17	0.12	0.11
query12	0.15	0.12	0.11
query13	0.61	0.60	0.60
query14	1.01	1.01	1.01
query15	0.85	0.85	0.84
query16	0.39	0.38	0.41
query17	1.04	1.07	1.01
query18	0.24	0.21	0.20
query19	1.91	1.88	1.83
query20	0.02	0.01	0.01
query21	15.44	0.18	0.13
query22	5.14	0.06	0.04
query23	15.69	0.27	0.11
query24	2.45	0.56	0.65
query25	0.09	0.06	0.06
query26	0.14	0.14	0.13
query27	0.06	0.06	0.05
query28	4.77	1.13	0.94
query29	12.57	3.94	3.29
query30	0.27	0.14	0.11
query31	2.81	0.59	0.38
query32	3.23	0.54	0.47
query33	3.10	3.05	3.05
query34	15.94	5.15	4.58
query35	4.57	4.67	4.59
query36	0.68	0.51	0.49
query37	0.09	0.07	0.06
query38	0.07	0.03	0.04
query39	0.04	0.03	0.03
query40	0.17	0.14	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 98.57 s
Total hot run time: 27.77 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 86.81% (408/470) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.75% (18091/34295)
Line Coverage 38.00% (164192/432119)
Region Coverage 32.32% (125106/387034)
Branch Coverage 33.73% (54738/162263)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/14) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 87.50% (315/360) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.41% (24057/33687)
Line Coverage 57.81% (250145/432701)
Region Coverage 52.94% (207793/392530)
Branch Coverage 54.61% (89200/163332)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 35.71% (5/14) 🎉
Increment coverage report
Complete coverage report

@zzzxl1993
Copy link
Contributor Author

run buildall

@zzzxl1993
Copy link
Contributor Author

run buildall

@zzzxl1993
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 81.76% (390/477) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.75% (18095/34305)
Line Coverage 38.03% (164375/432229)
Region Coverage 32.35% (125179/387010)
Branch Coverage 33.77% (54809/162292)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 85.68% (377/440) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.63% (24150/33717)
Line Coverage 57.99% (251044/432936)
Region Coverage 53.05% (208260/392584)
Branch Coverage 54.79% (89528/163393)

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 189061 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit e58fb304e69422539d6033bc7eb0a3a81bae9da3, data reload: false

query1	1072	435	385	385
query2	6563	1680	1674	1674
query3	6759	224	226	224
query4	25991	23433	23523	23433
query5	5746	649	482	482
query6	363	246	230	230
query7	4642	497	294	294
query8	306	271	270	270
query9	8687	2574	2592	2574
query10	563	349	298	298
query11	16512	14934	15682	14934
query12	197	124	127	124
query13	1732	608	474	474
query14	11327	9522	9724	9522
query15	248	198	186	186
query16	7908	729	555	555
query17	1867	851	710	710
query18	2132	485	363	363
query19	294	232	185	185
query20	144	138	129	129
query21	230	134	116	116
query22	4527	4841	4780	4780
query23	34930	33781	32919	32919
query24	8326	2331	2381	2331
query25	582	500	441	441
query26	1211	267	154	154
query27	2700	494	359	359
query28	4329	2187	2158	2158
query29	779	591	461	461
query30	290	223	191	191
query31	884	815	732	732
query32	81	71	63	63
query33	600	363	310	310
query34	798	838	522	522
query35	802	826	752	752
query36	925	1010	908	908
query37	120	109	80	80
query38	3478	3564	3519	3519
query39	1479	1416	1402	1402
query40	221	125	112	112
query41	59	60	56	56
query42	123	108	106	106
query43	468	493	452	452
query44	1215	730	740	730
query45	176	175	174	174
query46	882	995	627	627
query47	1785	1829	1714	1714
query48	385	423	333	333
query49	763	529	403	403
query50	630	680	398	398
query51	3893	3865	3837	3837
query52	111	105	97	97
query53	228	264	196	196
query54	304	294	273	273
query55	84	81	80	80
query56	315	327	302	302
query57	1145	1206	1123	1123
query58	285	267	266	266
query59	2566	2729	2523	2523
query60	343	334	325	325
query61	159	158	160	158
query62	791	695	664	664
query63	222	193	192	192
query64	4443	1165	861	861
query65	4029	3944	3941	3941
query66	1025	436	331	331
query67	15257	15297	15080	15080
query68	8507	922	601	601
query69	533	327	290	290
query70	1346	1269	1293	1269
query71	533	334	324	324
query72	5724	4877	5064	4877
query73	680	552	361	361
query74	8847	8991	9010	8991
query75	4129	3327	2857	2857
query76	3837	1164	711	711
query77	797	390	329	329
query78	9513	9876	8856	8856
query79	2025	840	592	592
query80	683	584	502	502
query81	523	279	227	227
query82	232	160	129	129
query83	267	273	250	250
query84	258	109	98	98
query85	923	503	470	470
query86	350	329	280	280
query87	3682	3700	3588	3588
query88	3299	2241	2198	2198
query89	379	319	291	291
query90	2031	214	216	214
query91	168	167	137	137
query92	87	68	66	66
query93	2144	984	634	634
query94	642	442	341	341
query95	404	324	296	296
query96	486	574	285	285
query97	2912	2947	2886	2886
query98	245	218	212	212
query99	1335	1381	1301	1301
Total cold run time: 279552 ms
Total hot run time: 189061 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 27.51 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e58fb304e69422539d6033bc7eb0a3a81bae9da3, data reload: false

query1	0.05	0.05	0.04
query2	0.09	0.05	0.05
query3	0.25	0.08	0.08
query4	1.61	0.11	0.11
query5	0.28	0.28	0.25
query6	1.16	0.64	0.64
query7	0.03	0.03	0.02
query8	0.05	0.04	0.04
query9	0.60	0.54	0.52
query10	0.58	0.57	0.59
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.62	0.60	0.62
query14	1.01	1.01	1.02
query15	0.85	0.82	0.87
query16	0.39	0.40	0.40
query17	1.04	1.01	1.01
query18	0.22	0.20	0.20
query19	1.95	1.84	1.81
query20	0.01	0.02	0.01
query21	15.44	0.18	0.12
query22	4.96	0.07	0.04
query23	15.70	0.25	0.10
query24	3.36	0.58	0.36
query25	0.09	0.07	0.06
query26	0.15	0.14	0.15
query27	0.08	0.07	0.05
query28	3.70	1.14	0.93
query29	12.54	3.88	3.24
query30	0.28	0.14	0.11
query31	2.82	0.60	0.40
query32	3.24	0.55	0.47
query33	3.14	3.12	3.12
query34	15.82	5.17	4.56
query35	4.62	4.57	4.55
query36	0.69	0.50	0.49
query37	0.10	0.07	0.07
query38	0.07	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.14	0.14
query41	0.09	0.04	0.03
query42	0.04	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 98.29 s
Total hot run time: 27.51 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 82.45% (390/473) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.78% (18126/34343)
Line Coverage 38.09% (164771/432610)
Region Coverage 32.40% (125508/387383)
Branch Coverage 33.84% (54981/162493)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 86.70% (378/436) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.50% (24135/33755)
Line Coverage 57.90% (250871/433317)
Region Coverage 52.98% (208170/392957)
Branch Coverage 54.70% (89484/163594)

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

ClickBench: Total hot run time: 27.56 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 74e9a198240a23c329609f38d170a5d9eec14833, data reload: false

query1	0.06	0.05	0.04
query2	0.10	0.05	0.05
query3	0.25	0.08	0.08
query4	1.61	0.12	0.12
query5	0.27	0.26	0.26
query6	1.16	0.64	0.66
query7	0.03	0.02	0.03
query8	0.06	0.04	0.04
query9	0.60	0.52	0.52
query10	0.58	0.57	0.59
query11	0.17	0.11	0.11
query12	0.15	0.12	0.12
query13	0.63	0.60	0.61
query14	1.01	1.02	1.02
query15	0.86	0.83	0.86
query16	0.40	0.43	0.41
query17	1.06	1.02	1.04
query18	0.25	0.21	0.20
query19	1.96	1.82	1.79
query20	0.02	0.02	0.01
query21	15.44	0.19	0.13
query22	5.14	0.08	0.05
query23	15.69	0.27	0.10
query24	2.20	0.69	0.43
query25	0.08	0.07	0.06
query26	0.15	0.13	0.14
query27	0.06	0.06	0.05
query28	4.80	1.15	0.93
query29	12.56	4.00	3.20
query30	0.29	0.15	0.12
query31	2.82	0.59	0.39
query32	3.24	0.55	0.48
query33	3.01	3.10	3.03
query34	15.84	5.18	4.54
query35	4.59	4.59	4.65
query36	0.69	0.51	0.50
query37	0.11	0.07	0.07
query38	0.06	0.05	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.14
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 98.39 s
Total hot run time: 27.56 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 82.45% (390/473) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.84% (18242/34525)
Line Coverage 38.28% (166239/434264)
Region Coverage 33.29% (129358/388589)
Branch Coverage 34.06% (55612/163272)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 86.47% (377/436) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.50% (24264/33937)
Line Coverage 58.01% (252314/434971)
Region Coverage 53.45% (210664/394163)
Branch Coverage 54.79% (90057/164373)

@zzzxl1993 zzzxl1993 changed the title [feature](inverted index) add MultiPhraseQuery support to search function [feature](inverted index) add multi position PhraseQuery support to search function Nov 11, 2025
Copy link
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 11, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@csun5285 csun5285 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@airborne12 airborne12 merged commit 6584a99 into apache:master Nov 11, 2025
27 of 29 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 11, 2025
yiguolei pushed a commit that referenced this pull request Nov 12, 2025
…support to search function #57588 (#57897)

Cherry-picked from #57588

Co-authored-by: zzzxl <yangsiyu@selectdb.com>
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 13, 2025
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
@yiguolei yiguolei mentioned this pull request Dec 2, 2025
airborne12 pushed a commit to airborne12/apache-doris that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants