lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@buyways.nl>
Subject RE: Re: schema.xml question
Date Fri, 07 May 2010 13:38:34 GMT
A requestHandler works as an URL that can have predefined parameters. By default you will be
querying the /select/ requestHandler. It, for instance, predefines the default number of rows
to return (10) and returns all fields of a document (*).

 

<requestHandler name="standard" class="solr.SearchHandler" default="true"> <!-- default
values for query parameters --> <lst name="defaults"> <str name="echoParams">explicit</str>
<!-- <int name="rows">10</int> <str name="fl">*</str> <str name="version">2.1</str>
--> </lst> </requestHandler> 

 

But you can also define more complex requestHandlers. The default configuration adds the dismax
requestHandler (/dismax/) but it's actually the same as the default requestHandler if you
would define all those configured parameters in your URL. So by defining the parameters in
the solrconfig.xml, you won't need to pass them in you query. You can of course override
predefined parameters with the exception of parameters defined inside an invariants block.

 

Check the documentation [1] on this subject but i would suggest you study the shipped solrconfig.xml
[2] configuration file, it offers better explanation of the subject.

 

[1]: http://wiki.apache.org/solr/SolrConfigXml

[2]: http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml

 

 

Cheers,
 
-----Original message-----
From: Antonello Mangone <antonello.mangone@gmail.com>
Sent: Fri 07-05-2010 15:26
To: solr-user@lucene.apache.org; 
Subject: Re: schema.xml question

For the moment I don't know how to do it, but I'll follow your suggestion :)
Thank you very much ...
ps. I'm just a novel

2010/5/7 Markus Jelsma <markus.jelsma@buyways.nl>

> You could write your own requestHandler in solrconfig.xml, it'll allow you
> to predefine parameters for your configured search components.
>
> -----Original message-----
> From: Antonello Mangone <antonello.mangone@gmail.com>
> Sent: Fri 07-05-2010 15:17
> To: solr-user@lucene.apache.org;
> Subject: schema.xml question
>
> Hello everyone, my question is ....
> Is it possible in schema.xml set a group of fields to use as a default
> field
> to query in "OR" or  in "AND" ???
>
> example:
>
> <group name="group_name">
>    <field name="a" type="..... />
>    <field name="b" type="..... />
>    <field name="c" type="..... />
> </group>
>
> <defaultSearchField>group_name</defaultSearchField>
>
> Thanks in advance
>

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message