Prismic Fulltext Predicate returns all content when I search for term "to" and "for" in my vue App

Here is my code

const fullTextResult = await this.$prismic.client.get({
          predicates: this.$prismic.predicate.fulltext(
            "my.academy.article_title",
            query
          ),
   });

Searching for the terms "to" and "for" returns all dcouments of all the custom type

Hey @chaderenyore480, welcome to the community.

  • How many documents are you expecting to see in the response instead?
  • Can you also post the code for the query variable in your search?

Hello there so I was not expecting to get any document. As show in the code above, I'm searching academy custom type if it has the query that I pass on to it.

async searchArticles(query) {
        const fullTextResult = await this.$prismic.client.get({
          predicates: this.$prismic.predicate.fulltext(
            "my.academy.article_title",
            query
          ),
        });
        this.query = query;
        return fullTextResult;
      },

That's the code with the query I pass to the function, let's say I seaech for 'getting started' then it will return documents with that custom type of getting started.
But now the problem is when I search for "to" and "for" it resturns every document from the repo and not the custom type.

Live demo is here CoinProfit Academy
Use the website like a normal user and search for the title of the document there and then search for to or for to see what I'm talking about.

The query will return all the documents of the type academy that contain the words 'for' or 'to' in the field named article_title. The fulltext search only works with full word matches.

What's the URL of your repository? We would like to run a test on our end.

Url Here
coinprofitapp.prismic.io/

I was able to reproduce your use case. I'll share this with the team to see what they think.

Thanks

Hey, @chaderenyore480 the team confirms that this is the intended behavior of the fulltext search.
for is a preposition and all prepositions are ignored.

This is why you are seeing all the documents at once.

What do you mean preposition and why are they ignored?
Can you please elaborate? I mean should a user mistankenly search for that on my site it breaks my UI. Please elaborate I don't understand

I believe this is related to SEO Stop Words that are ignored in web searches.