Re: Case insensitive StringField?

2013-05-21 Thread Jack Krupansky
Yes it is. It always will. But... you can escape the spaces with a backslash: Query q = qp.parse("new\\ york"); -- Jack Krupansky -Original Message- From: Shahak Nagiel Sent: Tuesday, May 21, 2013 10:09 PM To: java-user@lucene.apache.org Subject: Re: Case insensitive StringField? Jac

Re: Case insensitive StringField?

2013-05-21 Thread Shahak Nagiel
Jack / Michael: Thanks, but the query parser still seems to be tokenizing the query? public class StringPhraseAnalyzer extends Analyzer  {         protected TokenStreamComponents createComponents (String fieldName, Reader reader) {             Tokenizer tok = new KeywordTokenizer(reader);      

Re: Query with phrases, wildcards and fuzziness

2013-05-21 Thread Ross Simpson
Jack, thanks very much! I wasn't considering a space a special character for some reason. That has worked perfectly. Cheers, Ross On May 22, 2013, at 10:24 AM, Jack Krupansky wrote: > Just escape embedded spaces with a backslash. > > -- Jack Krupansky > > -Original Message- From: R

Re: Query with phrases, wildcards and fuzziness

2013-05-21 Thread Jack Krupansky
Just escape embedded spaces with a backslash. -- Jack Krupansky -Original Message- From: Ross Simpson Sent: Tuesday, May 21, 2013 8:08 PM To: java-user@lucene.apache.org Subject: Query with phrases, wildcards and fuzziness Hi all, I'm trying to create a fairly complex query, and havi

Query with phrases, wildcards and fuzziness

2013-05-21 Thread Ross Simpson
Hi all, I'm trying to create a fairly complex query, and having trouble constructing it. My index contains a TextField with place names as strings, e.g.: Port Melbourne, VIC 3207 I'm using an analyzer with just KeywordTokenizer and LowerCaseFilter, so that my strings are not tokenized a

Re: Case insensitive StringField?

2013-05-21 Thread Jack Krupansky
To be clear, analysis is not supported on StringField (or any non-tokenized field). But the good news is that by using the keyword tokenizer (KeywordTokenizer) on a TextField, you can get the same effect. That will preserve the entire input as a single token. You may want to include filters to

RE: Case insensitive StringField?

2013-05-21 Thread Michael Ryan
Here's what we use for this: As far as I know, StringField does not use analyzers at all - they'll just be ignored. KeywordTokenizerFactory does the "exact phrase" bit, and LowerCaseFilterFactory does the lowercasing. -Michael -Original Mes

Case insensitive StringField?

2013-05-21 Thread Shahak Nagiel
It appears that StringField instances are treated as literals, even though my analyzer lower-cases (on both write and read sides).  So, for example, I can match with a term query (e.g. "NEW YORK"), but only if the case matches.  If I use a QueryParser (or MultiFieldQueryParser), it never works b

Re: RAMDirectory and expungeDeletes()/optimize()

2013-05-21 Thread Thomas Matthijs
On Tue, May 21, 2013 at 3:12 PM, Konstantyn Smirnov wrote: > I want to refresh the topic a bit. > > Using the Lucene 4.3.0, I could'n find a method like expungeDeletes() in > the > IW anymore. http://lucene.apache.org/core/4_3_0/core/org/apache/lucene/index/IndexWriter.html#forceMergeDeletes()

Re: RAMDirectory and expungeDeletes()/optimize()

2013-05-21 Thread Konstantyn Smirnov
I want to refresh the topic a bit. Using the Lucene 4.3.0, I could'n find a method like expungeDeletes() in the IW anymore. I rely on lucence's MergePolicies to do the optimization, but I need to keep the metadata up-to-date, docFreqs and termFreqs to name a few. The only way to accomplish that w

Re: Bangalore Apache Lucene/Solr meetup

2013-05-21 Thread Anshum Gupta
Just an update, the it has been rescheduled due to some venue availability related issues and is now on the 8th of June. On Tue, May 21, 2013 at 11:58 AM, Anshum Gupta wrote: > Hi folks, > > We just created a new meetup group for all Lucene/Solr enthusiasts in and > around Bangalore. We're holdi