Re: QueryParser, double quotes and wilcard inside the double quotes

2012-07-04 Thread Jochen Hebbrecht
Thanks Ian, I'll give it a try! 2012/7/3 Ian Lea > You can use the QueryParser proximity feature e.g. "foo test"~n where > n is the max distance you want them to be apart. Or look at the > SpanQuery stuff e.g. SpanNearQuery. > > > -- > Ian. > > > On Tue, Jul 3, 2012 at 4:59 PM, Jochen Hebbrecht

Re: Starts with Query - Return like search

2012-07-04 Thread Ian Lea
Where exactly are you using these double quoted strings? QueryParser? It would help if you showed a code snippet. Assuming your real data is more complex and the strings you are searching for aren't necessarily at the start of the text, you'll need some mix of wildcard and proximity searching.

Re: Starts with Query - Return like search

2012-07-04 Thread Ian Lea
In fact there is an FAQ entry Can I combine wildcard and phrase search, e.g. "foo ba*"? at http://wiki.apache.org/lucene-java/LuceneFAQ#Can_I_combine_wildcard_and_phrase_search.2C_e.g._.22foo_ba.2A.22.3F which suggests you extend the QueryParser to build a MultiPhraseQuery. There's also ComplexPhr

Re: Starts with Query - Return like search

2012-07-04 Thread Hiren Shah
Please find the code here package org.lucenesample; import org.apache.lucene.search.Query; import org.apache.lucene.*; import org.apache.lucene.analysis.*; import org.apache.lucene.analysis.standard.*; import org.apache.lucene.analysis.standard.std31.*; import org.apache.lucene.analysis.tokenattr

Re: Starts with Query - Return like search

2012-07-04 Thread Jack Krupansky
You might also consider using the EdgeNGram filter for your documents since it would index "bar" as both "ba" and "bar" at the same position, eliminating the need for the use of wildcards. It makes the index bigger, but eliminates the performance degradation of wildcards. It isn't great for all

Re: Starts with Query - Return like search

2012-07-04 Thread Hiren Shah
Hi Jack This needs to be taken care while indexing?Where can i get the code for the edgegram indexing and then searching.? -Hiren On Wed, Jul 4, 2012 at 9:19 PM, Jack Krupansky wrote: > You might also consider using the EdgeNGram filter for your documents > since it would index "bar" as both "ba

Re: Starts with Query - Return like search

2012-07-04 Thread Jack Krupansky
Here's a Solr field type that supports edge n-grams: positionIncrementGap="100"> maxGramSize="15" side="front"/> In Lucene, you would use the EdgeNGramFilter. This is for Lucene/Solr 3.6. -- Jack Krupansky -Original Message- From: Hiren Shah Sent: Wednesday, Ju

Re: Starts with Query - Return like search

2012-07-04 Thread Jack Krupansky
Oops... that's EdgeNGramTokenFilter in Lucene. -- Jack Krupansky -Original Message- From: Jack Krupansky Sent: Wednesday, July 04, 2012 4:52 PM To: java-user@lucene.apache.org Subject: Re: Starts with Query - Return like search Here's a Solr field type that supports edge n-grams:

Re: [ANNOUNCE] Apache Lucene 4.0-alpha released.

2012-07-04 Thread Bill Bell
Hey how do we use the MemoryCodec in Solr? Sent from my Mobile device 720-256-8076 On Jul 3, 2012, at 7:09 AM, Robert Muir wrote: > 3 July 2012, Apache Luceneā€š 4.0-alpha available > The Lucene PMC is pleased to announce the release of Apache Lucene 4.0-alpha > > Apache Lucene is a high-perform