For The Defense Search Assistance

Searches

Field Search

You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

Available search fields are: title, text, author, category

title:"False Claims in Construction" AND text:court

or

title:"False Claims in Construction" AND court

Since text is the default field, the field indicator is not required.

Wildcard Search

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.

Fuzzy Search

To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

roam~

This search will find terms like foam and roams.

An additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

roam~0.8

The default that is used if the parameter is not given is 0.5.

Proximity Search

To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "insurance" and "coverage within 10 words of each other in a document use the search:

"insurance coverage"~10

Range Search

Range Queries allow one to match documents whose field(s) values are between the lower and upper bound specified by the Range Query. Range Queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically.

title:{Aida TO Carmen}

This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by curly brackets.

Boolean Operators

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

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. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.

To search for documents that contain either "insurance coverage" or just "insurance" use the query:

"insurance coverage" insurance

or

"insurance coverage" OR insurance

AND

The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

To search for documents that contain "insurance coverage" and "coverage Lucene" use the query:

"insurance coverage" AND "coverage claim"

+

The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

To search for documents that must contain "insurance" and may contain "lucene" use the query:

+insurance lucene

NOT

The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

To search for documents that contain "insurance coverage" but not "coverage Lucene" use the query:

"insurance coverage" NOT "coverage claim"

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

NOT "insurance coverage"

-

The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

To search for documents that contain "insurance coverage" but not "coverage Lucene" use the query:

"insurance coverage" -"coverage claim"

Grouping

This can be very useful if you want to control the boolean logic for a query.

To search for either "insurance" or "coverage" and "claim" use the query:

(insurace OR coverage) AND claim

This eliminates any confusion and makes sure you that claim must exist and either term insurance or coverage may exist.