[
https://issues.apache.org/jira/browse/SOLR-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yonik Seeley updated SOLR-334:
------------------------------
Attachment: qparser.patch
OK, heres a prototype... still needs some cleaning up and testing
Examples:
<!lucene q.op=AND df=myfield>
<!sort='price asc' start=100 rows=10>foo
<!dismax>hi there
<!dismax v=$userq> // indirection - userq is loaded from the other params
<!prefix f=myfield>the unescaped prefix
Query boosted by function (multiplied)
<!boost b=sqrt(popularity)>foo:bar
<!boost b=popularity defType=dismax>user query terms // set default query
type for nested query
Nested Queries in Lucene syntax:
+foo +bar _query_:"<!dismax>a b"
Nested Queries in FunctionQuery syntax (untested)
sqrt(log(query($q,1.0)))
sqrt(log(query(<!lucene v=$myq>,1.0)))
You can't currently override any parameters for dismax, and I've only changed
the standard request handler's main query to support this syntax. You should
be able to register your own query plugins, but I haven't tested that yet.
> pluggable query parsers
> -----------------------
>
> Key: SOLR-334
> URL: https://issues.apache.org/jira/browse/SOLR-334
> Project: Solr
> Issue Type: New Feature
> Reporter: Yonik Seeley
> Attachments: qparser.patch
>
>
> One should be able to optionally specify an alternate query syntax on a
> per-query basis
> http://www.nabble.com/Using-HTTP-Post-for-Queries-tf3039973.html#a8483387
> Many benefits, including avoiding the need to do query parser escaping for
> simple term or prefix queries.
> Possible Examples:
> fq=<!term field="myfield">The Term
> fq=<!prefix field="myfield">The Prefix
> q=<!qp op="AND">a b
> q=<!xml><?xml...> // lucene XML query syntax?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.