Hi Jack,

Thanks for the reply.  My question is part of an investigation into ways to 
integrate SolrCloud with an existing and Lucene application with complex 
business rules.  One approach that occurred to me was to construct the Lucene 
query in the usual way on the existing side and pass it to a custom 
SearchHandler in Solr which would parse it and process it.  This may not be the 
best way to go but it seems feasible.

An additional benefit of having a full-blown Lucene QueryParser is that we 
would be able to use Luke for quickly examining the Lucene results for queries 
taken from our log files.

I have to admit that I didn't understand what you meant by query enrichment.  
Where can I find more information about that?

Thanks!


Jim Beale

hibu.com
2201 Renaissance Boulevard, King of Prussia, PA, 19406
Office: 610-879-3864
Mobile: 610-220-3067




-----Original Message-----
From: Jack Krupansky [mailto:j...@basetechnology.com]
Sent: Tuesday, July 23, 2013 10:22 AM
To: java-user@lucene.apache.org
Subject: Re: QueryParser for DisjunctionMaxQuery, et al.

I came up with some human-readable BNF rules for the Solr, dismax, and
edismax query parsers. They are in my book. In fact they are linked from the
"Solr Hot Spots" section in the preface.

The main problems with re-parsing from a lucene Query structure are
two-fold:

1. Terms have been analyzed, and there is no guarantee that term analysis is
idempotent (repeatable without changing the result.)
2. "Query enrichment" or "query enhancement" may have occurred - additional
terms and operators added. Reparsing them may result in a second (or even
nth) level of enrichment/enhancement. IOW, query enrichment/enhancement is
not guaranteed to to be idempotent.

That said, sure somebody could gin up a re-parser. The question is how
useful it would be. I suppose if the spec for the reparser was that it was
literal and with no term analysis or query enrichment/enhancement, it could
work. The fact that nobody has done it is a  testament to its marginal
utility.

Did you have a specific application in mind?

A more useful utility would be a "partial parser" that only parses without
analysis or enrichment and generates an abstract syntax tree that
applications could than access and manipulate and then "regenerate" a true
source query that doesn't have analysis or enrichment (except as the
application may explicitly have performed on the tree.)

-- Jack Krupansky

-----Original Message-----
From: Beale, Jim (US-KOP)
Sent: Tuesday, July 23, 2013 10:07 AM
To: java-user@lucene.apache.org
Subject: QueryParser for DisjunctionMaxQuery, et al.

Hello all,

It seems somewhat odd to me that the Query classes generate strings that the
QueryParser won't parse. Does anyone have a QueryParser that will parse the
full range of Lucene query strings?

Failing that, has the BNF been written down somewhere?  I can't seem to find
it for the full cases.

Thanks for any info/guidance.


Cheers,

Jim Beale
Lead Developer
Hibu.com

The information contained in this email message, including any attachments,
is intended solely for use by the individual or entity named above and may
be confidential. If the reader of this message is not the intended
recipient, you are hereby notified that you must not read, use, disclose,
distribute or copy any part of this communication. If you have received this
communication in error, please immediately notify me by email and destroy
the original message, including any attachments. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

The information contained in this email message, including any attachments, is 
intended solely for use by the individual or entity named above and may be 
confidential. If the reader of this message is not the intended recipient, you 
are hereby notified that you must not read, use, disclose, distribute or copy 
any part of this communication. If you have received this communication in 
error, please immediately notify me by email and destroy the original message, 
including any attachments. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to