Prev | Home | Next

Searching

To locate a subset of items that match some criteria, you type a search string into the Query Pane at the top of the main window. If you just type one or more words, Parsnips will display all the items that have those words anywhere in the title, keywords, or main text of the item. Parsnips also supports more sophisticated searches, allowing you to search for combinations of words or phrases, exclude items with certain words, and to search only in the text, title, or keyword fields.

For the more complex searches, you should initially use the Query Builder panel. This is displayed by clicking the Query Builder... label in the right side of the Query Pane. After you compose a few queries using this panel and see what query string is generated, you will learn how to type advanced queries by hand.

Note: Parsnips uses the Lucene search engine library. The following discussion of query syntax is based upon the Lucene documentation.

The general syntax for queries is as follows:

Terms

A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

A Single Term is a single word such as test or hello.

A Phrase is a group of words surrounded by double quotes such as "hello dolly".

Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

Capitalization is never important in Terms. Searches for Sun and sun will find exactly the same items.
 

Fields

Items in Parsnips store their data in fields. When performing a search you can either specify a field, or use the default text field. The field names are title, keywords, url and contents.

You can search any field by typing the field name followed by a colon ":", followed by the term you are looking for. If no field is specified then all fields are searched by default.

As an example, if you want to find the item entitled "The Right Way" which contains the text "don't go this way", you can enter:

title:"The Right Way" AND contents:go
 

Term Modifiers

Parsnips supports single and multiple character wildcard searches.

To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol.

The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

test*

You can also use the wildcard searches in the middle of a term.

te*t

Note: You cannot use a * or ? symbol as the first character of a search.
 

Boolean operators

Boolean operators allow terms to be combined through logic operators. Parsnips supports AND, OR, and NOT as Boolean operators (Note: Boolean operators must be ALL CAPS).

OR
The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. The symbol || can be used in place of the word OR.

To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

"jakarta apache" jakarta

or

"jakarta apache" OR jakarta

AND
The AND operator matches items where both terms exist anywhere in the text of a single item. The symbol && can be used in place of the word AND.

To search for documents that contain "jakarta apache" and "jakarta lucene" use the query:

"jakarta apache" AND "jakarta lucene"

NOT
The NOT operator excludes documents that contain the term after NOT. The symbol ! can be used in place of the word NOT.

To search for items that contain "jakarta apache" but not "jakarta lucene" use the query:

"jakarta apache" NOT "jakarta lucene"

Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

NOT "jakarta apache"

This is a limitation of the Lucene search engine. You can work around it by using the Query Builder to choose a Date range to go along with the NOT term.
 

Grouping

Parsnips supports using parentheses to group clauses to form sub-queries. This can be very useful if you want to control the boolean logic for a query.

To search for either "jakarta" or "apache" and "website" use the query:

(jakarta OR apache) AND website

This eliminates any confusion and makes sure that "website" must exist and one or both of the terms "jakarta" and "apache" must exist.
 

Field Grouping

Parsnips supports using parentheses to group multiple clauses to a single field.

To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

title:(return AND "pink panther")
 

Escaping Special Characters

Parsnips supports escaping special characters that are part of the query syntax. The current list of special characters are

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

To escape any of these characters use the \ before the character. For example to search for (1+1):2 use the query:

\(1\+1\)\:2

 

There are additional capabilities of the Lucene search engine that are not described here. For example, there are proximity searches and range searches. To learn more about these see Lucene's Query Syntax document.

Introduction

Quick Start

Concepts

  Databases

  Searching

  Drag and Drop

  Creating a Parsnips
  
Bookmarklet

  Keyword
  
Managment

  Importing
  Bookmarks

Reference