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 Thomas Koch <th...@koch.ro> on 2009/12/08 09:48:48 UTC

Multiple default search fields or catchall field?

Hi,

I'm indexing feeds and websites referenced by the feeds. So I have as text 
fields:
title - from the feed entries title
description - from the feed entries description
text - the websites text

When the user doesn't define a default search field, then all three fields 
should be used for search. And I need to have highlighting. However it should 
still be possible to search only in title or description.

- Do I need a catchall text field with content copied from all text fields?
- Do I need to store the content in the catchall field as well as in the 
individual fields to get highlighting in every case?
- Isn't it a big waste of hard disc space to store the content two times?

Thanks for any help,

Thomas Koch, http://www.koch.ro

Re: Multiple default search fields or catchall field?

Posted by Erick Erickson <er...@gmail.com>.
See below.

On Tue, Dec 8, 2009 at 3:48 AM, Thomas Koch <th...@koch.ro> wrote:

> Hi,
>
> I'm indexing feeds and websites referenced by the feeds. So I have as text
> fields:
> title - from the feed entries title
> description - from the feed entries description
> text - the websites text
>
> When the user doesn't define a default search field, then all three fields
> should be used for search. And I need to have highlighting. However it
> should
> still be possible to search only in title or description.
>
> - Do I need a catchall text field with content copied from all text fields?
>

This is a common way to do this. You could also write custom code to munge
the
query, but there's no need to go there as a first option, I'd only think
about
this if you have problems with the catchall approach.



> - Do I need to store the content in the catchall field as well as in the
> individual fields to get highlighting in every case?
>

No. You don't display the catchall field, so you don't need to store it.


> - Isn't it a big waste of hard disc space to store the content two times?
>
> Disk space is cheap. It really depends upon how much data you're storing
whether you care. 100M - who cares? 100G - lotsa people care...... But you
don't have to so it's a moot point.

HTH
Erick


> Thanks for any help,
>
> Thomas Koch, http://www.koch.ro
>