/    Sign up×
Community /Pin to ProfileBookmark

Site Search – how to block results based on specific search criteria

I have a site search that searches a list and returns results based on meta keywords, title and content of each item in the list, and sorts the results alphabetically. I am looking for a way to prevent certain resources from showing up based on specific search criteria.

For example, searching “ADA” (abbreviation for “Americans with Disabilities Act”) returns three results at the moment:

  • 1st result has “adaptive” in the title and content

  • 2nd result has “adaptive” in the content

  • 3rd result has “ADA” in the title, content and keyword
  • Ideally, the 3rd result will be the first to show up OR the first two should not appear in the results at all.

    Any ideas?

    Is there a way to prevent the first two results from showing up using meta keywords to “not include” or “block” from being returned based on a keyword?

    to post a comment

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @NogDogJan 24.2022 — Probably depends on how/where you are doing the search. If you could use a regular expression (regex) search at that point, then it should be possible to have it only match on whole words, e.g. /badab/i to only match on the word "ada" in a case-insensitive manner.
    ×

    Success!

    Help @jlynch spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.25,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...