lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
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
Word"
> 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
un-tokenized);
  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
and
> index it UN_TOKENIZED..
> shouldnt TermQuery yeild result to "My Word".
>
>
> Ismail

There is no such limitation.

Hope this helps,
Doron



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message