I am getting an exception in ComplexPhraseQueryParser when fuzzy searching

2021-11-12 Thread Shifflett, David [USA]
content, type); doc.add(cField); try { indexWriter = new IndexWriter(ramDirectory, config); indexWriter.addDocument(doc); indexWriter.close(); idxReader = DirectoryReader.open(ramDirectory); idxSearcher = new IndexSearcher

I am getting an exception in ComplexPhraseQueryParser when fuzzy searching

2021-11-01 Thread Shifflett, David [USA]
ype); doc.add(cField); try { indexWriter = new IndexWriter(ramDirectory, config); indexWriter.addDocument(doc); indexWriter.close(); idxReader = DirectoryReader.open(ramDirectory); idxSearcher = new IndexSearcher

Why would a search using a ComplexPhraseQueryParser throw an exception for some content, but not all content?

2021-08-17 Thread Shifflett, David [USA]
ype); doc.add(cField); try { indexWriter = new IndexWriter(ramDirectory, config); indexWriter.addDocument(doc); indexWriter.close(); idxReader = DirectoryReader.open(ramDirectory); idxSearcher = new IndexSearcher

Re: ComplexPhraseQueryParser performance question

2020-02-13 Thread baris . kazar
class ComplexPhraseQueryParser for that purpose. There are no one. Best regards On 2/4/20 11:14 AM, baris.ka...@oracle.com wrote: Thanks but i thought this class would have a mechanism to fix this issue. Thanks On Feb 4, 2020, at 4:14 AM, Mikhail Khludnev wrote: It's slow per se, since it l

Re: ComplexPhraseQueryParser performance question

2020-02-13 Thread Mikhail Khludnev
Hello, I picked two first questions for reply. > does this class offer any Shingling capability embedded to it? > No, it doesn't allow to expand wildcard phrase with shingles. > I could not find any api within this class ComplexPhraseQueryParser for > that purpose. &g

Re: ComplexPhraseQueryParser performance question

2020-02-12 Thread baris . kazar
org.apache.lucene.search.PhraseWildcardQuery looks very good, i hope this makes into Lucene build soon. Thanks > On Feb 12, 2020, at 10:01 PM, baris.ka...@oracle.com wrote: > > Thanks David, can i look at the source code? > i think ComplexPhraseQueryParser uses > something sim

Re: ComplexPhraseQueryParser performance question

2020-02-12 Thread baris . kazar
Thanks David, can i look at the source code? i think ComplexPhraseQueryParser uses something similar. i will check the differences but do You know the differences for quick reference? Thanks > On Feb 12, 2020, at 6:41 PM, David Smiley wrote: > >  >

Re: ComplexPhraseQueryParser performance question

2020-02-12 Thread David Smiley
i,- > > Regarding this mechanisms below i mentioned, > > does this class offer any Shingling capability embedded to it? > > I could not find any api within this class ComplexPhraseQueryParser for > that purpose. > > > For instance does this class offer the most commonly

Re: ComplexPhraseQueryParser performance question

2020-02-12 Thread baris . kazar
Hi,- Regarding this mechanisms below i mentioned, does this class offer any Shingling capability embedded to it? I could not find any api within this class ComplexPhraseQueryParser for that purpose. For instance does this class offer the most commonly used words api? i can then use one of

Re: ComplexPhraseQueryParser performance question

2020-02-04 Thread baris . kazar
Thanks but i thought this class would have a mechanism to fix this issue. Thanks > On Feb 4, 2020, at 4:14 AM, Mikhail Khludnev wrote: > > It's slow per se, since it loads terms positions. Usual advices are > shingling or edge ngrams. Note, if this is not a text but a string or enum, > it pr

Re: ComplexPhraseQueryParser performance question

2020-02-04 Thread Mikhail Khludnev
It's slow per se, since it loads terms positions. Usual advices are shingling or edge ngrams. Note, if this is not a text but a string or enum, it probably let to apply another tricks. Another idea is perhaps IntervalQueries can be smarter and faster in certain cases, although they are backed on th

Re: ComplexPhraseQueryParser performance question

2020-02-03 Thread baris . kazar
How can this slowdown be resolved? is this another limitation of this class? Thanks > On Feb 3, 2020, at 4:14 PM, baris.ka...@oracle.com wrote: > > Please ignore the first comparison there. i was comparing there {term1 with > 2 chars} vs {term1 with >= 5 chars + term2 with 1 char} > > > The s

Re: ComplexPhraseQueryParser performance question

2020-02-03 Thread baris . kazar
Please ignore the first comparison there. i was comparing there {term1 with 2 chars} vs {term1 with >= 5 chars + term2 with 1 char} The slowdown is The query "term1 term2*" slows down 400 times (~1500 millisecs) compared to "term1*" when term1 has >5 chars and term2 is still 1 char. Best re

ComplexPhraseQueryParser performance question

2020-02-03 Thread baris . kazar
Hi,-  i hope everyone is doing great. I saw this issue with this class such that if you search for "term1*"  it is good, (i.e., 4 millisecs when it has >= 5 chars and it is ~250 millisecs when it is 2 chars) but when you search for "term1 term2*" where when term2 is a single char, the perfo

Re: ComplexPhraseQueryParser class question

2020-01-29 Thread baris . kazar
Thanks Zhixiang. Yes, it cant find when there is an unrelated term in the middle that is not indexed. Similar to what You suggested: i can try the queryText by excluding one term at a time with the ComplexPhraseQueryParser and see best matches. But, i'd rather this is embedded into a L

回复:ComplexPhraseQueryParser class question

2020-01-29 Thread 陈志祥
件人: 日 期:2020年01月30日 05:02:50 收件人:java-user@lucene.apache.org 抄 送:baris.kazar 主 题:ComplexPhraseQueryParser class question Hi,- I hope everyone is doing great. i have a question regarrding ComplexPhraseQueryParser class. This class can handle this queryText case very well: "term1 erm2

ComplexPhraseQueryParser class question

2020-01-29 Thread baris . kazar
Hi,-  I hope everyone is doing great. i have a question regarrding ComplexPhraseQueryParser class. This class can handle this queryText case very well: "term1 erm2 abcd term3*"~2 (last term3 has * at the end and the whole phrase has slop value 2) The term1, term2 and term3 are

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-22 Thread Mikhail Khludnev
t; > checkMatches("role:\"developer\"", "1,2"); > > checkMatches("role:\"p* manager\"", "4"); > > -checkMatches("role:de*", "1,2,3"); > > +checkMa

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-22 Thread Shifflett, David [USA]
ches("name:\"j* smyth~\"~5", "1,2,3"); > checkMatches("role:\"p* manager\" AND name:jack*", "4"); > checkMatches("+role:developer +name:jack*", ""); > -checkM

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-22 Thread Mikhail Khludnev
tches("name:\"j* smyth~\"~5", "1,2,3"); > checkMatches("role:\"p* manager\" AND name:jack*", "4"); > checkMatches("+role:developer +name:jack*", ""); > -checkMatches("name:\"

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-22 Thread Shifflett, David [USA]
;, "3"); + checkMatches("name:\"john smith\"~2 AND role:Designer AND id:3", "3"); } public void testToStringContainsSlop() throws Exception { Problem seems a way odd (assuming CPQP does analysis), it seems like

Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-22 Thread Mikhail Khludnev
uot;1,2,3"); checkMatches("role:\"p* manager\" AND name:jack*", "4"); checkMatches("+role:developer +name:jack*", ""); -checkMatches("name:\"john smith\"~2 AND role:designer AND id:3", "3"); + checkMat

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-21 Thread baris . kazar
the code snippet: > ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(“somefield”, new StandardAnalyzer()); > String teststr = "\"Foo Bar\"~2"; > Query queryToSearch = qp.parse(teststr); > System

