RE: When to use which Analyzer

2008-01-14 Thread spring
> You can answer an awful lot of this much faster than waiting > for someone > to reply by getting a copy of Luke and look at the parse results using > various > analyzers. Ah cool, you mean the "explain structure" button. > Try KeywordAnalyzer for your query. > > Combine queries programmatica

Re: When to use which Analyzer

2008-01-14 Thread Erick Erickson
You can answer an awful lot of this much faster than waiting for someone to reply by getting a copy of Luke and look at the parse results using various analyzers. And you can use query.toString() to see the parsed results as well. Try KeywordAnalyzer for your query. Combine queries programmatica

RE: When to use which Analyzer

2008-01-14 Thread spring
> The caution to use the same analyzer at index and query time is, > in my experience, simply good advice to follow until you are > familiar enough with how Lucene uses analyzers to keep from > getting really, really, really confused. Once you understand > when analyzers are used and how they effec

RE: When to use which Analyzer

2008-01-14 Thread spring
> > How can I search for fields stored with Field.Index.UN_TOKENIZED? > > Use TermQuery. > > > Why do I need an analyzer for searching? > > Consider a full-text field that will be tokenized removing special > characters and lowercased, and then a user querying for an uppercase > word. The

Re: When to use which Analyzer

2008-01-13 Thread Erick Erickson
I'm pretty sure that UN_TOKENIZED really bypasses analysis entirely. so yes, it's a little confusing that you can specify an analyzer but then pass a flag that says, in effect, "ignore the analyzer I *said* I wanted to use". So, in your example, you *are* running your query through SimpleAnalyzer,

Re: When to use which Analyzer

2008-01-13 Thread Erik Hatcher
On Jan 13, 2008, at 12:08 PM, <[EMAIL PROTECTED]> wrote: I have some doubts about Analyzer usage. I read that one shall always use the same analyzer for searching and indexing. Why? How does the Analyzer effect the search process? What is analyzed here again? As you surmised, it is becaus