Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search syntax for operators and phrases #11411

Merged
merged 1 commit into from Jul 27, 2019
Merged

Conversation

@Gargron
Copy link
Member

Gargron commented Jul 26, 2019

Supports syntax like:

  • Operators, like +foo (AND) and -bar (NOT)
  • Phrases, like "hello world"
  • Prefixes, like foo:"hello world" (currently unused)

It does change the default of treating all words as joined by AND, so "quick fox" will include items that only contain "fox" and only contain "quick" as well (although items containing "quick fox" will score higher, like before).

The new phrase syntax allows to search for an exact sequence of words instead.

Included is also a small change that allows circumventing the URL resolving logic to use only the search even when a URL is given, when the resolve param is set to false. I believe that's how it should have been all along.

@Gargron Gargron force-pushed the feature-search-syntax branch to 777ee83 Jul 26, 2019
@ykzts
ykzts approved these changes Jul 27, 2019
@Gargron Gargron merged commit b9fbcbf into master Jul 27, 2019
2 checks passed
2 checks passed
build-and-test Workflow: build-and-test
Details
codeclimate All good!
Details
@ykzts ykzts deleted the feature-search-syntax branch Aug 7, 2019
hiyuki2578 added a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
katsusuke added a commit to katsusuke/mastodon that referenced this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.