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 Torlaf15 <fe...@hotmail.de> on 2012/02/10 17:19:01 UTC

How to define field type

Hello,

I hope someone can help me.

I have several documents with the fields content, author, ... indexed.
Now I would like to make a faceted search.

The exact problem is with me following:
As a result (SolrResponse) for query I get: ........facet_fields= {author =
{first name=1, surname = 1}}.....

As a result I would like to get the whole authors' names .
Like this:.....facet_fields={author={firstname surname=1}}............  

I tried to change the type of field author to string. But then it is no
longer possible to search the content of this field.

I hope someone give me some advice.

Many thanks for your time
Toralf

--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-define-field-type-tp3732986p3732986.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to define field type

Posted by Torlaf15 <fe...@hotmail.de>.
Hi,

that sounds very good.

Thank you
Toralf

--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-define-field-type-tp3732986p3733350.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to define field type

Posted by Erick Erickson <er...@gmail.com>.
Typically this is handle by defining
 a second field of type string and use
copyField to copy from author to this
new field, say, author_facet.

Then do your facets on author_facet
but do searches on author.


Best
Erick

On Fri, Feb 10, 2012 at 11:19 AM, Torlaf15 <fe...@hotmail.de> wrote:
> Hello,
>
> I hope someone can help me.
>
> I have several documents with the fields content, author, ... indexed.
> Now I would like to make a faceted search.
>
> The exact problem is with me following:
> As a result (SolrResponse) for query I get: ........facet_fields= {author =
> {first name=1, surname = 1}}.....
>
> As a result I would like to get the whole authors' names .
> Like this:.....facet_fields={author={firstname surname=1}}............
>
> I tried to change the type of field author to string. But then it is no
> longer possible to search the content of this field.
>
> I hope someone give me some advice.
>
> Many thanks for your time
> Toralf
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-define-field-type-tp3732986p3732986.html
> Sent from the Solr - User mailing list archive at Nabble.com.