Hi Scott, now your queries are going to be created by a QueryParser. you
have a couple of options here, most common are LuceneQueryParser,
DismaxQueryParser and ExtendedDismaxQueryParser, but there are others. The
QueryParser will be creating all those queries you mentiones, for example,
if you are using the LuceneQueryParser and you send the query string:

field1:foo AND field2:bar

it will create a BooleanQuery with two TermQuery as clauses. The same with
more complex queries.

There are also some other QueryParsers for more specific cases. Take a look
at this class: org.apache.solr.search.QParserPlugin

You can choose and change the query parser with each request.

Local params can also be useful for you:
http://wiki.apache.org/solr/LocalParams

Regards,

Tomás

On Fri, Sep 16, 2011 at 4:25 AM, Federico Fissore <feder...@fissore.org>wrote:

> Hi
>
> Scott Smith, il 16/09/2011 02:30, ha scritto:
>
>  I've been using lucene for a number of years.  We've now decided to move
>> to SOLR.  I have a couple of questions.
>>
>>
>> 1.       I'm used to creating Boolean queries, filter queries, term
>> queries, etc. for lucene.  Am I right in thinking that for SOLR my only
>> option is creating string queries (with q and fq components) for solrj?
>>
>> 2.       Assuming that the answer to 1 is "correct", then is there an easy
>> way to take a lucene query (with nested Boolean queries, filter queries,
>> etc.) and generate a SOLR query string with q and fq components?
>>
>
>
> one other option is to build your own SearchComponent and handle additional
> parameters
>
> best regards
>
> federico
>

Reply via email to