You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Tom Burton-West <tb...@umich.edu> on 2014/03/04 17:51:08 UTC

Solr Block-Join requires uniqueKey field to be int?

Hello all,

We have been using strings for our uniqueKey field and discovered that Solr
Block-Join requires the uniqueKey field to be an int.   This is because the
magic field _root_ is required to be an int, and for children it gets
populated from the uniqueKey field of the parent record.

Would it be possible to change this to accomodate uniqueKeys that are
strings or is there some operation that requires ints for the field that
links the parent and child records  in the Solr Block-Join logic?

Tom

Re: Solr Block-Join requires uniqueKey field to be int?

Posted by Tom Burton-West <tb...@umich.edu>.
Thanks Yonik,

It works fine with a String.

How embarassing,  Somehow I managed to accidentally set _root_ to an int in
my schema. Don't know how I did it.

Tom



On Tue, Mar 4, 2014 at 11:56 AM, Yonik Seeley <yo...@heliosearch.com> wrote:

> On Tue, Mar 4, 2014 at 11:51 AM, Tom Burton-West <tb...@umich.edu>
> wrote:
> > We have been using strings for our uniqueKey field and discovered that
> Solr
> > Block-Join requires the uniqueKey field to be an int.   This is because
> the
> > magic field _root_ is required to be an int, and for children it gets
> > populated from the uniqueKey field of the parent record.
>
> Are you sure it doesn't work with String?  The example field has
> _root_ defined to be:
>
>    <field name="_root_" type="string" indexed="true" stored="false"/>
>
> -Yonik
> http://heliosearch.org - native off-heap filters and fieldcache for solr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Solr Block-Join requires uniqueKey field to be int?

Posted by Yonik Seeley <yo...@heliosearch.com>.
On Tue, Mar 4, 2014 at 11:51 AM, Tom Burton-West <tb...@umich.edu> wrote:
> We have been using strings for our uniqueKey field and discovered that Solr
> Block-Join requires the uniqueKey field to be an int.   This is because the
> magic field _root_ is required to be an int, and for children it gets
> populated from the uniqueKey field of the parent record.

Are you sure it doesn't work with String?  The example field has
_root_ defined to be:

   <field name="_root_" type="string" indexed="true" stored="false"/>

-Yonik
http://heliosearch.org - native off-heap filters and fieldcache for solr

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org