Skip to content

Search - General Questions #2861

Answered by squidfunk
shaneholloman asked this question in Q&A
Discussion options

You must be logged in to vote

Question 1 - Search "Fields"

Searchable fields are:

  • title
  • text
  • tags (currently Insiders only)

Note that the syntax demands for prefixing every word with the field, i.e. title:foo title:bar, because title:foo barmeans "documents with foo in title and bar in any field". This will, however, yield an OR search. If you want an AND search, you would have to search like this:

+title:foo +title:bar

... or let Material for MkDocs preprocess the query string and use quotes as known from Google:

"title:foo title:bar"

Why is this not documented? I think you very much see how complex and ugly the syntax is and most users just don't bother. My goal is to provide a search implementation that returns…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by squidfunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants