Re: Understanding the query parser

2010-01-11 Thread Avlesh Singh
Thanks Erik for responding. Hoss explained the behavior with nice corollaries here - http://www.lucidimagination.com/search/document/8bc351d408f24cf6/tokenizer_question Cheers Avlesh On Tue, Jan 12, 2010 at 2:21 AM, Erik Hatcher wrote: > > On Jan 11, 2010, at 1:33 PM, Avlesh Singh wrote: > > >>>

Re: Understanding the query parser

2010-01-11 Thread Erik Hatcher
On Jan 11, 2010, at 1:33 PM, Avlesh Singh wrote: It is in the source code of QueryParser's getFieldQuery(String field, String queryText) method line#660. If numTokens > 1 it returns Phrase Query. That's exactly the question. Would be nice to hear from someone as to why is it that way?

Re: Understanding the query parser

2010-01-11 Thread Avlesh Singh
> > It is in the source code of QueryParser's getFieldQuery(String field, > String queryText) method line#660. If numTokens > 1 it returns Phrase > Query. > That's exactly the question. Would be nice to hear from someone as to why is it that way? Cheers Avlesh On Mon, Jan 11, 2010 at 5:10 PM, Ah

Re: Understanding the query parser

2010-01-11 Thread Ahmet Arslan
> I am running in to the same issue. I have tried to replace > my > WhitespaceTokenizerFactory with a PatternTokenizerFactory > with pattern > (\s+|-) but I still seem to get a phrase query. Why is > that? It is in the source code of QueryParser's getFieldQuery(String field, String queryText) m

Re: Understanding the query parser

2010-01-11 Thread rswart
I am running in to the same issue. I have tried to replace my WhitespaceTokenizerFactory with a PatternTokenizerFactory with pattern (\s+|-) but I still seem to get a phrase query. Why is that? Ahmet Arslan wrote: > > >> I am using Solr 1.3. >> I have an index with a field called "name". It

Re: Understanding the query parser

2010-01-10 Thread Ahmet Arslan
> I am using Solr 1.3. > I have an index with a field called "name". It is of type > "text" > (unmodified, stock text field from solr). > > My query > field:foo-bar > is parsed as a phrase query > field:"foo bar" > > I was rather expecting it to be parsed as > field:(foo bar) > or > field:foo fi