lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject Re: TermQuery and PhraseQuery..problem with word with space
Date Mon, 09 Oct 2006 04:39:17 GMT
> I am trying to index a field which has more than one word with space e.g.
> "My Word"
> i am indexng it UN_TOKENIZED .. but when i use TermQuery to query "My
> its not yielding any result..

Seems that it should work.

Few things to check:
- make sure you are indexing with UN_TOKENIZED.
- check that either both field and query text are lower-cased or both are
not lower-cased.
- use Luke to examine the content of the index (when adding as
  print the query (toString);
  - do they match each other? match your expectation?

> Is term qurey limited to one word? i mean if we index a word with space
> index it UN_TOKENIZED..
> shouldnt TermQuery yeild result to "My Word".
> Ismail

There is no such limitation.

Hope this helps,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message