You need to index and search using something like
KeywordAnalyzer. That analyzer does no tokenizing/
data transformation or such. For instance, it
doesn't fold case.

You will be unable to search for "bond" and get a hit
in this case, so one solution is to use two fields, and
search one or the other depending upon your needs.
e.g.
myField
myFieldTokenized

Each field gets a complete copy of the data, and you search
"myField" in the case you're describing and
myFieldTokenized when you want to match on "bond".

Of course, if you never want a hit on "bond", you don't need the
Tokenized field.

Best
Erick

On Mon, Jan 26, 2009 at 2:15 PM, Antonio Zippo <reven...@yahoo.it> wrote:

> Hi all,
>
> i'm using a string field named "myField"
> and 2 documents containing:
> 1. myField="my name is james bond"
> 2. myField="james bond"
>
> if i use a query like this:
> myField:"james bond" it returns 2 documents....
>
> how can i get only the second document using a string or text field? I need
> to search the document with the exact value....nor documents containing the
> exact phrase in value
>
> thanks in advance
>
>
>

Reply via email to