Re: [External] Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-21 Thread Shifflett, David [USA]
David,- which version of Lucene are You using? Best regards On 10/21/19 1:31 PM, Shifflett, David [USA] wrote: > Hi all, > Using the code snippet: > ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(“somefield”, new StandardAnalyzer())

Re: ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-21 Thread baris . kazar
David,-  which version of Lucene are You using? Best regards On 10/21/19 1:31 PM, Shifflett, David [USA] wrote: Hi all, Using the code snippet: ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(“somefield”, new StandardAnalyzer()); String teststr = "\"F

ComplexPhraseQueryParser isn't switching search terms to lowercase with StandardAnalyzer

2019-10-21 Thread Shifflett, David [USA]
Hi all, Using the code snippet: ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(“somefield”, new StandardAnalyzer()); String teststr = "\"Foo Bar\"~2"; Query queryToSearch = qp.parse(teststr); System.out.println("Query : &

Change suggestion for ComplexPhraseQueryParser

2018-06-20 Thread Otmar Caduff
Dear committers Recently I wanted to be able to extend wildcard queries over phrases. To do so, I dived into ComplexPhraseQueryParser. It turned out that making a small change to that class allows me to achieve my goal. Because I thought that change might help others, I opend a Jira issue and

ComplexPhraseQueryParser

2017-01-30 Thread Otmar Caduff
Hi Some days ago, I encountered some unexpected behaviour and filed the following issue: https://issues.apache.org/jira/browse/LUCENE-7650 No feedback yet. Does anybody know if such an issue will be fixed soon? Otmar - To unsub

Re: ComplexPhraseQueryParser with wildcards

2017-01-02 Thread Mikhail Khludnev
tandardAnalyzer; > import org.apache.lucene.document.Document; > import org.apache.lucene.document.Field.Store; > import org.apache.lucene.document.TextField; > import org.apache.lucene.index.DirectoryReader; > import org.apache.lucene.index.IndexReader; > import org.apache.lucene.index.IndexWrite

Re: ComplexPhraseQueryParser with wildcards

2016-12-20 Thread Mikhail Khludnev
hen work? > > I'm trying to figure out if I can use ComplexPhraseQueryParser as a default > in my application or if I have to handle some cases differently. > > Otmar > > On Tue, Dec 20, 2016 at 3:17 PM, Ahmet Arslan > wrote: > > > Hi Otmar, > > > &

Re: ComplexPhraseQueryParser with wildcards

2016-12-20 Thread Otmar Caduff
Thanks for your response, Ahmet! I agree, a meaningful phrase query should have at least two terms. However, why should the query "john" (without wildcard) then work? I'm trying to figure out if I can use ComplexPhraseQueryParser as a default in my application or if I have to ha

Re: ComplexPhraseQueryParser with wildcards

2016-12-20 Thread Ahmet Arslan
writer.close(); IndexReader reader = DirectoryReader.open(directory); IndexSearcher searcher = new IndexSearcher(reader); ComplexPhraseQueryParser parser = new ComplexPhraseQueryParser("field", new StandardAnalyzer()); TopDocs topDocs; Query queryOk = parser.parse("field: (john* peters)"

ComplexPhraseQueryParser with wildcards

2016-12-20 Thread Otmar Caduff
); writer.commit(); writer.close(); IndexReader reader = DirectoryReader.open(directory); IndexSearcher searcher = new IndexSearcher(reader); ComplexPhraseQueryParser parser = new ComplexPhraseQueryParser("field", new StandardAnalyzer()); TopDocs topDocs; Query queryOk = parser.par

Re: Phrase search with ComplexPhraseQueryParser/SpanQueryParser.

2014-03-06 Thread Modassar Ather
arched whereas a phrase > without it gets searched using ComplexPhraseQueryParser/SpanQueryParser. > > SpanQueryParser reference: > https://issues.apache.org/jira/browse/LUCENE-5205 > > The similar search works fine with classic parser which uses PhraseQuery as > it includes the po

Re: Phrase search with ComplexPhraseQueryParser/SpanQueryParser.

2014-03-05 Thread Ahmet Arslan
tting searched whereas a phrase without it gets searched using ComplexPhraseQueryParser/SpanQueryParser. SpanQueryParser reference: https://issues.apache.org/jira/browse/LUCENE-5205 The similar search works fine with classic parser which uses PhraseQuery as it includes the position of terms for al

Phrase search with ComplexPhraseQueryParser/SpanQueryParser.

2014-03-04 Thread Modassar Ather
Hi, Phrases with stop words in them are not getting searched whereas a phrase without it gets searched using ComplexPhraseQueryParser/SpanQueryParser. SpanQueryParser reference: https://issues.apache.org/jira/browse/LUCENE-5205 The similar search works fine with classic parser which uses

Re: ComplexPhraseQueryParser and stop words

2012-11-02 Thread Mark Harwood
should parse ok as the query contains no markup that makes it a complex phrase. Cheers Mark On 1 Nov 2012, at 19:54, Brandon Mintern wrote: > We are still having the issue where ComplexPhraseQueryParser fails on > quoted expressions that include stop words. Does the original >

Re: ComplexPhraseQueryParser and stop words

2012-11-01 Thread Brandon Mintern
We are still having the issue where ComplexPhraseQueryParser fails on quoted expressions that include stop words. Does the original developer of this class still contribute to Lucene? On Fri, Oct 26, 2012 at 3:37 PM, Brandon Mintern wrote: > We recently switched from QueryParser

ComplexPhraseQueryParser and stop words

2012-10-26 Thread Brandon Mintern
We recently switched from QueryParser to ComplexPhraseQueryParser (from lucene-queryparser-3.6.0.jar), and we've come across two separate problems. The first is that because it parses quoted expressions twice, it is necessary to double-escape any escaped characters. So if I do not want to

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread lichman
The same as touch*. Thanks. -- View this message in context: http://lucene.472066.n3.nabble.com/ComplexPhraseQueryParser-with-multiple-fields-tp2879290p3099824.html Sent from the Lucene - Java Users mailing list archive at Nabble.com

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread Ahmet Arslan
> But now there's another issue. > I'm using SOLR and Lucene 3.1.0 and when sending a query > "Wildcard* phrase*" > it works as expected - but, when sending the query > "wildcard*" (Only one > word withing the phrase) I'm getting another exception: > > HTTP ERROR: 500 > Unknown query type "org.ap

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread lichman
deas? -- View this message in context: http://lucene.472066.n3.nabble.com/ComplexPhraseQueryParser-with-multiple-fields-tp2879290p3099495.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. - To unsubscribe, e-ma

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread Ahmet Arslan
> By the way - I'm using the > ComplexPhraseQueryParser that I've downloaded > from: > > https://issues.apache.org/jira/browse/SOLR-1604 > > And I've tried to use packages: > > - org.apache.lucene.search > - org.apache.lucene.queryParser > >

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread lichman
By the way - I'm using the ComplexPhraseQueryParser that I've downloaded from: https://issues.apache.org/jira/browse/SOLR-1604 And I've tried to use packages: - org.apache.lucene.search - org.apache.lucene.queryParser Both, when compiled and added to the SOLR lib dir, cause

Re: ComplexPhraseQueryParser with multiple fields

2011-06-23 Thread lichman
Which patch are you referring to? The last one? And sure... I'll do the voting thing. -- View this message in context: http://lucene.472066.n3.nabble.com/ComplexPhraseQueryParser-with-multiple-fields-tp2879290p3099032.html Sent from the Lucene - Java Users mailing list archive at Nabbl

Re: ComplexPhraseQueryParser with multiple fields

2011-06-22 Thread Ahmet Arslan
> Which of the solutions did you find to work better? > Can you please say which package should I change it to if I > choose to do it > that way? I think changing package name of ComplexQueryParser is easier. This way you can use existing patch directly. Plus, do you mind voting https://issues.a

Re: ComplexPhraseQueryParser with multiple fields

2011-06-21 Thread lichman
Say, Which of the solutions did you find to work better? Can you please say which package should I change it to if I choose to do it that way? Thanks, Moshe Lichman. -- View this message in context: http://lucene.472066.n3.nabble.com/ComplexPhraseQueryParser-with-multiple-fields

Re: ComplexPhraseQueryParser with multiple fields

2011-05-03 Thread Chris Salem
- Original Message - To: "java-user@lucene.apache.org" , Chris Salem From: Ahmet Arslan Sent: 5/2/2011 6:42:37 AM Subject: Re: ComplexPhraseQueryParser with multiple fields Hi, I've just started using the ComplexPhraseQueryParser and it works great with one field but is there

Re: ComplexPhraseQueryParser with multiple fields

2011-05-02 Thread Ahmet Arslan
Hi, I've just started using the ComplexPhraseQueryParser and it works great with one field but is there a way for it to work with multiple fields?  For example, right now the query: job_title: "sales man*" AND NOT contact_name: "Chris Salem" throws

ComplexPhraseQueryParser with multiple fields

2011-04-29 Thread Chris Salem
Hi, I've just started using the ComplexPhraseQueryParser and it works great with one field but is there a way for it to work with multiple fields? For example, right now the query: job_title: "sales man*" AND NOT contact_name: "Chris Salem" throws

Re: About ComplexPhraseQueryParser highlight prob

2011-03-15 Thread Ahmet Arslan
--- On Tue, 3/15/11, Cescy wrote: > From: Cescy > Subject: About ComplexPhraseQueryParser highlight prob > To: "java-user" > Date: Tuesday, March 15, 2011, 11:44 PM > hi > > > My app can find the document but cannot highlight the > keywords. > >

About ComplexPhraseQueryParser highlight prob

2011-03-15 Thread Cescy
hi My app can find the document but cannot highlight the keywords. ComplexPhraseQueryParser parser = new ComplexPhraseQueryParser(Version.LUCENE_30, "contents", analyzer); Query query = parser.parse("\"(great~) sum*\""); QueryScorer scorer = new QueryS

RE: ComplexPhraseQueryParser (Expanded Form and Boosting)

2010-02-02 Thread Haghighi, Nariman
sday, February 02, 2010 9:32 AM To: java-user@lucene.apache.org Subject: Re: ComplexPhraseQueryParser (Expanded Form and Boosting) > Second concern: boosting a > phrase ("java developer"^10.0) doesn't seem to be applied > when you look at the result explanations when using the >

Re: ComplexPhraseQueryParser (Expanded Form and Boosting)

2010-02-02 Thread Ahmet Arslan
> Second concern: boosting a > phrase ("java developer"^10.0) doesn't seem to be applied > when you look at the result explanations when using the > ComplexPhraseQueryParser - it's respected on single word > queries and it's respected on phrases using the

Re: ComplexPhraseQueryParser (Expanded Form and Boosting)

2010-02-02 Thread Karsten F.
Hi Nariman, In my understanding of ComplexPhraseQueryParser this class is not longer supported. http://issues.apache.org/jira/browse/LUCENE-1486#action_12782254 Instead with lucene 3.1 the new org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser will do this job. https

Re: ComplexPhraseQueryParser (Expanded Form and Boosting)

2010-02-01 Thread Mark Harwood
Try call rewrite on the query object to expand then call tostring on the result. Cheers, Mark - On 1 Feb 2010, at 21:32, "Haghighi, Nariman" wrote: > We are relying on the ComplexPhraseQueryParser for some impressive > matching capabilities. > > Of concern is

ComplexPhraseQueryParser (Expanded Form and Boosting)

2010-02-01 Thread Haghighi, Nariman
We are relying on the ComplexPhraseQueryParser for some impressive matching capabilities. Of concern is that Wildcard Queries, of the form "quality operations providing quality food services job requirements: click here to apply for this job*", for instance, take 2-5 seconds to e

Re: ComplexPhraseQueryParser highlight problem

2009-11-03 Thread Mark Miller
AHMET ARSLAN wrote: >> Looks like its because the query >> coming in is a ComplexPhraseQuery and >> the Highlighter doesn't current know how to handle that >> type. >> >> It would need to be rewritten first barring the special >> handling it >> needs - but unfortunately, that will break multi-term

Re: ComplexPhraseQueryParser highlight problem

2009-11-03 Thread AHMET ARSLAN
> Looks like its because the query > coming in is a ComplexPhraseQuery and > the Highlighter doesn't current know how to handle that > type. > > It would need to be rewritten first barring the special > handling it > needs - but unfortunately, that will break multi-term query > highlighting > unle

Re: ComplexPhraseQueryParser highlight problem

2009-11-02 Thread Mark Miller
the same query string is >> parsed by Lucene's default QueryParser highlighting comes. >> >> I am trying to highlight full original text, preserving >> proximity criteria. >> Choice of FastVectorHighlighter or Highlighter is not >> important for me. >&

Re: ComplexPhraseQueryParser highlight problem

2009-11-02 Thread AHMET ARSLAN
hting comes. > > I am trying to highlight full original text, preserving > proximity criteria. > Choice of FastVectorHighlighter or Highlighter is not > important for me. > > I was using ComplexPhraseQueryParser with solr 1.3.0, > without problems with PhraseHighlighter

Re: ComplexPhraseQueryParser highlight problem

2009-11-02 Thread AHMET ARSLAN
cene's default QueryParser highlighting comes. I am trying to highlight full original text, preserving proximity criteria. Choice of FastVectorHighlighter or Highlighter is not important for me. I was using ComplexPhraseQueryParser with solr 1.3.0, without problems with PhraseHighlighter. But

Re: ComplexPhraseQueryParser highlight problem

2009-11-02 Thread Mark Miller
Yes - please share your test programs and I can investigate (ApacheCon this week, so I'm not sure when). And its best to keep communications on the list - that allows others with similar issues (now or in the future) to benefit from whatever goes on. You will also reach a wider pool of people that