11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

02<br />

<br />

<br />

SP2514N<br />

Samsung SpinPoint P120 SP2514N - hard drive - 250 GB -<br />

ATA-133<br />

<br />

<br />

<br />

Specifying Terms for the Standard Query Parser<br />

A query to the standard query parser is broken up into terms and operators. There are two types of terms: single<br />

terms and phrases.<br />

A single term is a single word such as "test" or "hello"<br />

A phrase is a group of words surrounded by double quotes such as "hello dolly"<br />

Multiple terms can be combined together with Boolean operators to form more complex queries (as described<br />

below).<br />

It is important that the analyzer used for queries parses terms and phrases in a way that is consistent<br />

with the way the analyzer used for indexing parses terms and phrases; otherwise, searches may<br />

produce unexpected results.<br />

Term Modifiers<br />

<strong>Solr</strong> supports a variety of term modifiers that add flexibility or precision, as needed, to searches. These modifiers<br />

include wildcard characters, characters for making a search "fuzzy" or more general, and so on. The sections<br />

below describe these modifiers in detail.<br />

Wildcard Searches<br />

<strong>Solr</strong>'s standard query parser supports single and multiple character wildcard searches within single terms.<br />

Wildcard characters can be applied to single terms, but not to search phrases.<br />

Wildcard Search Type<br />

Special<br />

Character<br />

Example<br />

Single character (matches a single<br />

character)<br />

? The search string te?t would match both test<br />

and text.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

254

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!