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 Jack L <jl...@yahoo.ca> on 2007/05/16 18:15:25 UTC

Re[2]: Feature Request: Multiple default search fields

Hello Brian,

Thanks for your answer. It was helpful.

> For your first issue, use a copyField to copy all the text you want
> as default to a default search field.

Oh, I didn't know I could copy multiple fields to one field :)
I didn't quite figure out what copyField was for anyway but I guess
this is a good usage.

The doc describes the purpose of copyField as:

"This is provided as a convenient way to ensure that data is
put into several fields, without needing to include the data in
the update command multiple times."

It sounds like many to many copying. What is the intended use case
for this?

> For the second, have you looked at http://wiki.apache.org/solr/ 
> DisMaxRequestHandler ? You set up boosts per field in solrconfig.xml
> that way.

This seems to be able to resolve both of my problems (multiple
default search fields and field boost.) If my understanding is
correct, it should be a more useful RequestHandler for probably
most solr uses. It is not the default though. Is it because it
requires some more configuration than the StandardRequestHander?
But I'll definitely give it a try.

Jack



Re: Re[4]: Feature Request: Multiple default search fields

Posted by Yonik Seeley <yo...@apache.org>.
On 5/16/07, Jack L <jl...@yahoo.ca> wrote:
> If I want to try out DisMaxRequestHandler, do I need to repost?
> I suppose it is for searching only and does not require re-indexing?

No need to re-index, it's just a different request handler.
It's very much like the standard request handler, but it uses it's own
query parser in conjunction with it's other parameters to construct
the "base" query.  faceting, filtering, highlighting, etc, are all the
same as the standard request handler.

Start by commenting out (or customizing) the defaults in the dismax
request handler in solrconfig.xml.  Then when you do a query, add
qt=dismax to the parameters.

-Yonik

Re[4]: Feature Request: Multiple default search fields

Posted by Jack L <jl...@yahoo.ca>.
Thanks Yonik.

If I want to try out DisMaxRequestHandler, do I need to repost?
I suppose it is for searching only and does not require re-indexing?

-- 
Best regards,
Jack

> It came later... "standard" was the first request handler.
> dismax is the recommended starting point for anyone dealing with user
> entered queries:
> http://wiki.apache.org/solr/SolrRelevancyFAQ
> The documentation is slowly improving :-)

> -Yonik


Re: Re[2]: Feature Request: Multiple default search fields

Posted by Yonik Seeley <yo...@apache.org>.
On 5/16/07, Jack L <jl...@yahoo.ca> wrote:
> The doc describes the purpose of copyField as:
>
> "This is provided as a convenient way to ensure that data is
> put into several fields, without needing to include the data in
> the update command multiple times."
>
> It sounds like many to many copying. What is the intended use case
> for this?

The example schema.xml is better at pointing out that there are two use cases:
  <!-- copyField commands copy one field to another at the time a document
        is added to the index.  It's used either to index the same
field differently,
        or to add multiple fields to the same field for easier/faster searching.
  -->

   <copyField source="id" dest="sku"/>

   <copyField source="cat" dest="text"/>
   <copyField source="name" dest="text"/>
   <copyField source="name" dest="nameSort"/>
   <copyField source="name" dest="alphaNameSort"/>
   <copyField source="manu" dest="text"/>
   <copyField source="features" dest="text"/>
   <copyField source="includes" dest="text"/>

   <copyField source="manu" dest="manu_exact"/>

> This seems to be able to resolve both of my problems (multiple
> default search fields and field boost.) If my understanding is
> correct, it should be a more useful RequestHandler for probably
> most solr uses.
> It is not the default though.

It came later... "standard" was the first request handler.
dismax is the recommended starting point for anyone dealing with user
entered queries:
http://wiki.apache.org/solr/SolrRelevancyFAQ
The documentation is slowly improving :-)

-Yonik