You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Paul Libbrecht <pa...@activemath.org> on 2009/04/02 00:34:48 UTC
spectrum of Lucene queries in solr?
Hello list,
I am surprised not to find any equivalent to the classical Lucene
queries in Solr... I must have badly looked...
E.g. where can I get a BooleanQuery, a PrefixQuery, a FuzzyQuery, or
even a few spanqueries?
thanks in advance
paul
Re: spectrum of Lucene queries in solr?
Posted by Chris Hostetter <ho...@fucit.org>.
: Sorry, I just realized I can use SolrIndexSearcher.search(Query, Hit)...
:
: that was my question basically.
I wouldn't recommend it ... those methods bypass all of the goodness Solr
adds on top of of Lucene (caching, etc...)
if you're writing plugin/embedded code where you have access to the
SOlrIndexSearcher stick with the methods that return a DocList or DocSet
(or DocListAndDocSet) .. you can still pass them Query objects, and you'll
get all of the Solr goodness.
-Hoss
Re: spectrum of Lucene queries in solr?
Posted by Paul Libbrecht <pa...@activemath.org>.
Sorry, I just realized I can use SolrIndexSearcher.search(Query, Hit)...
that was my question basically.
paul
Le 02-avr.-09 à 03:31, Erik Hatcher a écrit :
> Paul,
>
> I'm not sure I understand what you're looking for exactly. Solr
> supports Lucene's QueryParser by default for /select?q=... so you
> get the breadth of what it supports including boolean, prefix,
> fuzzy, and more. QueryParser has never supported span queries
> though. There is also a dismax parser available (&defType=dismax to
> enable it), and numerous other parser plugins. Queries with Solr
> aren't created from the client as a Query object, but rather some
> string parameters come from the client that are then used to build a
> Query on the server side.
>
> You can also add your own QParserPlugin to build custom Lucene Query
> objects however you like.
>
> Erik
>
>
> On Apr 1, 2009, at 6:34 PM, Paul Libbrecht wrote:
>> I am surprised not to find any equivalent to the classical Lucene
>> queries in Solr... I must have badly looked...
>> E.g. where can I get a BooleanQuery, a PrefixQuery, a FuzzyQuery,
>> or even a few spanqueries?
>>
>> thanks in advance
>>
>> paul
>
Re: spectrum of Lucene queries in solr?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Paul,
I'm not sure I understand what you're looking for exactly. Solr
supports Lucene's QueryParser by default for /select?q=... so you get
the breadth of what it supports including boolean, prefix, fuzzy, and
more. QueryParser has never supported span queries though. There is
also a dismax parser available (&defType=dismax to enable it), and
numerous other parser plugins. Queries with Solr aren't created from
the client as a Query object, but rather some string parameters come
from the client that are then used to build a Query on the server side.
You can also add your own QParserPlugin to build custom Lucene Query
objects however you like.
Erik
On Apr 1, 2009, at 6:34 PM, Paul Libbrecht wrote:
> I am surprised not to find any equivalent to the classical Lucene
> queries in Solr... I must have badly looked...
> E.g. where can I get a BooleanQuery, a PrefixQuery, a FuzzyQuery, or
> even a few spanqueries?
>
> thanks in advance
>
> paul