Search Queries

Startseite  Vorherige Seite  Nächste Seite

 

General information

Search queries use both expressions and operators. There are two types of expressions: Single expressions and phrases.
A single expression is a word such as “Hi”. Meanwhile, a phrase is a group of words that is enclosed by quotation marks, e.g., “Hi there”.
In addition to this, multiple expressions can be linked using Boolean operators in order to create more complex search queries.

 

Proximity searches

Proximity searches, which are formulated using a tilde symbol (“~”), can be used to search for content occurrences that do not exceed a maximum distance from each other.

Example:

If you enter “n2pdf environment” ~4 as a search query, the program will search the index for instances of the terms “n2pdf” and “environment” in which these two terms are not separated by more than 4 words.

 

Wildcards

n2pdf Archive Search & View also supports searches with wildcards substituting one (?) or more (*) characters. Moreover, these wildcards can be combined. However, wildcards cannot be used within phrases or as leading characters.

 

Example:

Te?t

When a multi-character wildcard search is run, the search will search for terms that match the search query when the wildcard is substituted with 0 or more characters. For example, you could use the following search query to search for the words “test,” “tests,” “tester,” and “testers”:

 

Test*

“?”, “*”, or both can be used at any place in the expression:

 

scr?b*

Will search for “scrub,” “scribe,” “scribble,” etc.

 

Regular expression search

Using regular expressions in the search query makes it possible to search for specific patterns enclosed by slashes.

 

Example:

/[cm]an/ This search query will find the words “can” and “man” in the indexed data.

 

Fuzzy search

To use a fuzzy search, please use the tilde symbol (“~”) at the end of the search term you are using.

 

Example:

coil~ would return the following hits, for example: foil, coils, and oil

 

Boolean operators

You can use logical operatives, such as “AND” and “OR,” to narrow down a search.
 

OR
If you want two expressions to be OR’d, write “OR” between them or simply do not add any operators, as “OR” is the operator that the search uses by default.
hi OR there
or

hi there
 

AND
If you want two expressions to be AND’ed, write “AND” between them or add a “+” symbol before each one.
hi AND there
or
+hi +there
 

+
If you want the word “hi” to be mandatory for all hits, but the word “there” to be optional, you can use
+hi there
 
 
You can also use logical negation operators.
 
To specify that an expression should not be found in any of the hits that are returned by the search, add “NOT” or a minus symbol (“-”) before the expression.

 

NOT
hi NOT there
means that hits should contain “hi,” but should not contain “there”.
 
Grouping

n2pdf Archive Search & View supports the use of parentheses for grouping queries and creating subqueries. This can come in handy when you want to control the order in which Boolean operators in a query are evaluated or when you want to mix different query styles:

 

Example:

(hi OR there) AND I

will search for all documents in which “I” and either “hi” or “there” appear.

 

 

Using syntax characters

You can also use characters that are reserved for the search syntax. To do so, simply place a backslash (“\”) before the corresponding character so that it will not be interpreted as a syntax character but will instead be included in the search expression.

 

Example:

\(1\+1\)\:2

means that the search function should literally search for “(1+1):2”.

 

Reserved syntax characters:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ /