if you use standardanalyzer it will break "john doe" into 2 tokens and form a phrase query. if you want to do phrase queries, don't set the indexoptions to DOCS_ONLY. otherwise they won't work.
if what you want is for "john doe" to only be 1 term without positions, then use KeywordAnalyzer, and DOCS_ONLY is then ok because you don't need any positions. On Tue, Nov 29, 2011 at 10:18 AM, Mihai Caraman <caraman.mi...@gmail.com> wrote: > field = new Field("author",(author).toLowerCase(),Field.Store.NO, > Field.Index.NOT_ANALYZED); > field.setIndexOptions(FieldInfo.IndexOptions.DOCS_ONLY); > field.setOmitNorms(true); > > When in the above configuration i switched from NOT_ANALYZED to ANALYZED, > luke's results for author:"john doe" stopped showing(after rebuilding the > index). Why? > > Also, how can, on the same index, luke show me results for author:"john > doe"(using not_analyzed), but when i debug the IndexSearcher which receives > a query parsed with the same standardanalyzer as at indexing time(and seems > to be correct), returns no results?! > > Thank you, > Mihai C. > -- lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org