Hi @mayuri261191 ,
This is because jcr:primaryType of Experience Fragments are also cq:Page only. And, also the EF and content pages are created with same template (/conf/test/settings/wcm/templates/mvp-content-page or since you have used like keyword so may be EF template also has the same sub name).
Ideally, we should create separate content hierarchy for Experience Fragment and content pages, something like below-
/content/my-project-experience-fragment/....
/content/my-project-pages/..
Reason is, because EF you are going to include on the content pages, and in case of any search implementation than we just want to search content under content pages.
Now for your case, if you can not have separate paths for content and EF, try finding some unique property on the content pages, which are not there on EF and then add that property check i the query.
Hope it helps!
Thanks,
Ritesh Mittal