RE: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Ilya Zavorin
worked like a charm! thx! From: Jack Krupansky [j...@basetechnology.com] Sent: Thursday, June 14, 2012 3:30 PM To: java-user@lucene.apache.org Subject: Re: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

Re: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Jack Krupansky
Look at this code: QueryTermExtractor.getTerms(Query query) http://lucene.apache.org/core/3_6_0/api/contrib-highlighter/org/apache/lucene/search/highlight/QueryTermExtractor.html -- Jack Krupansky -Original Message- From: Ilya Zavorin Sent: Thursday, June 14, 2012 2:36 PM To: java-user

RE: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Ilya Zavorin
Uwe, sorry but I am having trouble understanding this. Can you point me to a place in documentation that explains this in more detail (I've read http://lucene.apache.org/core/old_versioned_docs/versions/3_4_0/api/core/org/apache/lucene/queryParser/QueryParser.html but still am confused) or som

Re: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Chris Hostetter
: Subject: need to find locations of query hits in doc: works fine for regular : text but not for phone numbers : Message-ID: : References: <1339635547170-3989548.p...@n3.nabble.com> : In-Reply-To: <1339635547170-3989548.p...@n3.nabble.com> https://people.apache.org/~hossman/#threadhijack Threa

Using PropertiesSynonynmProvider Class

2012-06-14 Thread blunderboy
I am trying to use this class and add my synonym list in synonyms.properties file. File Content : car auto car machine car automobile But results obtained are only for last synonym specified , i.e. car automobile , i.e. String to String map is created . instead of String to String[] map . Help

RE: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Uwe Schindler
Just take the BooleanQuery returned by the QueryParser and get its clauses (sub-queries like TermQuery, PhraseQuery, other BooleanQuery...). By that you get all query components. In most cases some recursive instanceof checking for various Query subclasses can do this. Uwe - Uwe Schindler H.-

RE: need to find locations of query hits in doc: works fine for regular text but not for phone numbers

2012-06-14 Thread Ilya Zavorin
OK, so I figured out what the problem was. It wasn't with the digits but rather with the various delimiters like "(" and "-" that I use. Essentially, the statement String[] subTerms = qstr.split("\\s+"); Does not split a query the same way as the query parser would do it. And thanks,

Re: Refining an existing search of Lucene

2012-06-14 Thread Ian Lea
Generally simpler just to do a new search. -- Ian. On Thu, Jun 14, 2012 at 1:19 PM, Jochen Hebbrecht wrote: > Hi all, > > I'm searching for a way to reuse a Lucene search. > For example, I'm searching for the word "acci". But too many ScoreDocs are > returned, and I provide: "accide". Can it r

Refining an existing search of Lucene

2012-06-14 Thread Jochen Hebbrecht
Hi all, I'm searching for a way to reuse a Lucene search. For example, I'm searching for the word "acci". But too many ScoreDocs are returned, and I provide: "accide". Can it reuse the existing search? Or is it just better to create a new and fresh Lucene search? Jochen