lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Zippo <>
Subject Re: exact field match
Date Mon, 26 Jan 2009 21:06:12 GMT
it works...

thanks for your help....


Da: Erick Erickson <>
Inviato: Lunedì 26 gennaio 2009, 20:29:17
Oggetto: Re: exact field match

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.

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.


On Mon, Jan 26, 2009 at 2:15 PM, Antonio Zippo <> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message