lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey" <s...@elyograg.org>
Subject Re: KeywordTokenizerFactory splits the string for the exclamation mark
Date Thu, 15 May 2014 13:50:56 GMT
> Also could you please tell me the difference between searching a text in
> the
> following ways
>
> q=Exact_Word:"samplestring"
>
> q=samplestring&qf=Exact_Word
>
> I am trying to understand how enclosing the full term in "" is resolving
> this problem ? What does it tell to solr  ?

The quotes tell Solr to do a phrase query. A phrase query must have the
same relative position increments in the index as are found in the query,
or the entire string must be an exact match for a single token in the
index. Basically, the index must have the same words as the query, next to
each other, and in the same order.

> Other than the exclamation mark are there any other characters which tells
> specific things to solr

There are a number of special characters to Solr' standard query parser.
The bottom of this page shows them all:

http://lucene.apache.org/core/4_2_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html?is-external=true

It lists && as a special character. It's not the combination of two &
characters that is special, it is each & character.

Thanks,
Shawn



Mime
View raw message